[tint] Add read-only storage texture builtins

Most backends "just worked", except HLSL which uses a different
register space for read-only textures.

Bug: tint:2007
Change-Id: I7925b3bdf7389e3b429e0a570e988adde0443452
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/146961
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
diff --git a/test/tint/builtins/gen/var/textureLoad/045ec9.wgsl b/test/tint/builtins/gen/var/textureLoad/045ec9.wgsl
new file mode 100644
index 0000000..035f665
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/045ec9.wgsl
@@ -0,0 +1,49 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_3d<rgba8sint, read>;
+
+// fn textureLoad(texture: texture_storage_3d<rgba8sint, read>, coords: vec3<u32>) -> vec4<i32>
+fn textureLoad_045ec9() {
+  var arg_1 = vec3<u32>(1u);
+  var res: vec4<i32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_045ec9();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_045ec9();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_045ec9();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/045ec9.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/045ec9.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..7f29023
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/045ec9.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture3D<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_045ec9() {
+  uint3 arg_1 = (1u).xxx;
+  int4 res = arg_0.Load(uint4(arg_1, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_045ec9();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_045ec9();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_045ec9();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/045ec9.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/045ec9.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..7f29023
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/045ec9.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture3D<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_045ec9() {
+  uint3 arg_1 = (1u).xxx;
+  int4 res = arg_0.Load(uint4(arg_1, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_045ec9();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_045ec9();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_045ec9();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/045ec9.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/045ec9.wgsl.expected.glsl
new file mode 100644
index 0000000..d581204
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/045ec9.wgsl.expected.glsl
@@ -0,0 +1,90 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba8i) uniform highp iimage3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_045ec9() {
+  uvec3 arg_1 = uvec3(1u);
+  ivec4 res = texelFetch(arg_0, ivec3(arg_1));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_045ec9();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba8i) uniform highp iimage3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_045ec9() {
+  uvec3 arg_1 = uvec3(1u);
+  ivec4 res = texelFetch(arg_0, ivec3(arg_1));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_045ec9();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba8i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba8i) uniform highp iimage3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_045ec9() {
+  uvec3 arg_1 = uvec3(1u);
+  ivec4 res = texelFetch(arg_0, ivec3(arg_1));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_045ec9();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/045ec9.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/045ec9.wgsl.expected.msl
new file mode 100644
index 0000000..ad5fedf
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/045ec9.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_045ec9(texture3d<int, access::read> tint_symbol_1, device int4* const tint_symbol_2) {
+  uint3 arg_1 = uint3(1u);
+  int4 res = tint_symbol_1.read(uint3(arg_1));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<int, access::read> tint_symbol_3, device int4* const tint_symbol_4) {
+  textureLoad_045ec9(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<int, access::read> tint_symbol_5 [[texture(0)]], device int4* tint_symbol_6 [[buffer(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<int, access::read> tint_symbol_7 [[texture(0)]], device int4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_045ec9(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture3d<int, access::read> tint_symbol_9 [[texture(0)]], device int4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_045ec9(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/045ec9.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/045ec9.wgsl.expected.spvasm
new file mode 100644
index 0000000..f68876c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/045ec9.wgsl.expected.spvasm
@@ -0,0 +1,100 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 52
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_045ec9 "textureLoad_045ec9"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 3D 0 0 0 2 Rgba8i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+      %v4int = OpTypeVector %int 4
+%prevent_dce_block = OpTypeStruct %v4int
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v3uint = OpTypeVector %uint 3
+     %uint_1 = OpConstant %uint 1
+         %24 = OpConstantComposite %v3uint %uint_1 %uint_1 %uint_1
+%_ptr_Function_v3uint = OpTypePointer Function %v3uint
+         %27 = OpConstantNull %v3uint
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+         %33 = OpConstantNull %v4int
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4int = OpTypePointer StorageBuffer %v4int
+         %38 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_045ec9 = OpFunction %void None %17
+         %20 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v3uint Function %27
+        %res = OpVariable %_ptr_Function_v4int Function %33
+               OpStore %arg_1 %24
+         %29 = OpLoad %11 %arg_0
+         %30 = OpLoad %v3uint %arg_1
+         %28 = OpImageRead %v4int %29 %30
+               OpStore %res %28
+         %36 = OpAccessChain %_ptr_StorageBuffer_v4int %prevent_dce %uint_0
+         %37 = OpLoad %v4int %res
+               OpStore %36 %37
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %38
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %textureLoad_045ec9
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %43 = OpLabel
+         %44 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %44
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %47 = OpLabel
+         %48 = OpFunctionCall %void %textureLoad_045ec9
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %50 = OpLabel
+         %51 = OpFunctionCall %void %textureLoad_045ec9
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/045ec9.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/045ec9.wgsl.expected.wgsl
new file mode 100644
index 0000000..40f67b7
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/045ec9.wgsl.expected.wgsl
@@ -0,0 +1,27 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_3d<rgba8sint, read>;
+
+fn textureLoad_045ec9() {
+  var arg_1 = vec3<u32>(1u);
+  var res : vec4<i32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_045ec9();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_045ec9();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_045ec9();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/050c33.wgsl b/test/tint/builtins/gen/var/textureLoad/050c33.wgsl
new file mode 100644
index 0000000..bdf9a9e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/050c33.wgsl
@@ -0,0 +1,49 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d<rg32uint, read>;
+
+// fn textureLoad(texture: texture_storage_2d<rg32uint, read>, coords: vec2<i32>) -> vec4<u32>
+fn textureLoad_050c33() {
+  var arg_1 = vec2<i32>(1i);
+  var res: vec4<u32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_050c33();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_050c33();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_050c33();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/050c33.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/050c33.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..8e3cf2f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/050c33.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture2D<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_050c33() {
+  int2 arg_1 = (1).xx;
+  uint4 res = arg_0.Load(int3(arg_1, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_050c33();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_050c33();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_050c33();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/050c33.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/050c33.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..8e3cf2f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/050c33.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture2D<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_050c33() {
+  int2 arg_1 = (1).xx;
+  uint4 res = arg_0.Load(int3(arg_1, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_050c33();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_050c33();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_050c33();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/050c33.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/050c33.wgsl.expected.glsl
new file mode 100644
index 0000000..6f687b9
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/050c33.wgsl.expected.glsl
@@ -0,0 +1,93 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rg32ui) uniform highp uimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_050c33() {
+  ivec2 arg_1 = ivec2(1);
+  uvec4 res = texelFetch(arg_0, arg_1);
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_050c33();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rg32ui) uniform highp uimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_050c33() {
+  ivec2 arg_1 = ivec2(1);
+  uvec4 res = texelFetch(arg_0, arg_1);
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_050c33();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'image load-store format' : not supported with this profile: es
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rg32ui) uniform highp uimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_050c33() {
+  ivec2 arg_1 = ivec2(1);
+  uvec4 res = texelFetch(arg_0, arg_1);
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_050c33();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/050c33.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/050c33.wgsl.expected.msl
new file mode 100644
index 0000000..e423c2d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/050c33.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_050c33(texture2d<uint, access::read> tint_symbol_1, device uint4* const tint_symbol_2) {
+  int2 arg_1 = int2(1);
+  uint4 res = tint_symbol_1.read(uint2(arg_1));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<uint, access::read> tint_symbol_3, device uint4* const tint_symbol_4) {
+  textureLoad_050c33(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<uint, access::read> tint_symbol_5 [[texture(0)]], device uint4* tint_symbol_6 [[buffer(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<uint, access::read> tint_symbol_7 [[texture(0)]], device uint4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_050c33(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d<uint, access::read> tint_symbol_9 [[texture(0)]], device uint4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_050c33(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/050c33.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/050c33.wgsl.expected.spvasm
new file mode 100644
index 0000000..209ca7b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/050c33.wgsl.expected.spvasm
@@ -0,0 +1,101 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 52
+; Schema: 0
+               OpCapability Shader
+               OpCapability StorageImageExtendedFormats
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_050c33 "textureLoad_050c33"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 2D 0 0 0 2 Rg32ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+     %v4uint = OpTypeVector %uint 4
+%prevent_dce_block = OpTypeStruct %v4uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %v2int = OpTypeVector %int 2
+      %int_1 = OpConstant %int 1
+         %24 = OpConstantComposite %v2int %int_1 %int_1
+%_ptr_Function_v2int = OpTypePointer Function %v2int
+         %27 = OpConstantNull %v2int
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+         %33 = OpConstantNull %v4uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4uint = OpTypePointer StorageBuffer %v4uint
+         %38 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_050c33 = OpFunction %void None %17
+         %20 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v2int Function %27
+        %res = OpVariable %_ptr_Function_v4uint Function %33
+               OpStore %arg_1 %24
+         %29 = OpLoad %11 %arg_0
+         %30 = OpLoad %v2int %arg_1
+         %28 = OpImageRead %v4uint %29 %30
+               OpStore %res %28
+         %36 = OpAccessChain %_ptr_StorageBuffer_v4uint %prevent_dce %uint_0
+         %37 = OpLoad %v4uint %res
+               OpStore %36 %37
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %38
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %textureLoad_050c33
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %43 = OpLabel
+         %44 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %44
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %47 = OpLabel
+         %48 = OpFunctionCall %void %textureLoad_050c33
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %50 = OpLabel
+         %51 = OpFunctionCall %void %textureLoad_050c33
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/050c33.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/050c33.wgsl.expected.wgsl
new file mode 100644
index 0000000..59e2d9f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/050c33.wgsl.expected.wgsl
@@ -0,0 +1,27 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d<rg32uint, read>;
+
+fn textureLoad_050c33() {
+  var arg_1 = vec2<i32>(1i);
+  var res : vec4<u32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_050c33();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_050c33();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_050c33();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/0674b1.wgsl b/test/tint/builtins/gen/var/textureLoad/0674b1.wgsl
new file mode 100644
index 0000000..8c09637
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/0674b1.wgsl
@@ -0,0 +1,49 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_3d<rgba8snorm, read>;
+
+// fn textureLoad(texture: texture_storage_3d<rgba8snorm, read>, coords: vec3<u32>) -> vec4<f32>
+fn textureLoad_0674b1() {
+  var arg_1 = vec3<u32>(1u);
+  var res: vec4<f32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_0674b1();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_0674b1();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_0674b1();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/0674b1.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/0674b1.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..5000ca0
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/0674b1.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture3D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_0674b1() {
+  uint3 arg_1 = (1u).xxx;
+  float4 res = arg_0.Load(uint4(arg_1, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_0674b1();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_0674b1();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_0674b1();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/0674b1.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/0674b1.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..5000ca0
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/0674b1.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture3D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_0674b1() {
+  uint3 arg_1 = (1u).xxx;
+  float4 res = arg_0.Load(uint4(arg_1, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_0674b1();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_0674b1();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_0674b1();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/0674b1.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/0674b1.wgsl.expected.glsl
new file mode 100644
index 0000000..d2621b3
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/0674b1.wgsl.expected.glsl
@@ -0,0 +1,90 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba8_snorm) uniform highp image3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_0674b1() {
+  uvec3 arg_1 = uvec3(1u);
+  vec4 res = texelFetch(arg_0, ivec3(arg_1));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_0674b1();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8_snorm' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba8_snorm) uniform highp image3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_0674b1() {
+  uvec3 arg_1 = uvec3(1u);
+  vec4 res = texelFetch(arg_0, ivec3(arg_1));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_0674b1();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba8_snorm' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba8_snorm) uniform highp image3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_0674b1() {
+  uvec3 arg_1 = uvec3(1u);
+  vec4 res = texelFetch(arg_0, ivec3(arg_1));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_0674b1();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8_snorm' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/0674b1.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/0674b1.wgsl.expected.msl
new file mode 100644
index 0000000..f9bf20c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/0674b1.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_0674b1(texture3d<float, access::read> tint_symbol_1, device float4* const tint_symbol_2) {
+  uint3 arg_1 = uint3(1u);
+  float4 res = tint_symbol_1.read(uint3(arg_1));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<float, access::read> tint_symbol_3, device float4* const tint_symbol_4) {
+  textureLoad_0674b1(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<float, access::read> tint_symbol_5 [[texture(0)]], device float4* tint_symbol_6 [[buffer(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::read> tint_symbol_7 [[texture(0)]], device float4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_0674b1(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture3d<float, access::read> tint_symbol_9 [[texture(0)]], device float4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_0674b1(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/0674b1.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/0674b1.wgsl.expected.spvasm
new file mode 100644
index 0000000..c58f21c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/0674b1.wgsl.expected.spvasm
@@ -0,0 +1,97 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 49
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_0674b1 "textureLoad_0674b1"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 3D 0 0 0 2 Rgba8Snorm
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+%prevent_dce_block = OpTypeStruct %v4float
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v3uint = OpTypeVector %uint 3
+     %uint_1 = OpConstant %uint 1
+         %22 = OpConstantComposite %v3uint %uint_1 %uint_1 %uint_1
+%_ptr_Function_v3uint = OpTypePointer Function %v3uint
+         %25 = OpConstantNull %v3uint
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
+         %35 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_0674b1 = OpFunction %void None %15
+         %18 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v3uint Function %25
+        %res = OpVariable %_ptr_Function_v4float Function %5
+               OpStore %arg_1 %22
+         %27 = OpLoad %11 %arg_0
+         %28 = OpLoad %v3uint %arg_1
+         %26 = OpImageRead %v4float %27 %28
+               OpStore %res %26
+         %33 = OpAccessChain %_ptr_StorageBuffer_v4float %prevent_dce %uint_0
+         %34 = OpLoad %v4float %res
+               OpStore %33 %34
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %35
+         %37 = OpLabel
+         %38 = OpFunctionCall %void %textureLoad_0674b1
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %40 = OpLabel
+         %41 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %41
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %44 = OpLabel
+         %45 = OpFunctionCall %void %textureLoad_0674b1
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %47 = OpLabel
+         %48 = OpFunctionCall %void %textureLoad_0674b1
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/0674b1.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/0674b1.wgsl.expected.wgsl
new file mode 100644
index 0000000..745d371
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/0674b1.wgsl.expected.wgsl
@@ -0,0 +1,27 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_3d<rgba8snorm, read>;
+
+fn textureLoad_0674b1() {
+  var arg_1 = vec3<u32>(1u);
+  var res : vec4<f32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_0674b1();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_0674b1();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_0674b1();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/06ac37.wgsl b/test/tint/builtins/gen/var/textureLoad/06ac37.wgsl
new file mode 100644
index 0000000..c95de45
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/06ac37.wgsl
@@ -0,0 +1,50 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba32float, read>;
+
+// fn textureLoad(texture: texture_storage_2d_array<rgba32float, read>, coords: vec2<u32>, array_index: u32) -> vec4<f32>
+fn textureLoad_06ac37() {
+  var arg_1 = vec2<u32>(1u);
+  var arg_2 = 1u;
+  var res: vec4<f32> = textureLoad(arg_0, arg_1, arg_2);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_06ac37();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_06ac37();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_06ac37();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/06ac37.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/06ac37.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..ee4f7ba
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/06ac37.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_06ac37() {
+  uint2 arg_1 = (1u).xx;
+  uint arg_2 = 1u;
+  float4 res = arg_0.Load(uint4(uint3(arg_1, arg_2), uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_06ac37();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_06ac37();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_06ac37();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/06ac37.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/06ac37.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..ee4f7ba
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/06ac37.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_06ac37() {
+  uint2 arg_1 = (1u).xx;
+  uint arg_2 = 1u;
+  float4 res = arg_0.Load(uint4(uint3(arg_1, arg_2), uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_06ac37();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_06ac37();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_06ac37();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/06ac37.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/06ac37.wgsl.expected.glsl
new file mode 100644
index 0000000..7caf706
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/06ac37.wgsl.expected.glsl
@@ -0,0 +1,93 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba32f) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_06ac37() {
+  uvec2 arg_1 = uvec2(1u);
+  uint arg_2 = 1u;
+  vec4 res = texelFetch(arg_0, ivec3(uvec3(arg_1, arg_2)));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_06ac37();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba32f' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba32f) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_06ac37() {
+  uvec2 arg_1 = uvec2(1u);
+  uint arg_2 = 1u;
+  vec4 res = texelFetch(arg_0, ivec3(uvec3(arg_1, arg_2)));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_06ac37();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba32f' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba32f) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_06ac37() {
+  uvec2 arg_1 = uvec2(1u);
+  uint arg_2 = 1u;
+  vec4 res = texelFetch(arg_0, ivec3(uvec3(arg_1, arg_2)));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_06ac37();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba32f' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/06ac37.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/06ac37.wgsl.expected.msl
new file mode 100644
index 0000000..6471a54
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/06ac37.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_06ac37(texture2d_array<float, access::read> tint_symbol_1, device float4* const tint_symbol_2) {
+  uint2 arg_1 = uint2(1u);
+  uint arg_2 = 1u;
+  float4 res = tint_symbol_1.read(uint2(arg_1), arg_2);
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<float, access::read> tint_symbol_3, device float4* const tint_symbol_4) {
+  textureLoad_06ac37(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<float, access::read> tint_symbol_5 [[texture(0)]], device float4* tint_symbol_6 [[buffer(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::read> tint_symbol_7 [[texture(0)]], device float4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_06ac37(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<float, access::read> tint_symbol_9 [[texture(0)]], device float4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_06ac37(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/06ac37.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/06ac37.wgsl.expected.spvasm
new file mode 100644
index 0000000..cad70eb
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/06ac37.wgsl.expected.spvasm
@@ -0,0 +1,107 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 57
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_06ac37 "textureLoad_06ac37"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 1 0 2 Rgba32f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+%prevent_dce_block = OpTypeStruct %v4float
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+     %uint_1 = OpConstant %uint 1
+         %22 = OpConstantComposite %v2uint %uint_1 %uint_1
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %25 = OpConstantNull %v2uint
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %28 = OpConstantNull %uint
+     %v3uint = OpTypeVector %uint 3
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
+         %43 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_06ac37 = OpFunction %void None %15
+         %18 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v2uint Function %25
+      %arg_2 = OpVariable %_ptr_Function_uint Function %28
+        %res = OpVariable %_ptr_Function_v4float Function %5
+               OpStore %arg_1 %22
+               OpStore %arg_2 %uint_1
+         %30 = OpLoad %11 %arg_0
+         %32 = OpLoad %v2uint %arg_1
+         %33 = OpCompositeExtract %uint %32 0
+         %34 = OpCompositeExtract %uint %32 1
+         %35 = OpLoad %uint %arg_2
+         %36 = OpCompositeConstruct %v3uint %33 %34 %35
+         %29 = OpImageRead %v4float %30 %36
+               OpStore %res %29
+         %41 = OpAccessChain %_ptr_StorageBuffer_v4float %prevent_dce %uint_0
+         %42 = OpLoad %v4float %res
+               OpStore %41 %42
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %43
+         %45 = OpLabel
+         %46 = OpFunctionCall %void %textureLoad_06ac37
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %48 = OpLabel
+         %49 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %49
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %52 = OpLabel
+         %53 = OpFunctionCall %void %textureLoad_06ac37
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %55 = OpLabel
+         %56 = OpFunctionCall %void %textureLoad_06ac37
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/06ac37.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/06ac37.wgsl.expected.wgsl
new file mode 100644
index 0000000..275fc20
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/06ac37.wgsl.expected.wgsl
@@ -0,0 +1,28 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba32float, read>;
+
+fn textureLoad_06ac37() {
+  var arg_1 = vec2<u32>(1u);
+  var arg_2 = 1u;
+  var res : vec4<f32> = textureLoad(arg_0, arg_1, arg_2);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_06ac37();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_06ac37();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_06ac37();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/072e26.wgsl b/test/tint/builtins/gen/var/textureLoad/072e26.wgsl
new file mode 100644
index 0000000..b0ffa23
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/072e26.wgsl
@@ -0,0 +1,50 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba8snorm, read>;
+
+// fn textureLoad(texture: texture_storage_2d_array<rgba8snorm, read>, coords: vec2<i32>, array_index: i32) -> vec4<f32>
+fn textureLoad_072e26() {
+  var arg_1 = vec2<i32>(1i);
+  var arg_2 = 1i;
+  var res: vec4<f32> = textureLoad(arg_0, arg_1, arg_2);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_072e26();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_072e26();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_072e26();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/072e26.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/072e26.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..98c87d9
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/072e26.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_072e26() {
+  int2 arg_1 = (1).xx;
+  int arg_2 = 1;
+  float4 res = arg_0.Load(int4(int3(arg_1, arg_2), 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_072e26();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_072e26();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_072e26();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/072e26.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/072e26.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..98c87d9
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/072e26.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_072e26() {
+  int2 arg_1 = (1).xx;
+  int arg_2 = 1;
+  float4 res = arg_0.Load(int4(int3(arg_1, arg_2), 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_072e26();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_072e26();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_072e26();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/072e26.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/072e26.wgsl.expected.glsl
new file mode 100644
index 0000000..2c7830f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/072e26.wgsl.expected.glsl
@@ -0,0 +1,93 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba8_snorm) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_072e26() {
+  ivec2 arg_1 = ivec2(1);
+  int arg_2 = 1;
+  vec4 res = texelFetch(arg_0, ivec3(arg_1, arg_2));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_072e26();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8_snorm' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba8_snorm) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_072e26() {
+  ivec2 arg_1 = ivec2(1);
+  int arg_2 = 1;
+  vec4 res = texelFetch(arg_0, ivec3(arg_1, arg_2));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_072e26();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba8_snorm' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba8_snorm) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_072e26() {
+  ivec2 arg_1 = ivec2(1);
+  int arg_2 = 1;
+  vec4 res = texelFetch(arg_0, ivec3(arg_1, arg_2));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_072e26();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8_snorm' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/072e26.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/072e26.wgsl.expected.msl
new file mode 100644
index 0000000..6bc4a91
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/072e26.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_072e26(texture2d_array<float, access::read> tint_symbol_1, device float4* const tint_symbol_2) {
+  int2 arg_1 = int2(1);
+  int arg_2 = 1;
+  float4 res = tint_symbol_1.read(uint2(arg_1), arg_2);
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<float, access::read> tint_symbol_3, device float4* const tint_symbol_4) {
+  textureLoad_072e26(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<float, access::read> tint_symbol_5 [[texture(0)]], device float4* tint_symbol_6 [[buffer(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::read> tint_symbol_7 [[texture(0)]], device float4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_072e26(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<float, access::read> tint_symbol_9 [[texture(0)]], device float4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_072e26(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/072e26.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/072e26.wgsl.expected.spvasm
new file mode 100644
index 0000000..82f3392
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/072e26.wgsl.expected.spvasm
@@ -0,0 +1,108 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 58
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_072e26 "textureLoad_072e26"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 1 0 2 Rgba8Snorm
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+%prevent_dce_block = OpTypeStruct %v4float
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %v2int = OpTypeVector %int 2
+      %int_1 = OpConstant %int 1
+         %22 = OpConstantComposite %v2int %int_1 %int_1
+%_ptr_Function_v2int = OpTypePointer Function %v2int
+         %25 = OpConstantNull %v2int
+%_ptr_Function_int = OpTypePointer Function %int
+         %28 = OpConstantNull %int
+      %v3int = OpTypeVector %int 3
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+       %uint = OpTypeInt 32 0
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
+         %44 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_072e26 = OpFunction %void None %15
+         %18 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v2int Function %25
+      %arg_2 = OpVariable %_ptr_Function_int Function %28
+        %res = OpVariable %_ptr_Function_v4float Function %5
+               OpStore %arg_1 %22
+               OpStore %arg_2 %int_1
+         %30 = OpLoad %11 %arg_0
+         %32 = OpLoad %v2int %arg_1
+         %33 = OpCompositeExtract %int %32 0
+         %34 = OpCompositeExtract %int %32 1
+         %35 = OpLoad %int %arg_2
+         %36 = OpCompositeConstruct %v3int %33 %34 %35
+         %29 = OpImageRead %v4float %30 %36
+               OpStore %res %29
+         %42 = OpAccessChain %_ptr_StorageBuffer_v4float %prevent_dce %uint_0
+         %43 = OpLoad %v4float %res
+               OpStore %42 %43
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %44
+         %46 = OpLabel
+         %47 = OpFunctionCall %void %textureLoad_072e26
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %49 = OpLabel
+         %50 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %50
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %53 = OpLabel
+         %54 = OpFunctionCall %void %textureLoad_072e26
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %56 = OpLabel
+         %57 = OpFunctionCall %void %textureLoad_072e26
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/072e26.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/072e26.wgsl.expected.wgsl
new file mode 100644
index 0000000..5d55d07
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/072e26.wgsl.expected.wgsl
@@ -0,0 +1,28 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba8snorm, read>;
+
+fn textureLoad_072e26() {
+  var arg_1 = vec2<i32>(1i);
+  var arg_2 = 1i;
+  var res : vec4<f32> = textureLoad(arg_0, arg_1, arg_2);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_072e26();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_072e26();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_072e26();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/078bc4.wgsl b/test/tint/builtins/gen/var/textureLoad/078bc4.wgsl
new file mode 100644
index 0000000..7c770a0
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/078bc4.wgsl
@@ -0,0 +1,49 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d<rgba8snorm, read>;
+
+// fn textureLoad(texture: texture_storage_2d<rgba8snorm, read>, coords: vec2<i32>) -> vec4<f32>
+fn textureLoad_078bc4() {
+  var arg_1 = vec2<i32>(1i);
+  var res: vec4<f32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_078bc4();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_078bc4();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_078bc4();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/078bc4.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/078bc4.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..8c88105
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/078bc4.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture2D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_078bc4() {
+  int2 arg_1 = (1).xx;
+  float4 res = arg_0.Load(int3(arg_1, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_078bc4();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_078bc4();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_078bc4();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/078bc4.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/078bc4.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..8c88105
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/078bc4.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture2D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_078bc4() {
+  int2 arg_1 = (1).xx;
+  float4 res = arg_0.Load(int3(arg_1, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_078bc4();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_078bc4();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_078bc4();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/078bc4.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/078bc4.wgsl.expected.glsl
new file mode 100644
index 0000000..54c433c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/078bc4.wgsl.expected.glsl
@@ -0,0 +1,90 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba8_snorm) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_078bc4() {
+  ivec2 arg_1 = ivec2(1);
+  vec4 res = texelFetch(arg_0, arg_1);
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_078bc4();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8_snorm' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba8_snorm) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_078bc4() {
+  ivec2 arg_1 = ivec2(1);
+  vec4 res = texelFetch(arg_0, arg_1);
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_078bc4();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba8_snorm' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba8_snorm) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_078bc4() {
+  ivec2 arg_1 = ivec2(1);
+  vec4 res = texelFetch(arg_0, arg_1);
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_078bc4();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8_snorm' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/078bc4.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/078bc4.wgsl.expected.msl
new file mode 100644
index 0000000..d29b73b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/078bc4.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_078bc4(texture2d<float, access::read> tint_symbol_1, device float4* const tint_symbol_2) {
+  int2 arg_1 = int2(1);
+  float4 res = tint_symbol_1.read(uint2(arg_1));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<float, access::read> tint_symbol_3, device float4* const tint_symbol_4) {
+  textureLoad_078bc4(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<float, access::read> tint_symbol_5 [[texture(0)]], device float4* tint_symbol_6 [[buffer(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::read> tint_symbol_7 [[texture(0)]], device float4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_078bc4(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d<float, access::read> tint_symbol_9 [[texture(0)]], device float4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_078bc4(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/078bc4.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/078bc4.wgsl.expected.spvasm
new file mode 100644
index 0000000..a538db3
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/078bc4.wgsl.expected.spvasm
@@ -0,0 +1,98 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 50
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_078bc4 "textureLoad_078bc4"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 0 0 2 Rgba8Snorm
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+%prevent_dce_block = OpTypeStruct %v4float
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %v2int = OpTypeVector %int 2
+      %int_1 = OpConstant %int 1
+         %22 = OpConstantComposite %v2int %int_1 %int_1
+%_ptr_Function_v2int = OpTypePointer Function %v2int
+         %25 = OpConstantNull %v2int
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+       %uint = OpTypeInt 32 0
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
+         %36 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_078bc4 = OpFunction %void None %15
+         %18 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v2int Function %25
+        %res = OpVariable %_ptr_Function_v4float Function %5
+               OpStore %arg_1 %22
+         %27 = OpLoad %11 %arg_0
+         %28 = OpLoad %v2int %arg_1
+         %26 = OpImageRead %v4float %27 %28
+               OpStore %res %26
+         %34 = OpAccessChain %_ptr_StorageBuffer_v4float %prevent_dce %uint_0
+         %35 = OpLoad %v4float %res
+               OpStore %34 %35
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %36
+         %38 = OpLabel
+         %39 = OpFunctionCall %void %textureLoad_078bc4
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %41 = OpLabel
+         %42 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %42
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %45 = OpLabel
+         %46 = OpFunctionCall %void %textureLoad_078bc4
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %48 = OpLabel
+         %49 = OpFunctionCall %void %textureLoad_078bc4
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/078bc4.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/078bc4.wgsl.expected.wgsl
new file mode 100644
index 0000000..fe38fe1
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/078bc4.wgsl.expected.wgsl
@@ -0,0 +1,27 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d<rgba8snorm, read>;
+
+fn textureLoad_078bc4() {
+  var arg_1 = vec2<i32>(1i);
+  var res : vec4<f32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_078bc4();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_078bc4();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_078bc4();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/10db82.wgsl b/test/tint/builtins/gen/var/textureLoad/10db82.wgsl
new file mode 100644
index 0000000..cdf8aa0
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/10db82.wgsl
@@ -0,0 +1,50 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba16float, read>;
+
+// fn textureLoad(texture: texture_storage_2d_array<rgba16float, read>, coords: vec2<u32>, array_index: u32) -> vec4<f32>
+fn textureLoad_10db82() {
+  var arg_1 = vec2<u32>(1u);
+  var arg_2 = 1u;
+  var res: vec4<f32> = textureLoad(arg_0, arg_1, arg_2);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_10db82();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_10db82();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_10db82();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/10db82.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/10db82.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..2248d9c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/10db82.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_10db82() {
+  uint2 arg_1 = (1u).xx;
+  uint arg_2 = 1u;
+  float4 res = arg_0.Load(uint4(uint3(arg_1, arg_2), uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_10db82();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_10db82();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_10db82();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/10db82.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/10db82.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..2248d9c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/10db82.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_10db82() {
+  uint2 arg_1 = (1u).xx;
+  uint arg_2 = 1u;
+  float4 res = arg_0.Load(uint4(uint3(arg_1, arg_2), uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_10db82();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_10db82();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_10db82();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/10db82.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/10db82.wgsl.expected.glsl
new file mode 100644
index 0000000..af89dcc
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/10db82.wgsl.expected.glsl
@@ -0,0 +1,93 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba16f) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_10db82() {
+  uvec2 arg_1 = uvec2(1u);
+  uint arg_2 = 1u;
+  vec4 res = texelFetch(arg_0, ivec3(uvec3(arg_1, arg_2)));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_10db82();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba16f' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba16f) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_10db82() {
+  uvec2 arg_1 = uvec2(1u);
+  uint arg_2 = 1u;
+  vec4 res = texelFetch(arg_0, ivec3(uvec3(arg_1, arg_2)));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_10db82();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba16f' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba16f) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_10db82() {
+  uvec2 arg_1 = uvec2(1u);
+  uint arg_2 = 1u;
+  vec4 res = texelFetch(arg_0, ivec3(uvec3(arg_1, arg_2)));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_10db82();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba16f' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/10db82.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/10db82.wgsl.expected.msl
new file mode 100644
index 0000000..bb2db87
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/10db82.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_10db82(texture2d_array<float, access::read> tint_symbol_1, device float4* const tint_symbol_2) {
+  uint2 arg_1 = uint2(1u);
+  uint arg_2 = 1u;
+  float4 res = tint_symbol_1.read(uint2(arg_1), arg_2);
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<float, access::read> tint_symbol_3, device float4* const tint_symbol_4) {
+  textureLoad_10db82(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<float, access::read> tint_symbol_5 [[texture(0)]], device float4* tint_symbol_6 [[buffer(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::read> tint_symbol_7 [[texture(0)]], device float4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_10db82(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<float, access::read> tint_symbol_9 [[texture(0)]], device float4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_10db82(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/10db82.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/10db82.wgsl.expected.spvasm
new file mode 100644
index 0000000..297f557
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/10db82.wgsl.expected.spvasm
@@ -0,0 +1,107 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 57
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_10db82 "textureLoad_10db82"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 1 0 2 Rgba16f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+%prevent_dce_block = OpTypeStruct %v4float
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+     %uint_1 = OpConstant %uint 1
+         %22 = OpConstantComposite %v2uint %uint_1 %uint_1
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %25 = OpConstantNull %v2uint
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %28 = OpConstantNull %uint
+     %v3uint = OpTypeVector %uint 3
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
+         %43 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_10db82 = OpFunction %void None %15
+         %18 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v2uint Function %25
+      %arg_2 = OpVariable %_ptr_Function_uint Function %28
+        %res = OpVariable %_ptr_Function_v4float Function %5
+               OpStore %arg_1 %22
+               OpStore %arg_2 %uint_1
+         %30 = OpLoad %11 %arg_0
+         %32 = OpLoad %v2uint %arg_1
+         %33 = OpCompositeExtract %uint %32 0
+         %34 = OpCompositeExtract %uint %32 1
+         %35 = OpLoad %uint %arg_2
+         %36 = OpCompositeConstruct %v3uint %33 %34 %35
+         %29 = OpImageRead %v4float %30 %36
+               OpStore %res %29
+         %41 = OpAccessChain %_ptr_StorageBuffer_v4float %prevent_dce %uint_0
+         %42 = OpLoad %v4float %res
+               OpStore %41 %42
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %43
+         %45 = OpLabel
+         %46 = OpFunctionCall %void %textureLoad_10db82
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %48 = OpLabel
+         %49 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %49
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %52 = OpLabel
+         %53 = OpFunctionCall %void %textureLoad_10db82
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %55 = OpLabel
+         %56 = OpFunctionCall %void %textureLoad_10db82
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/10db82.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/10db82.wgsl.expected.wgsl
new file mode 100644
index 0000000..c35e50d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/10db82.wgsl.expected.wgsl
@@ -0,0 +1,28 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba16float, read>;
+
+fn textureLoad_10db82() {
+  var arg_1 = vec2<u32>(1u);
+  var arg_2 = 1u;
+  var res : vec4<f32> = textureLoad(arg_0, arg_1, arg_2);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_10db82();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_10db82();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_10db82();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/127e12.wgsl b/test/tint/builtins/gen/var/textureLoad/127e12.wgsl
new file mode 100644
index 0000000..d8daad6
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/127e12.wgsl
@@ -0,0 +1,50 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba16uint, read>;
+
+// fn textureLoad(texture: texture_storage_2d_array<rgba16uint, read>, coords: vec2<i32>, array_index: i32) -> vec4<u32>
+fn textureLoad_127e12() {
+  var arg_1 = vec2<i32>(1i);
+  var arg_2 = 1i;
+  var res: vec4<u32> = textureLoad(arg_0, arg_1, arg_2);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_127e12();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_127e12();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_127e12();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/127e12.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/127e12.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..fa45804
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/127e12.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_127e12() {
+  int2 arg_1 = (1).xx;
+  int arg_2 = 1;
+  uint4 res = arg_0.Load(int4(int3(arg_1, arg_2), 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_127e12();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_127e12();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_127e12();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/127e12.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/127e12.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..fa45804
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/127e12.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_127e12() {
+  int2 arg_1 = (1).xx;
+  int arg_2 = 1;
+  uint4 res = arg_0.Load(int4(int3(arg_1, arg_2), 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_127e12();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_127e12();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_127e12();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/127e12.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/127e12.wgsl.expected.glsl
new file mode 100644
index 0000000..76c349d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/127e12.wgsl.expected.glsl
@@ -0,0 +1,93 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba16ui) uniform highp uimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_127e12() {
+  ivec2 arg_1 = ivec2(1);
+  int arg_2 = 1;
+  uvec4 res = texelFetch(arg_0, ivec3(arg_1, arg_2));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_127e12();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba16ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba16ui) uniform highp uimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_127e12() {
+  ivec2 arg_1 = ivec2(1);
+  int arg_2 = 1;
+  uvec4 res = texelFetch(arg_0, ivec3(arg_1, arg_2));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_127e12();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba16ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba16ui) uniform highp uimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_127e12() {
+  ivec2 arg_1 = ivec2(1);
+  int arg_2 = 1;
+  uvec4 res = texelFetch(arg_0, ivec3(arg_1, arg_2));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_127e12();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba16ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/127e12.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/127e12.wgsl.expected.msl
new file mode 100644
index 0000000..9badaaa
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/127e12.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_127e12(texture2d_array<uint, access::read> tint_symbol_1, device uint4* const tint_symbol_2) {
+  int2 arg_1 = int2(1);
+  int arg_2 = 1;
+  uint4 res = tint_symbol_1.read(uint2(arg_1), arg_2);
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<uint, access::read> tint_symbol_3, device uint4* const tint_symbol_4) {
+  textureLoad_127e12(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<uint, access::read> tint_symbol_5 [[texture(0)]], device uint4* tint_symbol_6 [[buffer(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<uint, access::read> tint_symbol_7 [[texture(0)]], device uint4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_127e12(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<uint, access::read> tint_symbol_9 [[texture(0)]], device uint4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_127e12(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/127e12.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/127e12.wgsl.expected.spvasm
new file mode 100644
index 0000000..ed66b4e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/127e12.wgsl.expected.spvasm
@@ -0,0 +1,110 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 60
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_127e12 "textureLoad_127e12"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 2D 0 1 0 2 Rgba16ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+     %v4uint = OpTypeVector %uint 4
+%prevent_dce_block = OpTypeStruct %v4uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %v2int = OpTypeVector %int 2
+      %int_1 = OpConstant %int 1
+         %24 = OpConstantComposite %v2int %int_1 %int_1
+%_ptr_Function_v2int = OpTypePointer Function %v2int
+         %27 = OpConstantNull %v2int
+%_ptr_Function_int = OpTypePointer Function %int
+         %30 = OpConstantNull %int
+      %v3int = OpTypeVector %int 3
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+         %41 = OpConstantNull %v4uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4uint = OpTypePointer StorageBuffer %v4uint
+         %46 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_127e12 = OpFunction %void None %17
+         %20 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v2int Function %27
+      %arg_2 = OpVariable %_ptr_Function_int Function %30
+        %res = OpVariable %_ptr_Function_v4uint Function %41
+               OpStore %arg_1 %24
+               OpStore %arg_2 %int_1
+         %32 = OpLoad %11 %arg_0
+         %34 = OpLoad %v2int %arg_1
+         %35 = OpCompositeExtract %int %34 0
+         %36 = OpCompositeExtract %int %34 1
+         %37 = OpLoad %int %arg_2
+         %38 = OpCompositeConstruct %v3int %35 %36 %37
+         %31 = OpImageRead %v4uint %32 %38
+               OpStore %res %31
+         %44 = OpAccessChain %_ptr_StorageBuffer_v4uint %prevent_dce %uint_0
+         %45 = OpLoad %v4uint %res
+               OpStore %44 %45
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %46
+         %48 = OpLabel
+         %49 = OpFunctionCall %void %textureLoad_127e12
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %51 = OpLabel
+         %52 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %52
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %55 = OpLabel
+         %56 = OpFunctionCall %void %textureLoad_127e12
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %58 = OpLabel
+         %59 = OpFunctionCall %void %textureLoad_127e12
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/127e12.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/127e12.wgsl.expected.wgsl
new file mode 100644
index 0000000..b77c496
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/127e12.wgsl.expected.wgsl
@@ -0,0 +1,28 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba16uint, read>;
+
+fn textureLoad_127e12() {
+  var arg_1 = vec2<i32>(1i);
+  var arg_2 = 1i;
+  var res : vec4<u32> = textureLoad(arg_0, arg_1, arg_2);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_127e12();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_127e12();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_127e12();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/13d539.wgsl b/test/tint/builtins/gen/var/textureLoad/13d539.wgsl
new file mode 100644
index 0000000..0852176
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/13d539.wgsl
@@ -0,0 +1,50 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba16sint, read>;
+
+// fn textureLoad(texture: texture_storage_2d_array<rgba16sint, read>, coords: vec2<u32>, array_index: i32) -> vec4<i32>
+fn textureLoad_13d539() {
+  var arg_1 = vec2<u32>(1u);
+  var arg_2 = 1i;
+  var res: vec4<i32> = textureLoad(arg_0, arg_1, arg_2);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_13d539();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_13d539();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_13d539();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/13d539.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/13d539.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..80db9e9
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/13d539.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_13d539() {
+  uint2 arg_1 = (1u).xx;
+  int arg_2 = 1;
+  int4 res = arg_0.Load(uint4(uint3(arg_1, uint(arg_2)), uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_13d539();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_13d539();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_13d539();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/13d539.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/13d539.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..80db9e9
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/13d539.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_13d539() {
+  uint2 arg_1 = (1u).xx;
+  int arg_2 = 1;
+  int4 res = arg_0.Load(uint4(uint3(arg_1, uint(arg_2)), uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_13d539();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_13d539();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_13d539();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/13d539.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/13d539.wgsl.expected.glsl
new file mode 100644
index 0000000..86718c7
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/13d539.wgsl.expected.glsl
@@ -0,0 +1,93 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba16i) uniform highp iimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_13d539() {
+  uvec2 arg_1 = uvec2(1u);
+  int arg_2 = 1;
+  ivec4 res = texelFetch(arg_0, ivec3(uvec3(arg_1, uint(arg_2))));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_13d539();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba16i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba16i) uniform highp iimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_13d539() {
+  uvec2 arg_1 = uvec2(1u);
+  int arg_2 = 1;
+  ivec4 res = texelFetch(arg_0, ivec3(uvec3(arg_1, uint(arg_2))));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_13d539();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba16i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba16i) uniform highp iimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_13d539() {
+  uvec2 arg_1 = uvec2(1u);
+  int arg_2 = 1;
+  ivec4 res = texelFetch(arg_0, ivec3(uvec3(arg_1, uint(arg_2))));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_13d539();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba16i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/13d539.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/13d539.wgsl.expected.msl
new file mode 100644
index 0000000..eb4617f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/13d539.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_13d539(texture2d_array<int, access::read> tint_symbol_1, device int4* const tint_symbol_2) {
+  uint2 arg_1 = uint2(1u);
+  int arg_2 = 1;
+  int4 res = tint_symbol_1.read(uint2(arg_1), arg_2);
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<int, access::read> tint_symbol_3, device int4* const tint_symbol_4) {
+  textureLoad_13d539(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<int, access::read> tint_symbol_5 [[texture(0)]], device int4* tint_symbol_6 [[buffer(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<int, access::read> tint_symbol_7 [[texture(0)]], device int4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_13d539(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<int, access::read> tint_symbol_9 [[texture(0)]], device int4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_13d539(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/13d539.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/13d539.wgsl.expected.spvasm
new file mode 100644
index 0000000..0c7f7fa
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/13d539.wgsl.expected.spvasm
@@ -0,0 +1,112 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 62
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_13d539 "textureLoad_13d539"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 2D 0 1 0 2 Rgba16i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+      %v4int = OpTypeVector %int 4
+%prevent_dce_block = OpTypeStruct %v4int
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+     %uint_1 = OpConstant %uint 1
+         %24 = OpConstantComposite %v2uint %uint_1 %uint_1
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %27 = OpConstantNull %v2uint
+      %int_1 = OpConstant %int 1
+%_ptr_Function_int = OpTypePointer Function %int
+         %31 = OpConstantNull %int
+     %v3uint = OpTypeVector %uint 3
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+         %43 = OpConstantNull %v4int
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4int = OpTypePointer StorageBuffer %v4int
+         %48 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_13d539 = OpFunction %void None %17
+         %20 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v2uint Function %27
+      %arg_2 = OpVariable %_ptr_Function_int Function %31
+        %res = OpVariable %_ptr_Function_v4int Function %43
+               OpStore %arg_1 %24
+               OpStore %arg_2 %int_1
+         %33 = OpLoad %11 %arg_0
+         %35 = OpLoad %v2uint %arg_1
+         %36 = OpCompositeExtract %uint %35 0
+         %37 = OpCompositeExtract %uint %35 1
+         %39 = OpLoad %int %arg_2
+         %38 = OpBitcast %uint %39
+         %40 = OpCompositeConstruct %v3uint %36 %37 %38
+         %32 = OpImageRead %v4int %33 %40
+               OpStore %res %32
+         %46 = OpAccessChain %_ptr_StorageBuffer_v4int %prevent_dce %uint_0
+         %47 = OpLoad %v4int %res
+               OpStore %46 %47
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %48
+         %50 = OpLabel
+         %51 = OpFunctionCall %void %textureLoad_13d539
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %53 = OpLabel
+         %54 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %54
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %57 = OpLabel
+         %58 = OpFunctionCall %void %textureLoad_13d539
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %60 = OpLabel
+         %61 = OpFunctionCall %void %textureLoad_13d539
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/13d539.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/13d539.wgsl.expected.wgsl
new file mode 100644
index 0000000..f812040
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/13d539.wgsl.expected.wgsl
@@ -0,0 +1,28 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba16sint, read>;
+
+fn textureLoad_13d539() {
+  var arg_1 = vec2<u32>(1u);
+  var arg_2 = 1i;
+  var res : vec4<i32> = textureLoad(arg_0, arg_1, arg_2);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_13d539();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_13d539();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_13d539();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/13e90c.wgsl b/test/tint/builtins/gen/var/textureLoad/13e90c.wgsl
new file mode 100644
index 0000000..7166cdc
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/13e90c.wgsl
@@ -0,0 +1,50 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba16float, read>;
+
+// fn textureLoad(texture: texture_storage_2d_array<rgba16float, read>, coords: vec2<i32>, array_index: u32) -> vec4<f32>
+fn textureLoad_13e90c() {
+  var arg_1 = vec2<i32>(1i);
+  var arg_2 = 1u;
+  var res: vec4<f32> = textureLoad(arg_0, arg_1, arg_2);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_13e90c();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_13e90c();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_13e90c();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/13e90c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/13e90c.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..9ad46f8
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/13e90c.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_13e90c() {
+  int2 arg_1 = (1).xx;
+  uint arg_2 = 1u;
+  float4 res = arg_0.Load(int4(int3(arg_1, int(arg_2)), 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_13e90c();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_13e90c();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_13e90c();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/13e90c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/13e90c.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..9ad46f8
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/13e90c.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_13e90c() {
+  int2 arg_1 = (1).xx;
+  uint arg_2 = 1u;
+  float4 res = arg_0.Load(int4(int3(arg_1, int(arg_2)), 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_13e90c();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_13e90c();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_13e90c();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/13e90c.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/13e90c.wgsl.expected.glsl
new file mode 100644
index 0000000..087208d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/13e90c.wgsl.expected.glsl
@@ -0,0 +1,93 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba16f) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_13e90c() {
+  ivec2 arg_1 = ivec2(1);
+  uint arg_2 = 1u;
+  vec4 res = texelFetch(arg_0, ivec3(arg_1, int(arg_2)));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_13e90c();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba16f' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba16f) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_13e90c() {
+  ivec2 arg_1 = ivec2(1);
+  uint arg_2 = 1u;
+  vec4 res = texelFetch(arg_0, ivec3(arg_1, int(arg_2)));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_13e90c();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba16f' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba16f) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_13e90c() {
+  ivec2 arg_1 = ivec2(1);
+  uint arg_2 = 1u;
+  vec4 res = texelFetch(arg_0, ivec3(arg_1, int(arg_2)));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_13e90c();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba16f' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/13e90c.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/13e90c.wgsl.expected.msl
new file mode 100644
index 0000000..775261e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/13e90c.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_13e90c(texture2d_array<float, access::read> tint_symbol_1, device float4* const tint_symbol_2) {
+  int2 arg_1 = int2(1);
+  uint arg_2 = 1u;
+  float4 res = tint_symbol_1.read(uint2(arg_1), arg_2);
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<float, access::read> tint_symbol_3, device float4* const tint_symbol_4) {
+  textureLoad_13e90c(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<float, access::read> tint_symbol_5 [[texture(0)]], device float4* tint_symbol_6 [[buffer(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::read> tint_symbol_7 [[texture(0)]], device float4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_13e90c(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<float, access::read> tint_symbol_9 [[texture(0)]], device float4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_13e90c(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/13e90c.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/13e90c.wgsl.expected.spvasm
new file mode 100644
index 0000000..19d1ac1
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/13e90c.wgsl.expected.spvasm
@@ -0,0 +1,110 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 60
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_13e90c "textureLoad_13e90c"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 1 0 2 Rgba16f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+%prevent_dce_block = OpTypeStruct %v4float
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %v2int = OpTypeVector %int 2
+      %int_1 = OpConstant %int 1
+         %22 = OpConstantComposite %v2int %int_1 %int_1
+%_ptr_Function_v2int = OpTypePointer Function %v2int
+         %25 = OpConstantNull %v2int
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %30 = OpConstantNull %uint
+      %v3int = OpTypeVector %int 3
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
+         %46 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_13e90c = OpFunction %void None %15
+         %18 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v2int Function %25
+      %arg_2 = OpVariable %_ptr_Function_uint Function %30
+        %res = OpVariable %_ptr_Function_v4float Function %5
+               OpStore %arg_1 %22
+               OpStore %arg_2 %uint_1
+         %32 = OpLoad %11 %arg_0
+         %34 = OpLoad %v2int %arg_1
+         %35 = OpCompositeExtract %int %34 0
+         %36 = OpCompositeExtract %int %34 1
+         %38 = OpLoad %uint %arg_2
+         %37 = OpBitcast %int %38
+         %39 = OpCompositeConstruct %v3int %35 %36 %37
+         %31 = OpImageRead %v4float %32 %39
+               OpStore %res %31
+         %44 = OpAccessChain %_ptr_StorageBuffer_v4float %prevent_dce %uint_0
+         %45 = OpLoad %v4float %res
+               OpStore %44 %45
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %46
+         %48 = OpLabel
+         %49 = OpFunctionCall %void %textureLoad_13e90c
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %51 = OpLabel
+         %52 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %52
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %55 = OpLabel
+         %56 = OpFunctionCall %void %textureLoad_13e90c
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %58 = OpLabel
+         %59 = OpFunctionCall %void %textureLoad_13e90c
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/13e90c.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/13e90c.wgsl.expected.wgsl
new file mode 100644
index 0000000..038bfc2
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/13e90c.wgsl.expected.wgsl
@@ -0,0 +1,28 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba16float, read>;
+
+fn textureLoad_13e90c() {
+  var arg_1 = vec2<i32>(1i);
+  var arg_2 = 1u;
+  var res : vec4<f32> = textureLoad(arg_0, arg_1, arg_2);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_13e90c();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_13e90c();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_13e90c();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/143d84.wgsl b/test/tint/builtins/gen/var/textureLoad/143d84.wgsl
new file mode 100644
index 0000000..acaf602
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/143d84.wgsl
@@ -0,0 +1,50 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rg32float, read>;
+
+// fn textureLoad(texture: texture_storage_2d_array<rg32float, read>, coords: vec2<i32>, array_index: u32) -> vec4<f32>
+fn textureLoad_143d84() {
+  var arg_1 = vec2<i32>(1i);
+  var arg_2 = 1u;
+  var res: vec4<f32> = textureLoad(arg_0, arg_1, arg_2);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_143d84();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_143d84();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_143d84();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/143d84.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/143d84.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..1077d60
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/143d84.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_143d84() {
+  int2 arg_1 = (1).xx;
+  uint arg_2 = 1u;
+  float4 res = arg_0.Load(int4(int3(arg_1, int(arg_2)), 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_143d84();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_143d84();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_143d84();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/143d84.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/143d84.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..1077d60
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/143d84.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_143d84() {
+  int2 arg_1 = (1).xx;
+  uint arg_2 = 1u;
+  float4 res = arg_0.Load(int4(int3(arg_1, int(arg_2)), 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_143d84();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_143d84();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_143d84();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/143d84.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/143d84.wgsl.expected.glsl
new file mode 100644
index 0000000..d81f270
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/143d84.wgsl.expected.glsl
@@ -0,0 +1,96 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rg32f) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_143d84() {
+  ivec2 arg_1 = ivec2(1);
+  uint arg_2 = 1u;
+  vec4 res = texelFetch(arg_0, ivec3(arg_1, int(arg_2)));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_143d84();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rg32f) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_143d84() {
+  ivec2 arg_1 = ivec2(1);
+  uint arg_2 = 1u;
+  vec4 res = texelFetch(arg_0, ivec3(arg_1, int(arg_2)));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_143d84();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'image load-store format' : not supported with this profile: es
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rg32f) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_143d84() {
+  ivec2 arg_1 = ivec2(1);
+  uint arg_2 = 1u;
+  vec4 res = texelFetch(arg_0, ivec3(arg_1, int(arg_2)));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_143d84();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/143d84.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/143d84.wgsl.expected.msl
new file mode 100644
index 0000000..117525e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/143d84.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_143d84(texture2d_array<float, access::read> tint_symbol_1, device float4* const tint_symbol_2) {
+  int2 arg_1 = int2(1);
+  uint arg_2 = 1u;
+  float4 res = tint_symbol_1.read(uint2(arg_1), arg_2);
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<float, access::read> tint_symbol_3, device float4* const tint_symbol_4) {
+  textureLoad_143d84(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<float, access::read> tint_symbol_5 [[texture(0)]], device float4* tint_symbol_6 [[buffer(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::read> tint_symbol_7 [[texture(0)]], device float4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_143d84(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<float, access::read> tint_symbol_9 [[texture(0)]], device float4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_143d84(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/143d84.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/143d84.wgsl.expected.spvasm
new file mode 100644
index 0000000..c1a100f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/143d84.wgsl.expected.spvasm
@@ -0,0 +1,111 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 60
+; Schema: 0
+               OpCapability Shader
+               OpCapability StorageImageExtendedFormats
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_143d84 "textureLoad_143d84"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 1 0 2 Rg32f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+%prevent_dce_block = OpTypeStruct %v4float
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %v2int = OpTypeVector %int 2
+      %int_1 = OpConstant %int 1
+         %22 = OpConstantComposite %v2int %int_1 %int_1
+%_ptr_Function_v2int = OpTypePointer Function %v2int
+         %25 = OpConstantNull %v2int
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %30 = OpConstantNull %uint
+      %v3int = OpTypeVector %int 3
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
+         %46 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_143d84 = OpFunction %void None %15
+         %18 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v2int Function %25
+      %arg_2 = OpVariable %_ptr_Function_uint Function %30
+        %res = OpVariable %_ptr_Function_v4float Function %5
+               OpStore %arg_1 %22
+               OpStore %arg_2 %uint_1
+         %32 = OpLoad %11 %arg_0
+         %34 = OpLoad %v2int %arg_1
+         %35 = OpCompositeExtract %int %34 0
+         %36 = OpCompositeExtract %int %34 1
+         %38 = OpLoad %uint %arg_2
+         %37 = OpBitcast %int %38
+         %39 = OpCompositeConstruct %v3int %35 %36 %37
+         %31 = OpImageRead %v4float %32 %39
+               OpStore %res %31
+         %44 = OpAccessChain %_ptr_StorageBuffer_v4float %prevent_dce %uint_0
+         %45 = OpLoad %v4float %res
+               OpStore %44 %45
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %46
+         %48 = OpLabel
+         %49 = OpFunctionCall %void %textureLoad_143d84
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %51 = OpLabel
+         %52 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %52
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %55 = OpLabel
+         %56 = OpFunctionCall %void %textureLoad_143d84
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %58 = OpLabel
+         %59 = OpFunctionCall %void %textureLoad_143d84
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/143d84.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/143d84.wgsl.expected.wgsl
new file mode 100644
index 0000000..66184c4
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/143d84.wgsl.expected.wgsl
@@ -0,0 +1,28 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rg32float, read>;
+
+fn textureLoad_143d84() {
+  var arg_1 = vec2<i32>(1i);
+  var arg_2 = 1u;
+  var res : vec4<f32> = textureLoad(arg_0, arg_1, arg_2);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_143d84();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_143d84();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_143d84();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/1471b8.wgsl b/test/tint/builtins/gen/var/textureLoad/1471b8.wgsl
new file mode 100644
index 0000000..8f437a1
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/1471b8.wgsl
@@ -0,0 +1,50 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba32sint, read>;
+
+// fn textureLoad(texture: texture_storage_2d_array<rgba32sint, read>, coords: vec2<u32>, array_index: i32) -> vec4<i32>
+fn textureLoad_1471b8() {
+  var arg_1 = vec2<u32>(1u);
+  var arg_2 = 1i;
+  var res: vec4<i32> = textureLoad(arg_0, arg_1, arg_2);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_1471b8();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_1471b8();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_1471b8();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/1471b8.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/1471b8.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..b1515ba
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/1471b8.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_1471b8() {
+  uint2 arg_1 = (1u).xx;
+  int arg_2 = 1;
+  int4 res = arg_0.Load(uint4(uint3(arg_1, uint(arg_2)), uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_1471b8();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_1471b8();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_1471b8();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/1471b8.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/1471b8.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..b1515ba
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/1471b8.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_1471b8() {
+  uint2 arg_1 = (1u).xx;
+  int arg_2 = 1;
+  int4 res = arg_0.Load(uint4(uint3(arg_1, uint(arg_2)), uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_1471b8();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_1471b8();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_1471b8();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/1471b8.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/1471b8.wgsl.expected.glsl
new file mode 100644
index 0000000..3480352
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/1471b8.wgsl.expected.glsl
@@ -0,0 +1,93 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba32i) uniform highp iimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_1471b8() {
+  uvec2 arg_1 = uvec2(1u);
+  int arg_2 = 1;
+  ivec4 res = texelFetch(arg_0, ivec3(uvec3(arg_1, uint(arg_2))));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_1471b8();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba32i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba32i) uniform highp iimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_1471b8() {
+  uvec2 arg_1 = uvec2(1u);
+  int arg_2 = 1;
+  ivec4 res = texelFetch(arg_0, ivec3(uvec3(arg_1, uint(arg_2))));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_1471b8();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba32i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba32i) uniform highp iimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_1471b8() {
+  uvec2 arg_1 = uvec2(1u);
+  int arg_2 = 1;
+  ivec4 res = texelFetch(arg_0, ivec3(uvec3(arg_1, uint(arg_2))));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_1471b8();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba32i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/1471b8.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/1471b8.wgsl.expected.msl
new file mode 100644
index 0000000..dcfa978
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/1471b8.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_1471b8(texture2d_array<int, access::read> tint_symbol_1, device int4* const tint_symbol_2) {
+  uint2 arg_1 = uint2(1u);
+  int arg_2 = 1;
+  int4 res = tint_symbol_1.read(uint2(arg_1), arg_2);
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<int, access::read> tint_symbol_3, device int4* const tint_symbol_4) {
+  textureLoad_1471b8(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<int, access::read> tint_symbol_5 [[texture(0)]], device int4* tint_symbol_6 [[buffer(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<int, access::read> tint_symbol_7 [[texture(0)]], device int4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_1471b8(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<int, access::read> tint_symbol_9 [[texture(0)]], device int4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_1471b8(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/1471b8.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/1471b8.wgsl.expected.spvasm
new file mode 100644
index 0000000..0f39bda
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/1471b8.wgsl.expected.spvasm
@@ -0,0 +1,112 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 62
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_1471b8 "textureLoad_1471b8"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 2D 0 1 0 2 Rgba32i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+      %v4int = OpTypeVector %int 4
+%prevent_dce_block = OpTypeStruct %v4int
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+     %uint_1 = OpConstant %uint 1
+         %24 = OpConstantComposite %v2uint %uint_1 %uint_1
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %27 = OpConstantNull %v2uint
+      %int_1 = OpConstant %int 1
+%_ptr_Function_int = OpTypePointer Function %int
+         %31 = OpConstantNull %int
+     %v3uint = OpTypeVector %uint 3
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+         %43 = OpConstantNull %v4int
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4int = OpTypePointer StorageBuffer %v4int
+         %48 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_1471b8 = OpFunction %void None %17
+         %20 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v2uint Function %27
+      %arg_2 = OpVariable %_ptr_Function_int Function %31
+        %res = OpVariable %_ptr_Function_v4int Function %43
+               OpStore %arg_1 %24
+               OpStore %arg_2 %int_1
+         %33 = OpLoad %11 %arg_0
+         %35 = OpLoad %v2uint %arg_1
+         %36 = OpCompositeExtract %uint %35 0
+         %37 = OpCompositeExtract %uint %35 1
+         %39 = OpLoad %int %arg_2
+         %38 = OpBitcast %uint %39
+         %40 = OpCompositeConstruct %v3uint %36 %37 %38
+         %32 = OpImageRead %v4int %33 %40
+               OpStore %res %32
+         %46 = OpAccessChain %_ptr_StorageBuffer_v4int %prevent_dce %uint_0
+         %47 = OpLoad %v4int %res
+               OpStore %46 %47
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %48
+         %50 = OpLabel
+         %51 = OpFunctionCall %void %textureLoad_1471b8
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %53 = OpLabel
+         %54 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %54
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %57 = OpLabel
+         %58 = OpFunctionCall %void %textureLoad_1471b8
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %60 = OpLabel
+         %61 = OpFunctionCall %void %textureLoad_1471b8
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/1471b8.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/1471b8.wgsl.expected.wgsl
new file mode 100644
index 0000000..c720575
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/1471b8.wgsl.expected.wgsl
@@ -0,0 +1,28 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba32sint, read>;
+
+fn textureLoad_1471b8() {
+  var arg_1 = vec2<u32>(1u);
+  var arg_2 = 1i;
+  var res : vec4<i32> = textureLoad(arg_0, arg_1, arg_2);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_1471b8();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_1471b8();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_1471b8();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/1561a7.wgsl b/test/tint/builtins/gen/var/textureLoad/1561a7.wgsl
new file mode 100644
index 0000000..4046257
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/1561a7.wgsl
@@ -0,0 +1,49 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_1d<r32uint, read>;
+
+// fn textureLoad(texture: texture_storage_1d<r32uint, read>, coords: i32) -> vec4<u32>
+fn textureLoad_1561a7() {
+  var arg_1 = 1i;
+  var res: vec4<u32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_1561a7();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_1561a7();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_1561a7();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/1561a7.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/1561a7.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..799ea46
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/1561a7.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture1D<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_1561a7() {
+  int arg_1 = 1;
+  uint4 res = arg_0.Load(int2(arg_1, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_1561a7();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_1561a7();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_1561a7();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/1561a7.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/1561a7.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..799ea46
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/1561a7.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture1D<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_1561a7() {
+  int arg_1 = 1;
+  uint4 res = arg_0.Load(int2(arg_1, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_1561a7();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_1561a7();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_1561a7();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/1561a7.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/1561a7.wgsl.expected.glsl
new file mode 100644
index 0000000..f5e8719
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/1561a7.wgsl.expected.glsl
@@ -0,0 +1,96 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(r32ui) uniform highp uimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_1561a7() {
+  int arg_1 = 1;
+  uvec4 res = texelFetch(arg_0, ivec2(arg_1, 0));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_1561a7();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:10: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:10: '=' :  cannot convert from ' const float' to ' temp highp 4-component vector of uint'
+ERROR: 0:10: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(r32ui) uniform highp uimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_1561a7() {
+  int arg_1 = 1;
+  uvec4 res = texelFetch(arg_0, ivec2(arg_1, 0));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_1561a7();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:11: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:11: '=' :  cannot convert from ' const float' to ' temp mediump 4-component vector of uint'
+ERROR: 0:11: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(r32ui) uniform highp uimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_1561a7() {
+  int arg_1 = 1;
+  uvec4 res = texelFetch(arg_0, ivec2(arg_1, 0));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_1561a7();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:10: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:10: '=' :  cannot convert from ' const float' to ' temp highp 4-component vector of uint'
+ERROR: 0:10: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/1561a7.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/1561a7.wgsl.expected.msl
new file mode 100644
index 0000000..792b4e4
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/1561a7.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_1561a7(texture1d<uint, access::read> tint_symbol_1, device uint4* const tint_symbol_2) {
+  int arg_1 = 1;
+  uint4 res = tint_symbol_1.read(uint(arg_1));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<uint, access::read> tint_symbol_3, device uint4* const tint_symbol_4) {
+  textureLoad_1561a7(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<uint, access::read> tint_symbol_5 [[texture(0)]], device uint4* tint_symbol_6 [[buffer(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(texture1d<uint, access::read> tint_symbol_7 [[texture(0)]], device uint4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_1561a7(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture1d<uint, access::read> tint_symbol_9 [[texture(0)]], device uint4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_1561a7(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/1561a7.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/1561a7.wgsl.expected.spvasm
new file mode 100644
index 0000000..61c07f3
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/1561a7.wgsl.expected.spvasm
@@ -0,0 +1,99 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 50
+; Schema: 0
+               OpCapability Shader
+               OpCapability Image1D
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_1561a7 "textureLoad_1561a7"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 1D 0 0 0 2 R32ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+     %v4uint = OpTypeVector %uint 4
+%prevent_dce_block = OpTypeStruct %v4uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %int_1 = OpConstant %int 1
+%_ptr_Function_int = OpTypePointer Function %int
+         %25 = OpConstantNull %int
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+         %31 = OpConstantNull %v4uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4uint = OpTypePointer StorageBuffer %v4uint
+         %36 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_1561a7 = OpFunction %void None %17
+         %20 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_int Function %25
+        %res = OpVariable %_ptr_Function_v4uint Function %31
+               OpStore %arg_1 %int_1
+         %27 = OpLoad %11 %arg_0
+         %28 = OpLoad %int %arg_1
+         %26 = OpImageRead %v4uint %27 %28
+               OpStore %res %26
+         %34 = OpAccessChain %_ptr_StorageBuffer_v4uint %prevent_dce %uint_0
+         %35 = OpLoad %v4uint %res
+               OpStore %34 %35
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %36
+         %38 = OpLabel
+         %39 = OpFunctionCall %void %textureLoad_1561a7
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %41 = OpLabel
+         %42 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %42
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %45 = OpLabel
+         %46 = OpFunctionCall %void %textureLoad_1561a7
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %48 = OpLabel
+         %49 = OpFunctionCall %void %textureLoad_1561a7
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/1561a7.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/1561a7.wgsl.expected.wgsl
new file mode 100644
index 0000000..45e5031
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/1561a7.wgsl.expected.wgsl
@@ -0,0 +1,27 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_1d<r32uint, read>;
+
+fn textureLoad_1561a7() {
+  var arg_1 = 1i;
+  var res : vec4<u32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_1561a7();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_1561a7();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_1561a7();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/15e675.wgsl b/test/tint/builtins/gen/var/textureLoad/15e675.wgsl
new file mode 100644
index 0000000..0e2d17f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/15e675.wgsl
@@ -0,0 +1,50 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba8uint, read>;
+
+// fn textureLoad(texture: texture_storage_2d_array<rgba8uint, read>, coords: vec2<u32>, array_index: i32) -> vec4<u32>
+fn textureLoad_15e675() {
+  var arg_1 = vec2<u32>(1u);
+  var arg_2 = 1i;
+  var res: vec4<u32> = textureLoad(arg_0, arg_1, arg_2);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_15e675();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_15e675();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_15e675();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/15e675.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/15e675.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..07cc715
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/15e675.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_15e675() {
+  uint2 arg_1 = (1u).xx;
+  int arg_2 = 1;
+  uint4 res = arg_0.Load(uint4(uint3(arg_1, uint(arg_2)), uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_15e675();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_15e675();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_15e675();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/15e675.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/15e675.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..07cc715
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/15e675.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_15e675() {
+  uint2 arg_1 = (1u).xx;
+  int arg_2 = 1;
+  uint4 res = arg_0.Load(uint4(uint3(arg_1, uint(arg_2)), uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_15e675();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_15e675();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_15e675();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/15e675.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/15e675.wgsl.expected.glsl
new file mode 100644
index 0000000..35f3129
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/15e675.wgsl.expected.glsl
@@ -0,0 +1,93 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba8ui) uniform highp uimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_15e675() {
+  uvec2 arg_1 = uvec2(1u);
+  int arg_2 = 1;
+  uvec4 res = texelFetch(arg_0, ivec3(uvec3(arg_1, uint(arg_2))));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_15e675();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba8ui) uniform highp uimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_15e675() {
+  uvec2 arg_1 = uvec2(1u);
+  int arg_2 = 1;
+  uvec4 res = texelFetch(arg_0, ivec3(uvec3(arg_1, uint(arg_2))));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_15e675();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba8ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba8ui) uniform highp uimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_15e675() {
+  uvec2 arg_1 = uvec2(1u);
+  int arg_2 = 1;
+  uvec4 res = texelFetch(arg_0, ivec3(uvec3(arg_1, uint(arg_2))));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_15e675();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/15e675.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/15e675.wgsl.expected.msl
new file mode 100644
index 0000000..3b0e10b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/15e675.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_15e675(texture2d_array<uint, access::read> tint_symbol_1, device uint4* const tint_symbol_2) {
+  uint2 arg_1 = uint2(1u);
+  int arg_2 = 1;
+  uint4 res = tint_symbol_1.read(uint2(arg_1), arg_2);
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<uint, access::read> tint_symbol_3, device uint4* const tint_symbol_4) {
+  textureLoad_15e675(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<uint, access::read> tint_symbol_5 [[texture(0)]], device uint4* tint_symbol_6 [[buffer(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<uint, access::read> tint_symbol_7 [[texture(0)]], device uint4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_15e675(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<uint, access::read> tint_symbol_9 [[texture(0)]], device uint4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_15e675(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/15e675.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/15e675.wgsl.expected.spvasm
new file mode 100644
index 0000000..454fea2
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/15e675.wgsl.expected.spvasm
@@ -0,0 +1,112 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 62
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_15e675 "textureLoad_15e675"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 2D 0 1 0 2 Rgba8ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+     %v4uint = OpTypeVector %uint 4
+%prevent_dce_block = OpTypeStruct %v4uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+     %v2uint = OpTypeVector %uint 2
+     %uint_1 = OpConstant %uint 1
+         %23 = OpConstantComposite %v2uint %uint_1 %uint_1
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %26 = OpConstantNull %v2uint
+        %int = OpTypeInt 32 1
+      %int_1 = OpConstant %int 1
+%_ptr_Function_int = OpTypePointer Function %int
+         %31 = OpConstantNull %int
+     %v3uint = OpTypeVector %uint 3
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+         %43 = OpConstantNull %v4uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4uint = OpTypePointer StorageBuffer %v4uint
+         %48 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_15e675 = OpFunction %void None %17
+         %20 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v2uint Function %26
+      %arg_2 = OpVariable %_ptr_Function_int Function %31
+        %res = OpVariable %_ptr_Function_v4uint Function %43
+               OpStore %arg_1 %23
+               OpStore %arg_2 %int_1
+         %33 = OpLoad %11 %arg_0
+         %35 = OpLoad %v2uint %arg_1
+         %36 = OpCompositeExtract %uint %35 0
+         %37 = OpCompositeExtract %uint %35 1
+         %39 = OpLoad %int %arg_2
+         %38 = OpBitcast %uint %39
+         %40 = OpCompositeConstruct %v3uint %36 %37 %38
+         %32 = OpImageRead %v4uint %33 %40
+               OpStore %res %32
+         %46 = OpAccessChain %_ptr_StorageBuffer_v4uint %prevent_dce %uint_0
+         %47 = OpLoad %v4uint %res
+               OpStore %46 %47
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %48
+         %50 = OpLabel
+         %51 = OpFunctionCall %void %textureLoad_15e675
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %53 = OpLabel
+         %54 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %54
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %57 = OpLabel
+         %58 = OpFunctionCall %void %textureLoad_15e675
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %60 = OpLabel
+         %61 = OpFunctionCall %void %textureLoad_15e675
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/15e675.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/15e675.wgsl.expected.wgsl
new file mode 100644
index 0000000..540db91
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/15e675.wgsl.expected.wgsl
@@ -0,0 +1,28 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba8uint, read>;
+
+fn textureLoad_15e675() {
+  var arg_1 = vec2<u32>(1u);
+  var arg_2 = 1i;
+  var res : vec4<u32> = textureLoad(arg_0, arg_1, arg_2);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_15e675();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_15e675();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_15e675();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/18ac11.wgsl b/test/tint/builtins/gen/var/textureLoad/18ac11.wgsl
new file mode 100644
index 0000000..abc9201
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/18ac11.wgsl
@@ -0,0 +1,49 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_1d<rg32sint, read>;
+
+// fn textureLoad(texture: texture_storage_1d<rg32sint, read>, coords: u32) -> vec4<i32>
+fn textureLoad_18ac11() {
+  var arg_1 = 1u;
+  var res: vec4<i32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_18ac11();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_18ac11();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_18ac11();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/18ac11.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/18ac11.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..c6101cb
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/18ac11.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture1D<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_18ac11() {
+  uint arg_1 = 1u;
+  int4 res = arg_0.Load(uint2(arg_1, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_18ac11();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_18ac11();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_18ac11();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/18ac11.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/18ac11.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..c6101cb
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/18ac11.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture1D<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_18ac11() {
+  uint arg_1 = 1u;
+  int4 res = arg_0.Load(uint2(arg_1, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_18ac11();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_18ac11();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_18ac11();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/18ac11.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/18ac11.wgsl.expected.glsl
new file mode 100644
index 0000000..d4573d2
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/18ac11.wgsl.expected.glsl
@@ -0,0 +1,93 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rg32i) uniform highp iimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_18ac11() {
+  uint arg_1 = 1u;
+  ivec4 res = texelFetch(arg_0, ivec2(uvec2(arg_1, 0u)));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_18ac11();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rg32i) uniform highp iimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_18ac11() {
+  uint arg_1 = 1u;
+  ivec4 res = texelFetch(arg_0, ivec2(uvec2(arg_1, 0u)));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_18ac11();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'image load-store format' : not supported with this profile: es
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rg32i) uniform highp iimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_18ac11() {
+  uint arg_1 = 1u;
+  ivec4 res = texelFetch(arg_0, ivec2(uvec2(arg_1, 0u)));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_18ac11();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/18ac11.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/18ac11.wgsl.expected.msl
new file mode 100644
index 0000000..2aa48c5
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/18ac11.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_18ac11(texture1d<int, access::read> tint_symbol_1, device int4* const tint_symbol_2) {
+  uint arg_1 = 1u;
+  int4 res = tint_symbol_1.read(uint(arg_1));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<int, access::read> tint_symbol_3, device int4* const tint_symbol_4) {
+  textureLoad_18ac11(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<int, access::read> tint_symbol_5 [[texture(0)]], device int4* tint_symbol_6 [[buffer(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(texture1d<int, access::read> tint_symbol_7 [[texture(0)]], device int4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_18ac11(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture1d<int, access::read> tint_symbol_9 [[texture(0)]], device int4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_18ac11(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/18ac11.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/18ac11.wgsl.expected.spvasm
new file mode 100644
index 0000000..d180d23
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/18ac11.wgsl.expected.spvasm
@@ -0,0 +1,100 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 50
+; Schema: 0
+               OpCapability Shader
+               OpCapability Image1D
+               OpCapability StorageImageExtendedFormats
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_18ac11 "textureLoad_18ac11"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 1D 0 0 0 2 Rg32i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+      %v4int = OpTypeVector %int 4
+%prevent_dce_block = OpTypeStruct %v4int
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %25 = OpConstantNull %uint
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+         %31 = OpConstantNull %v4int
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4int = OpTypePointer StorageBuffer %v4int
+         %36 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_18ac11 = OpFunction %void None %17
+         %20 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_uint Function %25
+        %res = OpVariable %_ptr_Function_v4int Function %31
+               OpStore %arg_1 %uint_1
+         %27 = OpLoad %11 %arg_0
+         %28 = OpLoad %uint %arg_1
+         %26 = OpImageRead %v4int %27 %28
+               OpStore %res %26
+         %34 = OpAccessChain %_ptr_StorageBuffer_v4int %prevent_dce %uint_0
+         %35 = OpLoad %v4int %res
+               OpStore %34 %35
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %36
+         %38 = OpLabel
+         %39 = OpFunctionCall %void %textureLoad_18ac11
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %41 = OpLabel
+         %42 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %42
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %45 = OpLabel
+         %46 = OpFunctionCall %void %textureLoad_18ac11
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %48 = OpLabel
+         %49 = OpFunctionCall %void %textureLoad_18ac11
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/18ac11.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/18ac11.wgsl.expected.wgsl
new file mode 100644
index 0000000..01a7bfa
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/18ac11.wgsl.expected.wgsl
@@ -0,0 +1,27 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_1d<rg32sint, read>;
+
+fn textureLoad_18ac11() {
+  var arg_1 = 1u;
+  var res : vec4<i32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_18ac11();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_18ac11();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_18ac11();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/1a062f.wgsl b/test/tint/builtins/gen/var/textureLoad/1a062f.wgsl
new file mode 100644
index 0000000..ab1c042
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/1a062f.wgsl
@@ -0,0 +1,50 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba16float, read>;
+
+// fn textureLoad(texture: texture_storage_2d_array<rgba16float, read>, coords: vec2<i32>, array_index: i32) -> vec4<f32>
+fn textureLoad_1a062f() {
+  var arg_1 = vec2<i32>(1i);
+  var arg_2 = 1i;
+  var res: vec4<f32> = textureLoad(arg_0, arg_1, arg_2);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_1a062f();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_1a062f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_1a062f();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/1a062f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/1a062f.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..203809a
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/1a062f.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_1a062f() {
+  int2 arg_1 = (1).xx;
+  int arg_2 = 1;
+  float4 res = arg_0.Load(int4(int3(arg_1, arg_2), 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_1a062f();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_1a062f();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_1a062f();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/1a062f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/1a062f.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..203809a
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/1a062f.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_1a062f() {
+  int2 arg_1 = (1).xx;
+  int arg_2 = 1;
+  float4 res = arg_0.Load(int4(int3(arg_1, arg_2), 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_1a062f();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_1a062f();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_1a062f();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/1a062f.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/1a062f.wgsl.expected.glsl
new file mode 100644
index 0000000..59c2036
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/1a062f.wgsl.expected.glsl
@@ -0,0 +1,93 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba16f) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_1a062f() {
+  ivec2 arg_1 = ivec2(1);
+  int arg_2 = 1;
+  vec4 res = texelFetch(arg_0, ivec3(arg_1, arg_2));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_1a062f();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba16f' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba16f) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_1a062f() {
+  ivec2 arg_1 = ivec2(1);
+  int arg_2 = 1;
+  vec4 res = texelFetch(arg_0, ivec3(arg_1, arg_2));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_1a062f();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba16f' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba16f) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_1a062f() {
+  ivec2 arg_1 = ivec2(1);
+  int arg_2 = 1;
+  vec4 res = texelFetch(arg_0, ivec3(arg_1, arg_2));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_1a062f();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba16f' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/1a062f.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/1a062f.wgsl.expected.msl
new file mode 100644
index 0000000..6fd4e63
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/1a062f.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_1a062f(texture2d_array<float, access::read> tint_symbol_1, device float4* const tint_symbol_2) {
+  int2 arg_1 = int2(1);
+  int arg_2 = 1;
+  float4 res = tint_symbol_1.read(uint2(arg_1), arg_2);
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<float, access::read> tint_symbol_3, device float4* const tint_symbol_4) {
+  textureLoad_1a062f(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<float, access::read> tint_symbol_5 [[texture(0)]], device float4* tint_symbol_6 [[buffer(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::read> tint_symbol_7 [[texture(0)]], device float4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_1a062f(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<float, access::read> tint_symbol_9 [[texture(0)]], device float4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_1a062f(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/1a062f.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/1a062f.wgsl.expected.spvasm
new file mode 100644
index 0000000..e8c3955
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/1a062f.wgsl.expected.spvasm
@@ -0,0 +1,108 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 58
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_1a062f "textureLoad_1a062f"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 1 0 2 Rgba16f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+%prevent_dce_block = OpTypeStruct %v4float
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %v2int = OpTypeVector %int 2
+      %int_1 = OpConstant %int 1
+         %22 = OpConstantComposite %v2int %int_1 %int_1
+%_ptr_Function_v2int = OpTypePointer Function %v2int
+         %25 = OpConstantNull %v2int
+%_ptr_Function_int = OpTypePointer Function %int
+         %28 = OpConstantNull %int
+      %v3int = OpTypeVector %int 3
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+       %uint = OpTypeInt 32 0
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
+         %44 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_1a062f = OpFunction %void None %15
+         %18 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v2int Function %25
+      %arg_2 = OpVariable %_ptr_Function_int Function %28
+        %res = OpVariable %_ptr_Function_v4float Function %5
+               OpStore %arg_1 %22
+               OpStore %arg_2 %int_1
+         %30 = OpLoad %11 %arg_0
+         %32 = OpLoad %v2int %arg_1
+         %33 = OpCompositeExtract %int %32 0
+         %34 = OpCompositeExtract %int %32 1
+         %35 = OpLoad %int %arg_2
+         %36 = OpCompositeConstruct %v3int %33 %34 %35
+         %29 = OpImageRead %v4float %30 %36
+               OpStore %res %29
+         %42 = OpAccessChain %_ptr_StorageBuffer_v4float %prevent_dce %uint_0
+         %43 = OpLoad %v4float %res
+               OpStore %42 %43
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %44
+         %46 = OpLabel
+         %47 = OpFunctionCall %void %textureLoad_1a062f
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %49 = OpLabel
+         %50 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %50
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %53 = OpLabel
+         %54 = OpFunctionCall %void %textureLoad_1a062f
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %56 = OpLabel
+         %57 = OpFunctionCall %void %textureLoad_1a062f
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/1a062f.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/1a062f.wgsl.expected.wgsl
new file mode 100644
index 0000000..e1130fc
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/1a062f.wgsl.expected.wgsl
@@ -0,0 +1,28 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba16float, read>;
+
+fn textureLoad_1a062f() {
+  var arg_1 = vec2<i32>(1i);
+  var arg_2 = 1i;
+  var res : vec4<f32> = textureLoad(arg_0, arg_1, arg_2);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_1a062f();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_1a062f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_1a062f();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/1a8452.wgsl b/test/tint/builtins/gen/var/textureLoad/1a8452.wgsl
new file mode 100644
index 0000000..fecb509
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/1a8452.wgsl
@@ -0,0 +1,49 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_1d<rgba8uint, read>;
+
+// fn textureLoad(texture: texture_storage_1d<rgba8uint, read>, coords: i32) -> vec4<u32>
+fn textureLoad_1a8452() {
+  var arg_1 = 1i;
+  var res: vec4<u32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_1a8452();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_1a8452();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_1a8452();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/1a8452.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/1a8452.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..6790d3f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/1a8452.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture1D<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_1a8452() {
+  int arg_1 = 1;
+  uint4 res = arg_0.Load(int2(arg_1, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_1a8452();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_1a8452();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_1a8452();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/1a8452.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/1a8452.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..6790d3f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/1a8452.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture1D<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_1a8452() {
+  int arg_1 = 1;
+  uint4 res = arg_0.Load(int2(arg_1, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_1a8452();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_1a8452();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_1a8452();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/1a8452.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/1a8452.wgsl.expected.glsl
new file mode 100644
index 0000000..435c19d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/1a8452.wgsl.expected.glsl
@@ -0,0 +1,90 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba8ui) uniform highp uimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_1a8452() {
+  int arg_1 = 1;
+  uvec4 res = texelFetch(arg_0, ivec2(arg_1, 0));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_1a8452();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba8ui) uniform highp uimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_1a8452() {
+  int arg_1 = 1;
+  uvec4 res = texelFetch(arg_0, ivec2(arg_1, 0));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_1a8452();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba8ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba8ui) uniform highp uimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_1a8452() {
+  int arg_1 = 1;
+  uvec4 res = texelFetch(arg_0, ivec2(arg_1, 0));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_1a8452();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/1a8452.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/1a8452.wgsl.expected.msl
new file mode 100644
index 0000000..34f1944
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/1a8452.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_1a8452(texture1d<uint, access::read> tint_symbol_1, device uint4* const tint_symbol_2) {
+  int arg_1 = 1;
+  uint4 res = tint_symbol_1.read(uint(arg_1));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<uint, access::read> tint_symbol_3, device uint4* const tint_symbol_4) {
+  textureLoad_1a8452(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<uint, access::read> tint_symbol_5 [[texture(0)]], device uint4* tint_symbol_6 [[buffer(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(texture1d<uint, access::read> tint_symbol_7 [[texture(0)]], device uint4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_1a8452(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture1d<uint, access::read> tint_symbol_9 [[texture(0)]], device uint4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_1a8452(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/1a8452.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/1a8452.wgsl.expected.spvasm
new file mode 100644
index 0000000..b67e0b4
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/1a8452.wgsl.expected.spvasm
@@ -0,0 +1,99 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 50
+; Schema: 0
+               OpCapability Shader
+               OpCapability Image1D
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_1a8452 "textureLoad_1a8452"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 1D 0 0 0 2 Rgba8ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+     %v4uint = OpTypeVector %uint 4
+%prevent_dce_block = OpTypeStruct %v4uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %int_1 = OpConstant %int 1
+%_ptr_Function_int = OpTypePointer Function %int
+         %25 = OpConstantNull %int
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+         %31 = OpConstantNull %v4uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4uint = OpTypePointer StorageBuffer %v4uint
+         %36 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_1a8452 = OpFunction %void None %17
+         %20 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_int Function %25
+        %res = OpVariable %_ptr_Function_v4uint Function %31
+               OpStore %arg_1 %int_1
+         %27 = OpLoad %11 %arg_0
+         %28 = OpLoad %int %arg_1
+         %26 = OpImageRead %v4uint %27 %28
+               OpStore %res %26
+         %34 = OpAccessChain %_ptr_StorageBuffer_v4uint %prevent_dce %uint_0
+         %35 = OpLoad %v4uint %res
+               OpStore %34 %35
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %36
+         %38 = OpLabel
+         %39 = OpFunctionCall %void %textureLoad_1a8452
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %41 = OpLabel
+         %42 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %42
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %45 = OpLabel
+         %46 = OpFunctionCall %void %textureLoad_1a8452
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %48 = OpLabel
+         %49 = OpFunctionCall %void %textureLoad_1a8452
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/1a8452.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/1a8452.wgsl.expected.wgsl
new file mode 100644
index 0000000..f7928cc
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/1a8452.wgsl.expected.wgsl
@@ -0,0 +1,27 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_1d<rgba8uint, read>;
+
+fn textureLoad_1a8452() {
+  var arg_1 = 1i;
+  var res : vec4<u32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_1a8452();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_1a8452();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_1a8452();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/1aa950.wgsl b/test/tint/builtins/gen/var/textureLoad/1aa950.wgsl
new file mode 100644
index 0000000..ac2053f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/1aa950.wgsl
@@ -0,0 +1,50 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba32sint, read>;
+
+// fn textureLoad(texture: texture_storage_2d_array<rgba32sint, read>, coords: vec2<i32>, array_index: u32) -> vec4<i32>
+fn textureLoad_1aa950() {
+  var arg_1 = vec2<i32>(1i);
+  var arg_2 = 1u;
+  var res: vec4<i32> = textureLoad(arg_0, arg_1, arg_2);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_1aa950();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_1aa950();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_1aa950();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/1aa950.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/1aa950.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..5ea1c84
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/1aa950.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_1aa950() {
+  int2 arg_1 = (1).xx;
+  uint arg_2 = 1u;
+  int4 res = arg_0.Load(int4(int3(arg_1, int(arg_2)), 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_1aa950();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_1aa950();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_1aa950();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/1aa950.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/1aa950.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..5ea1c84
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/1aa950.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_1aa950() {
+  int2 arg_1 = (1).xx;
+  uint arg_2 = 1u;
+  int4 res = arg_0.Load(int4(int3(arg_1, int(arg_2)), 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_1aa950();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_1aa950();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_1aa950();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/1aa950.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/1aa950.wgsl.expected.glsl
new file mode 100644
index 0000000..39515ef
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/1aa950.wgsl.expected.glsl
@@ -0,0 +1,93 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba32i) uniform highp iimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_1aa950() {
+  ivec2 arg_1 = ivec2(1);
+  uint arg_2 = 1u;
+  ivec4 res = texelFetch(arg_0, ivec3(arg_1, int(arg_2)));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_1aa950();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba32i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba32i) uniform highp iimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_1aa950() {
+  ivec2 arg_1 = ivec2(1);
+  uint arg_2 = 1u;
+  ivec4 res = texelFetch(arg_0, ivec3(arg_1, int(arg_2)));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_1aa950();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba32i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba32i) uniform highp iimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_1aa950() {
+  ivec2 arg_1 = ivec2(1);
+  uint arg_2 = 1u;
+  ivec4 res = texelFetch(arg_0, ivec3(arg_1, int(arg_2)));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_1aa950();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba32i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/1aa950.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/1aa950.wgsl.expected.msl
new file mode 100644
index 0000000..ec94620
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/1aa950.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_1aa950(texture2d_array<int, access::read> tint_symbol_1, device int4* const tint_symbol_2) {
+  int2 arg_1 = int2(1);
+  uint arg_2 = 1u;
+  int4 res = tint_symbol_1.read(uint2(arg_1), arg_2);
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<int, access::read> tint_symbol_3, device int4* const tint_symbol_4) {
+  textureLoad_1aa950(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<int, access::read> tint_symbol_5 [[texture(0)]], device int4* tint_symbol_6 [[buffer(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<int, access::read> tint_symbol_7 [[texture(0)]], device int4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_1aa950(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<int, access::read> tint_symbol_9 [[texture(0)]], device int4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_1aa950(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/1aa950.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/1aa950.wgsl.expected.spvasm
new file mode 100644
index 0000000..7eeb278
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/1aa950.wgsl.expected.spvasm
@@ -0,0 +1,112 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 62
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_1aa950 "textureLoad_1aa950"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 2D 0 1 0 2 Rgba32i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+      %v4int = OpTypeVector %int 4
+%prevent_dce_block = OpTypeStruct %v4int
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+      %v2int = OpTypeVector %int 2
+      %int_1 = OpConstant %int 1
+         %23 = OpConstantComposite %v2int %int_1 %int_1
+%_ptr_Function_v2int = OpTypePointer Function %v2int
+         %26 = OpConstantNull %v2int
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %31 = OpConstantNull %uint
+      %v3int = OpTypeVector %int 3
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+         %43 = OpConstantNull %v4int
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4int = OpTypePointer StorageBuffer %v4int
+         %48 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_1aa950 = OpFunction %void None %17
+         %20 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v2int Function %26
+      %arg_2 = OpVariable %_ptr_Function_uint Function %31
+        %res = OpVariable %_ptr_Function_v4int Function %43
+               OpStore %arg_1 %23
+               OpStore %arg_2 %uint_1
+         %33 = OpLoad %11 %arg_0
+         %35 = OpLoad %v2int %arg_1
+         %36 = OpCompositeExtract %int %35 0
+         %37 = OpCompositeExtract %int %35 1
+         %39 = OpLoad %uint %arg_2
+         %38 = OpBitcast %int %39
+         %40 = OpCompositeConstruct %v3int %36 %37 %38
+         %32 = OpImageRead %v4int %33 %40
+               OpStore %res %32
+         %46 = OpAccessChain %_ptr_StorageBuffer_v4int %prevent_dce %uint_0
+         %47 = OpLoad %v4int %res
+               OpStore %46 %47
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %48
+         %50 = OpLabel
+         %51 = OpFunctionCall %void %textureLoad_1aa950
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %53 = OpLabel
+         %54 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %54
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %57 = OpLabel
+         %58 = OpFunctionCall %void %textureLoad_1aa950
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %60 = OpLabel
+         %61 = OpFunctionCall %void %textureLoad_1aa950
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/1aa950.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/1aa950.wgsl.expected.wgsl
new file mode 100644
index 0000000..3453f40
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/1aa950.wgsl.expected.wgsl
@@ -0,0 +1,28 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba32sint, read>;
+
+fn textureLoad_1aa950() {
+  var arg_1 = vec2<i32>(1i);
+  var arg_2 = 1u;
+  var res : vec4<i32> = textureLoad(arg_0, arg_1, arg_2);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_1aa950();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_1aa950();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_1aa950();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/1eb93f.wgsl b/test/tint/builtins/gen/var/textureLoad/1eb93f.wgsl
new file mode 100644
index 0000000..985a232
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/1eb93f.wgsl
@@ -0,0 +1,49 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d<rg32float, read>;
+
+// fn textureLoad(texture: texture_storage_2d<rg32float, read>, coords: vec2<u32>) -> vec4<f32>
+fn textureLoad_1eb93f() {
+  var arg_1 = vec2<u32>(1u);
+  var res: vec4<f32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_1eb93f();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_1eb93f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_1eb93f();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/1eb93f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/1eb93f.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..ca2f86e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/1eb93f.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture2D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_1eb93f() {
+  uint2 arg_1 = (1u).xx;
+  float4 res = arg_0.Load(uint3(arg_1, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_1eb93f();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_1eb93f();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_1eb93f();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/1eb93f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/1eb93f.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..ca2f86e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/1eb93f.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture2D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_1eb93f() {
+  uint2 arg_1 = (1u).xx;
+  float4 res = arg_0.Load(uint3(arg_1, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_1eb93f();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_1eb93f();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_1eb93f();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/1eb93f.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/1eb93f.wgsl.expected.glsl
new file mode 100644
index 0000000..6af7cf0
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/1eb93f.wgsl.expected.glsl
@@ -0,0 +1,93 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rg32f) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_1eb93f() {
+  uvec2 arg_1 = uvec2(1u);
+  vec4 res = texelFetch(arg_0, ivec2(arg_1));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_1eb93f();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rg32f) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_1eb93f() {
+  uvec2 arg_1 = uvec2(1u);
+  vec4 res = texelFetch(arg_0, ivec2(arg_1));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_1eb93f();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'image load-store format' : not supported with this profile: es
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rg32f) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_1eb93f() {
+  uvec2 arg_1 = uvec2(1u);
+  vec4 res = texelFetch(arg_0, ivec2(arg_1));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_1eb93f();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/1eb93f.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/1eb93f.wgsl.expected.msl
new file mode 100644
index 0000000..db418dd
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/1eb93f.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_1eb93f(texture2d<float, access::read> tint_symbol_1, device float4* const tint_symbol_2) {
+  uint2 arg_1 = uint2(1u);
+  float4 res = tint_symbol_1.read(uint2(arg_1));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<float, access::read> tint_symbol_3, device float4* const tint_symbol_4) {
+  textureLoad_1eb93f(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<float, access::read> tint_symbol_5 [[texture(0)]], device float4* tint_symbol_6 [[buffer(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::read> tint_symbol_7 [[texture(0)]], device float4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_1eb93f(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d<float, access::read> tint_symbol_9 [[texture(0)]], device float4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_1eb93f(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/1eb93f.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/1eb93f.wgsl.expected.spvasm
new file mode 100644
index 0000000..f599c7d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/1eb93f.wgsl.expected.spvasm
@@ -0,0 +1,98 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 49
+; Schema: 0
+               OpCapability Shader
+               OpCapability StorageImageExtendedFormats
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_1eb93f "textureLoad_1eb93f"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 0 0 2 Rg32f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+%prevent_dce_block = OpTypeStruct %v4float
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+     %uint_1 = OpConstant %uint 1
+         %22 = OpConstantComposite %v2uint %uint_1 %uint_1
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %25 = OpConstantNull %v2uint
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
+         %35 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_1eb93f = OpFunction %void None %15
+         %18 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v2uint Function %25
+        %res = OpVariable %_ptr_Function_v4float Function %5
+               OpStore %arg_1 %22
+         %27 = OpLoad %11 %arg_0
+         %28 = OpLoad %v2uint %arg_1
+         %26 = OpImageRead %v4float %27 %28
+               OpStore %res %26
+         %33 = OpAccessChain %_ptr_StorageBuffer_v4float %prevent_dce %uint_0
+         %34 = OpLoad %v4float %res
+               OpStore %33 %34
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %35
+         %37 = OpLabel
+         %38 = OpFunctionCall %void %textureLoad_1eb93f
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %40 = OpLabel
+         %41 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %41
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %44 = OpLabel
+         %45 = OpFunctionCall %void %textureLoad_1eb93f
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %47 = OpLabel
+         %48 = OpFunctionCall %void %textureLoad_1eb93f
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/1eb93f.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/1eb93f.wgsl.expected.wgsl
new file mode 100644
index 0000000..6ee5e1f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/1eb93f.wgsl.expected.wgsl
@@ -0,0 +1,27 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d<rg32float, read>;
+
+fn textureLoad_1eb93f() {
+  var arg_1 = vec2<u32>(1u);
+  var res : vec4<f32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_1eb93f();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_1eb93f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_1eb93f();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/206a08.wgsl b/test/tint/builtins/gen/var/textureLoad/206a08.wgsl
new file mode 100644
index 0000000..3f76d67
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/206a08.wgsl
@@ -0,0 +1,49 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_1d<rgba8uint, read>;
+
+// fn textureLoad(texture: texture_storage_1d<rgba8uint, read>, coords: u32) -> vec4<u32>
+fn textureLoad_206a08() {
+  var arg_1 = 1u;
+  var res: vec4<u32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_206a08();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_206a08();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_206a08();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/206a08.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/206a08.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..25aba09
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/206a08.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture1D<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_206a08() {
+  uint arg_1 = 1u;
+  uint4 res = arg_0.Load(uint2(arg_1, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_206a08();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_206a08();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_206a08();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/206a08.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/206a08.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..25aba09
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/206a08.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture1D<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_206a08() {
+  uint arg_1 = 1u;
+  uint4 res = arg_0.Load(uint2(arg_1, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_206a08();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_206a08();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_206a08();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/206a08.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/206a08.wgsl.expected.glsl
new file mode 100644
index 0000000..697d21e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/206a08.wgsl.expected.glsl
@@ -0,0 +1,90 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba8ui) uniform highp uimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_206a08() {
+  uint arg_1 = 1u;
+  uvec4 res = texelFetch(arg_0, ivec2(uvec2(arg_1, 0u)));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_206a08();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba8ui) uniform highp uimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_206a08() {
+  uint arg_1 = 1u;
+  uvec4 res = texelFetch(arg_0, ivec2(uvec2(arg_1, 0u)));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_206a08();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba8ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba8ui) uniform highp uimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_206a08() {
+  uint arg_1 = 1u;
+  uvec4 res = texelFetch(arg_0, ivec2(uvec2(arg_1, 0u)));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_206a08();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/206a08.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/206a08.wgsl.expected.msl
new file mode 100644
index 0000000..7f857e5
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/206a08.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_206a08(texture1d<uint, access::read> tint_symbol_1, device uint4* const tint_symbol_2) {
+  uint arg_1 = 1u;
+  uint4 res = tint_symbol_1.read(uint(arg_1));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<uint, access::read> tint_symbol_3, device uint4* const tint_symbol_4) {
+  textureLoad_206a08(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<uint, access::read> tint_symbol_5 [[texture(0)]], device uint4* tint_symbol_6 [[buffer(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(texture1d<uint, access::read> tint_symbol_7 [[texture(0)]], device uint4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_206a08(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture1d<uint, access::read> tint_symbol_9 [[texture(0)]], device uint4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_206a08(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/206a08.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/206a08.wgsl.expected.spvasm
new file mode 100644
index 0000000..a1fa960
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/206a08.wgsl.expected.spvasm
@@ -0,0 +1,98 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 49
+; Schema: 0
+               OpCapability Shader
+               OpCapability Image1D
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_206a08 "textureLoad_206a08"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 1D 0 0 0 2 Rgba8ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+     %v4uint = OpTypeVector %uint 4
+%prevent_dce_block = OpTypeStruct %v4uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %24 = OpConstantNull %uint
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+         %30 = OpConstantNull %v4uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4uint = OpTypePointer StorageBuffer %v4uint
+         %35 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_206a08 = OpFunction %void None %17
+         %20 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_uint Function %24
+        %res = OpVariable %_ptr_Function_v4uint Function %30
+               OpStore %arg_1 %uint_1
+         %26 = OpLoad %11 %arg_0
+         %27 = OpLoad %uint %arg_1
+         %25 = OpImageRead %v4uint %26 %27
+               OpStore %res %25
+         %33 = OpAccessChain %_ptr_StorageBuffer_v4uint %prevent_dce %uint_0
+         %34 = OpLoad %v4uint %res
+               OpStore %33 %34
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %35
+         %37 = OpLabel
+         %38 = OpFunctionCall %void %textureLoad_206a08
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %40 = OpLabel
+         %41 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %41
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %44 = OpLabel
+         %45 = OpFunctionCall %void %textureLoad_206a08
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %47 = OpLabel
+         %48 = OpFunctionCall %void %textureLoad_206a08
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/206a08.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/206a08.wgsl.expected.wgsl
new file mode 100644
index 0000000..610727d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/206a08.wgsl.expected.wgsl
@@ -0,0 +1,27 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_1d<rgba8uint, read>;
+
+fn textureLoad_206a08() {
+  var arg_1 = 1u;
+  var res : vec4<u32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_206a08();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_206a08();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_206a08();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/20fa2f.wgsl b/test/tint/builtins/gen/var/textureLoad/20fa2f.wgsl
new file mode 100644
index 0000000..d06dbe7
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/20fa2f.wgsl
@@ -0,0 +1,50 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rg32float, read>;
+
+// fn textureLoad(texture: texture_storage_2d_array<rg32float, read>, coords: vec2<i32>, array_index: i32) -> vec4<f32>
+fn textureLoad_20fa2f() {
+  var arg_1 = vec2<i32>(1i);
+  var arg_2 = 1i;
+  var res: vec4<f32> = textureLoad(arg_0, arg_1, arg_2);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_20fa2f();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_20fa2f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_20fa2f();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/20fa2f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/20fa2f.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..bfc52eb
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/20fa2f.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_20fa2f() {
+  int2 arg_1 = (1).xx;
+  int arg_2 = 1;
+  float4 res = arg_0.Load(int4(int3(arg_1, arg_2), 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_20fa2f();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_20fa2f();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_20fa2f();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/20fa2f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/20fa2f.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..bfc52eb
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/20fa2f.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_20fa2f() {
+  int2 arg_1 = (1).xx;
+  int arg_2 = 1;
+  float4 res = arg_0.Load(int4(int3(arg_1, arg_2), 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_20fa2f();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_20fa2f();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_20fa2f();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/20fa2f.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/20fa2f.wgsl.expected.glsl
new file mode 100644
index 0000000..0337b81
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/20fa2f.wgsl.expected.glsl
@@ -0,0 +1,96 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rg32f) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_20fa2f() {
+  ivec2 arg_1 = ivec2(1);
+  int arg_2 = 1;
+  vec4 res = texelFetch(arg_0, ivec3(arg_1, arg_2));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_20fa2f();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rg32f) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_20fa2f() {
+  ivec2 arg_1 = ivec2(1);
+  int arg_2 = 1;
+  vec4 res = texelFetch(arg_0, ivec3(arg_1, arg_2));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_20fa2f();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'image load-store format' : not supported with this profile: es
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rg32f) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_20fa2f() {
+  ivec2 arg_1 = ivec2(1);
+  int arg_2 = 1;
+  vec4 res = texelFetch(arg_0, ivec3(arg_1, arg_2));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_20fa2f();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/20fa2f.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/20fa2f.wgsl.expected.msl
new file mode 100644
index 0000000..3d16870
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/20fa2f.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_20fa2f(texture2d_array<float, access::read> tint_symbol_1, device float4* const tint_symbol_2) {
+  int2 arg_1 = int2(1);
+  int arg_2 = 1;
+  float4 res = tint_symbol_1.read(uint2(arg_1), arg_2);
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<float, access::read> tint_symbol_3, device float4* const tint_symbol_4) {
+  textureLoad_20fa2f(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<float, access::read> tint_symbol_5 [[texture(0)]], device float4* tint_symbol_6 [[buffer(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::read> tint_symbol_7 [[texture(0)]], device float4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_20fa2f(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<float, access::read> tint_symbol_9 [[texture(0)]], device float4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_20fa2f(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/20fa2f.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/20fa2f.wgsl.expected.spvasm
new file mode 100644
index 0000000..548d0d7
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/20fa2f.wgsl.expected.spvasm
@@ -0,0 +1,109 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 58
+; Schema: 0
+               OpCapability Shader
+               OpCapability StorageImageExtendedFormats
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_20fa2f "textureLoad_20fa2f"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 1 0 2 Rg32f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+%prevent_dce_block = OpTypeStruct %v4float
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %v2int = OpTypeVector %int 2
+      %int_1 = OpConstant %int 1
+         %22 = OpConstantComposite %v2int %int_1 %int_1
+%_ptr_Function_v2int = OpTypePointer Function %v2int
+         %25 = OpConstantNull %v2int
+%_ptr_Function_int = OpTypePointer Function %int
+         %28 = OpConstantNull %int
+      %v3int = OpTypeVector %int 3
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+       %uint = OpTypeInt 32 0
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
+         %44 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_20fa2f = OpFunction %void None %15
+         %18 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v2int Function %25
+      %arg_2 = OpVariable %_ptr_Function_int Function %28
+        %res = OpVariable %_ptr_Function_v4float Function %5
+               OpStore %arg_1 %22
+               OpStore %arg_2 %int_1
+         %30 = OpLoad %11 %arg_0
+         %32 = OpLoad %v2int %arg_1
+         %33 = OpCompositeExtract %int %32 0
+         %34 = OpCompositeExtract %int %32 1
+         %35 = OpLoad %int %arg_2
+         %36 = OpCompositeConstruct %v3int %33 %34 %35
+         %29 = OpImageRead %v4float %30 %36
+               OpStore %res %29
+         %42 = OpAccessChain %_ptr_StorageBuffer_v4float %prevent_dce %uint_0
+         %43 = OpLoad %v4float %res
+               OpStore %42 %43
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %44
+         %46 = OpLabel
+         %47 = OpFunctionCall %void %textureLoad_20fa2f
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %49 = OpLabel
+         %50 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %50
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %53 = OpLabel
+         %54 = OpFunctionCall %void %textureLoad_20fa2f
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %56 = OpLabel
+         %57 = OpFunctionCall %void %textureLoad_20fa2f
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/20fa2f.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/20fa2f.wgsl.expected.wgsl
new file mode 100644
index 0000000..c0e61e7
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/20fa2f.wgsl.expected.wgsl
@@ -0,0 +1,28 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rg32float, read>;
+
+fn textureLoad_20fa2f() {
+  var arg_1 = vec2<i32>(1i);
+  var arg_2 = 1i;
+  var res : vec4<f32> = textureLoad(arg_0, arg_1, arg_2);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_20fa2f();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_20fa2f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_20fa2f();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/22e963.wgsl b/test/tint/builtins/gen/var/textureLoad/22e963.wgsl
new file mode 100644
index 0000000..48bf86f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/22e963.wgsl
@@ -0,0 +1,50 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<r32uint, read>;
+
+// fn textureLoad(texture: texture_storage_2d_array<r32uint, read>, coords: vec2<u32>, array_index: u32) -> vec4<u32>
+fn textureLoad_22e963() {
+  var arg_1 = vec2<u32>(1u);
+  var arg_2 = 1u;
+  var res: vec4<u32> = textureLoad(arg_0, arg_1, arg_2);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_22e963();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_22e963();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_22e963();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/22e963.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/22e963.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..3d50b46
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/22e963.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_22e963() {
+  uint2 arg_1 = (1u).xx;
+  uint arg_2 = 1u;
+  uint4 res = arg_0.Load(uint4(uint3(arg_1, arg_2), uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_22e963();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_22e963();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_22e963();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/22e963.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/22e963.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..3d50b46
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/22e963.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_22e963() {
+  uint2 arg_1 = (1u).xx;
+  uint arg_2 = 1u;
+  uint4 res = arg_0.Load(uint4(uint3(arg_1, arg_2), uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_22e963();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_22e963();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_22e963();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/22e963.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/22e963.wgsl.expected.glsl
new file mode 100644
index 0000000..d97783c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/22e963.wgsl.expected.glsl
@@ -0,0 +1,99 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(r32ui) uniform highp uimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_22e963() {
+  uvec2 arg_1 = uvec2(1u);
+  uint arg_2 = 1u;
+  uvec4 res = texelFetch(arg_0, ivec3(uvec3(arg_1, arg_2)));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_22e963();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:11: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:11: '=' :  cannot convert from ' const float' to ' temp highp 4-component vector of uint'
+ERROR: 0:11: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(r32ui) uniform highp uimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_22e963() {
+  uvec2 arg_1 = uvec2(1u);
+  uint arg_2 = 1u;
+  uvec4 res = texelFetch(arg_0, ivec3(uvec3(arg_1, arg_2)));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_22e963();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:12: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:12: '=' :  cannot convert from ' const float' to ' temp mediump 4-component vector of uint'
+ERROR: 0:12: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(r32ui) uniform highp uimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_22e963() {
+  uvec2 arg_1 = uvec2(1u);
+  uint arg_2 = 1u;
+  uvec4 res = texelFetch(arg_0, ivec3(uvec3(arg_1, arg_2)));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_22e963();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:11: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:11: '=' :  cannot convert from ' const float' to ' temp highp 4-component vector of uint'
+ERROR: 0:11: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/22e963.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/22e963.wgsl.expected.msl
new file mode 100644
index 0000000..699755f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/22e963.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_22e963(texture2d_array<uint, access::read> tint_symbol_1, device uint4* const tint_symbol_2) {
+  uint2 arg_1 = uint2(1u);
+  uint arg_2 = 1u;
+  uint4 res = tint_symbol_1.read(uint2(arg_1), arg_2);
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<uint, access::read> tint_symbol_3, device uint4* const tint_symbol_4) {
+  textureLoad_22e963(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<uint, access::read> tint_symbol_5 [[texture(0)]], device uint4* tint_symbol_6 [[buffer(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<uint, access::read> tint_symbol_7 [[texture(0)]], device uint4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_22e963(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<uint, access::read> tint_symbol_9 [[texture(0)]], device uint4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_22e963(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/22e963.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/22e963.wgsl.expected.spvasm
new file mode 100644
index 0000000..53ded92
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/22e963.wgsl.expected.spvasm
@@ -0,0 +1,109 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 59
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_22e963 "textureLoad_22e963"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 2D 0 1 0 2 R32ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+     %v4uint = OpTypeVector %uint 4
+%prevent_dce_block = OpTypeStruct %v4uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+     %v2uint = OpTypeVector %uint 2
+     %uint_1 = OpConstant %uint 1
+         %23 = OpConstantComposite %v2uint %uint_1 %uint_1
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %26 = OpConstantNull %v2uint
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %29 = OpConstantNull %uint
+     %v3uint = OpTypeVector %uint 3
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+         %40 = OpConstantNull %v4uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4uint = OpTypePointer StorageBuffer %v4uint
+         %45 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_22e963 = OpFunction %void None %17
+         %20 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v2uint Function %26
+      %arg_2 = OpVariable %_ptr_Function_uint Function %29
+        %res = OpVariable %_ptr_Function_v4uint Function %40
+               OpStore %arg_1 %23
+               OpStore %arg_2 %uint_1
+         %31 = OpLoad %11 %arg_0
+         %33 = OpLoad %v2uint %arg_1
+         %34 = OpCompositeExtract %uint %33 0
+         %35 = OpCompositeExtract %uint %33 1
+         %36 = OpLoad %uint %arg_2
+         %37 = OpCompositeConstruct %v3uint %34 %35 %36
+         %30 = OpImageRead %v4uint %31 %37
+               OpStore %res %30
+         %43 = OpAccessChain %_ptr_StorageBuffer_v4uint %prevent_dce %uint_0
+         %44 = OpLoad %v4uint %res
+               OpStore %43 %44
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %45
+         %47 = OpLabel
+         %48 = OpFunctionCall %void %textureLoad_22e963
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %50 = OpLabel
+         %51 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %51
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %54 = OpLabel
+         %55 = OpFunctionCall %void %textureLoad_22e963
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %57 = OpLabel
+         %58 = OpFunctionCall %void %textureLoad_22e963
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/22e963.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/22e963.wgsl.expected.wgsl
new file mode 100644
index 0000000..59daf6b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/22e963.wgsl.expected.wgsl
@@ -0,0 +1,28 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<r32uint, read>;
+
+fn textureLoad_22e963() {
+  var arg_1 = vec2<u32>(1u);
+  var arg_2 = 1u;
+  var res : vec4<u32> = textureLoad(arg_0, arg_1, arg_2);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_22e963();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_22e963();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_22e963();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/23007a.wgsl b/test/tint/builtins/gen/var/textureLoad/23007a.wgsl
new file mode 100644
index 0000000..a97a90d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/23007a.wgsl
@@ -0,0 +1,50 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rg32float, read>;
+
+// fn textureLoad(texture: texture_storage_2d_array<rg32float, read>, coords: vec2<u32>, array_index: i32) -> vec4<f32>
+fn textureLoad_23007a() {
+  var arg_1 = vec2<u32>(1u);
+  var arg_2 = 1i;
+  var res: vec4<f32> = textureLoad(arg_0, arg_1, arg_2);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_23007a();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_23007a();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_23007a();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/23007a.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/23007a.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..1dc9c82
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/23007a.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_23007a() {
+  uint2 arg_1 = (1u).xx;
+  int arg_2 = 1;
+  float4 res = arg_0.Load(uint4(uint3(arg_1, uint(arg_2)), uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_23007a();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_23007a();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_23007a();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/23007a.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/23007a.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..1dc9c82
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/23007a.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_23007a() {
+  uint2 arg_1 = (1u).xx;
+  int arg_2 = 1;
+  float4 res = arg_0.Load(uint4(uint3(arg_1, uint(arg_2)), uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_23007a();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_23007a();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_23007a();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/23007a.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/23007a.wgsl.expected.glsl
new file mode 100644
index 0000000..0034f12
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/23007a.wgsl.expected.glsl
@@ -0,0 +1,96 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rg32f) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_23007a() {
+  uvec2 arg_1 = uvec2(1u);
+  int arg_2 = 1;
+  vec4 res = texelFetch(arg_0, ivec3(uvec3(arg_1, uint(arg_2))));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_23007a();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rg32f) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_23007a() {
+  uvec2 arg_1 = uvec2(1u);
+  int arg_2 = 1;
+  vec4 res = texelFetch(arg_0, ivec3(uvec3(arg_1, uint(arg_2))));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_23007a();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'image load-store format' : not supported with this profile: es
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rg32f) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_23007a() {
+  uvec2 arg_1 = uvec2(1u);
+  int arg_2 = 1;
+  vec4 res = texelFetch(arg_0, ivec3(uvec3(arg_1, uint(arg_2))));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_23007a();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/23007a.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/23007a.wgsl.expected.msl
new file mode 100644
index 0000000..0aa55a6
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/23007a.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_23007a(texture2d_array<float, access::read> tint_symbol_1, device float4* const tint_symbol_2) {
+  uint2 arg_1 = uint2(1u);
+  int arg_2 = 1;
+  float4 res = tint_symbol_1.read(uint2(arg_1), arg_2);
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<float, access::read> tint_symbol_3, device float4* const tint_symbol_4) {
+  textureLoad_23007a(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<float, access::read> tint_symbol_5 [[texture(0)]], device float4* tint_symbol_6 [[buffer(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::read> tint_symbol_7 [[texture(0)]], device float4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_23007a(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<float, access::read> tint_symbol_9 [[texture(0)]], device float4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_23007a(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/23007a.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/23007a.wgsl.expected.spvasm
new file mode 100644
index 0000000..786bbf6
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/23007a.wgsl.expected.spvasm
@@ -0,0 +1,111 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 60
+; Schema: 0
+               OpCapability Shader
+               OpCapability StorageImageExtendedFormats
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_23007a "textureLoad_23007a"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 1 0 2 Rg32f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+%prevent_dce_block = OpTypeStruct %v4float
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+     %uint_1 = OpConstant %uint 1
+         %22 = OpConstantComposite %v2uint %uint_1 %uint_1
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %25 = OpConstantNull %v2uint
+        %int = OpTypeInt 32 1
+      %int_1 = OpConstant %int 1
+%_ptr_Function_int = OpTypePointer Function %int
+         %30 = OpConstantNull %int
+     %v3uint = OpTypeVector %uint 3
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
+         %46 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_23007a = OpFunction %void None %15
+         %18 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v2uint Function %25
+      %arg_2 = OpVariable %_ptr_Function_int Function %30
+        %res = OpVariable %_ptr_Function_v4float Function %5
+               OpStore %arg_1 %22
+               OpStore %arg_2 %int_1
+         %32 = OpLoad %11 %arg_0
+         %34 = OpLoad %v2uint %arg_1
+         %35 = OpCompositeExtract %uint %34 0
+         %36 = OpCompositeExtract %uint %34 1
+         %38 = OpLoad %int %arg_2
+         %37 = OpBitcast %uint %38
+         %39 = OpCompositeConstruct %v3uint %35 %36 %37
+         %31 = OpImageRead %v4float %32 %39
+               OpStore %res %31
+         %44 = OpAccessChain %_ptr_StorageBuffer_v4float %prevent_dce %uint_0
+         %45 = OpLoad %v4float %res
+               OpStore %44 %45
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %46
+         %48 = OpLabel
+         %49 = OpFunctionCall %void %textureLoad_23007a
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %51 = OpLabel
+         %52 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %52
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %55 = OpLabel
+         %56 = OpFunctionCall %void %textureLoad_23007a
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %58 = OpLabel
+         %59 = OpFunctionCall %void %textureLoad_23007a
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/23007a.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/23007a.wgsl.expected.wgsl
new file mode 100644
index 0000000..cc9c615
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/23007a.wgsl.expected.wgsl
@@ -0,0 +1,28 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rg32float, read>;
+
+fn textureLoad_23007a() {
+  var arg_1 = vec2<u32>(1u);
+  var arg_2 = 1i;
+  var res : vec4<f32> = textureLoad(arg_0, arg_1, arg_2);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_23007a();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_23007a();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_23007a();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/23ff89.wgsl b/test/tint/builtins/gen/var/textureLoad/23ff89.wgsl
new file mode 100644
index 0000000..e192e4f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/23ff89.wgsl
@@ -0,0 +1,50 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba16uint, read>;
+
+// fn textureLoad(texture: texture_storage_2d_array<rgba16uint, read>, coords: vec2<u32>, array_index: u32) -> vec4<u32>
+fn textureLoad_23ff89() {
+  var arg_1 = vec2<u32>(1u);
+  var arg_2 = 1u;
+  var res: vec4<u32> = textureLoad(arg_0, arg_1, arg_2);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_23ff89();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_23ff89();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_23ff89();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/23ff89.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/23ff89.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..a4a8393
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/23ff89.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_23ff89() {
+  uint2 arg_1 = (1u).xx;
+  uint arg_2 = 1u;
+  uint4 res = arg_0.Load(uint4(uint3(arg_1, arg_2), uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_23ff89();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_23ff89();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_23ff89();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/23ff89.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/23ff89.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..a4a8393
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/23ff89.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_23ff89() {
+  uint2 arg_1 = (1u).xx;
+  uint arg_2 = 1u;
+  uint4 res = arg_0.Load(uint4(uint3(arg_1, arg_2), uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_23ff89();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_23ff89();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_23ff89();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/23ff89.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/23ff89.wgsl.expected.glsl
new file mode 100644
index 0000000..008051f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/23ff89.wgsl.expected.glsl
@@ -0,0 +1,93 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba16ui) uniform highp uimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_23ff89() {
+  uvec2 arg_1 = uvec2(1u);
+  uint arg_2 = 1u;
+  uvec4 res = texelFetch(arg_0, ivec3(uvec3(arg_1, arg_2)));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_23ff89();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba16ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba16ui) uniform highp uimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_23ff89() {
+  uvec2 arg_1 = uvec2(1u);
+  uint arg_2 = 1u;
+  uvec4 res = texelFetch(arg_0, ivec3(uvec3(arg_1, arg_2)));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_23ff89();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba16ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba16ui) uniform highp uimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_23ff89() {
+  uvec2 arg_1 = uvec2(1u);
+  uint arg_2 = 1u;
+  uvec4 res = texelFetch(arg_0, ivec3(uvec3(arg_1, arg_2)));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_23ff89();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba16ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/23ff89.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/23ff89.wgsl.expected.msl
new file mode 100644
index 0000000..aa57cce
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/23ff89.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_23ff89(texture2d_array<uint, access::read> tint_symbol_1, device uint4* const tint_symbol_2) {
+  uint2 arg_1 = uint2(1u);
+  uint arg_2 = 1u;
+  uint4 res = tint_symbol_1.read(uint2(arg_1), arg_2);
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<uint, access::read> tint_symbol_3, device uint4* const tint_symbol_4) {
+  textureLoad_23ff89(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<uint, access::read> tint_symbol_5 [[texture(0)]], device uint4* tint_symbol_6 [[buffer(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<uint, access::read> tint_symbol_7 [[texture(0)]], device uint4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_23ff89(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<uint, access::read> tint_symbol_9 [[texture(0)]], device uint4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_23ff89(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/23ff89.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/23ff89.wgsl.expected.spvasm
new file mode 100644
index 0000000..ffbb839
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/23ff89.wgsl.expected.spvasm
@@ -0,0 +1,109 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 59
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_23ff89 "textureLoad_23ff89"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 2D 0 1 0 2 Rgba16ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+     %v4uint = OpTypeVector %uint 4
+%prevent_dce_block = OpTypeStruct %v4uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+     %v2uint = OpTypeVector %uint 2
+     %uint_1 = OpConstant %uint 1
+         %23 = OpConstantComposite %v2uint %uint_1 %uint_1
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %26 = OpConstantNull %v2uint
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %29 = OpConstantNull %uint
+     %v3uint = OpTypeVector %uint 3
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+         %40 = OpConstantNull %v4uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4uint = OpTypePointer StorageBuffer %v4uint
+         %45 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_23ff89 = OpFunction %void None %17
+         %20 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v2uint Function %26
+      %arg_2 = OpVariable %_ptr_Function_uint Function %29
+        %res = OpVariable %_ptr_Function_v4uint Function %40
+               OpStore %arg_1 %23
+               OpStore %arg_2 %uint_1
+         %31 = OpLoad %11 %arg_0
+         %33 = OpLoad %v2uint %arg_1
+         %34 = OpCompositeExtract %uint %33 0
+         %35 = OpCompositeExtract %uint %33 1
+         %36 = OpLoad %uint %arg_2
+         %37 = OpCompositeConstruct %v3uint %34 %35 %36
+         %30 = OpImageRead %v4uint %31 %37
+               OpStore %res %30
+         %43 = OpAccessChain %_ptr_StorageBuffer_v4uint %prevent_dce %uint_0
+         %44 = OpLoad %v4uint %res
+               OpStore %43 %44
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %45
+         %47 = OpLabel
+         %48 = OpFunctionCall %void %textureLoad_23ff89
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %50 = OpLabel
+         %51 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %51
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %54 = OpLabel
+         %55 = OpFunctionCall %void %textureLoad_23ff89
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %57 = OpLabel
+         %58 = OpFunctionCall %void %textureLoad_23ff89
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/23ff89.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/23ff89.wgsl.expected.wgsl
new file mode 100644
index 0000000..d2cf2d0
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/23ff89.wgsl.expected.wgsl
@@ -0,0 +1,28 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba16uint, read>;
+
+fn textureLoad_23ff89() {
+  var arg_1 = vec2<u32>(1u);
+  var arg_2 = 1u;
+  var res : vec4<u32> = textureLoad(arg_0, arg_1, arg_2);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_23ff89();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_23ff89();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_23ff89();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/26c4f8.wgsl b/test/tint/builtins/gen/var/textureLoad/26c4f8.wgsl
new file mode 100644
index 0000000..428e2ad
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/26c4f8.wgsl
@@ -0,0 +1,49 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d<bgra8unorm, read>;
+
+// fn textureLoad(texture: texture_storage_2d<bgra8unorm, read>, coords: vec2<i32>) -> vec4<f32>
+fn textureLoad_26c4f8() {
+  var arg_1 = vec2<i32>(1i);
+  var res: vec4<f32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_26c4f8();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_26c4f8();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_26c4f8();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/26c4f8.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/26c4f8.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..f14376c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/26c4f8.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture2D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_26c4f8() {
+  int2 arg_1 = (1).xx;
+  float4 res = arg_0.Load(int3(arg_1, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_26c4f8();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_26c4f8();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_26c4f8();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/26c4f8.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/26c4f8.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..f14376c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/26c4f8.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture2D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_26c4f8() {
+  int2 arg_1 = (1).xx;
+  float4 res = arg_0.Load(int3(arg_1, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_26c4f8();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_26c4f8();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_26c4f8();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/26c4f8.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/26c4f8.wgsl.expected.glsl
new file mode 100644
index 0000000..20424e0
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/26c4f8.wgsl.expected.glsl
@@ -0,0 +1,90 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba8) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_26c4f8() {
+  ivec2 arg_1 = ivec2(1);
+  vec4 res = texelFetch(arg_0, arg_1);
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_26c4f8();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba8) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_26c4f8() {
+  ivec2 arg_1 = ivec2(1);
+  vec4 res = texelFetch(arg_0, arg_1);
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_26c4f8();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba8' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba8) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_26c4f8() {
+  ivec2 arg_1 = ivec2(1);
+  vec4 res = texelFetch(arg_0, arg_1);
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_26c4f8();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/26c4f8.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/26c4f8.wgsl.expected.msl
new file mode 100644
index 0000000..f9c510d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/26c4f8.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_26c4f8(texture2d<float, access::read> tint_symbol_1, device float4* const tint_symbol_2) {
+  int2 arg_1 = int2(1);
+  float4 res = tint_symbol_1.read(uint2(arg_1));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<float, access::read> tint_symbol_3, device float4* const tint_symbol_4) {
+  textureLoad_26c4f8(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<float, access::read> tint_symbol_5 [[texture(0)]], device float4* tint_symbol_6 [[buffer(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::read> tint_symbol_7 [[texture(0)]], device float4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_26c4f8(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d<float, access::read> tint_symbol_9 [[texture(0)]], device float4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_26c4f8(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/26c4f8.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/26c4f8.wgsl.expected.spvasm
new file mode 100644
index 0000000..4bbe6c5
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/26c4f8.wgsl.expected.spvasm
@@ -0,0 +1,98 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 50
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_26c4f8 "textureLoad_26c4f8"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 0 0 2 Rgba8
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+%prevent_dce_block = OpTypeStruct %v4float
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %v2int = OpTypeVector %int 2
+      %int_1 = OpConstant %int 1
+         %22 = OpConstantComposite %v2int %int_1 %int_1
+%_ptr_Function_v2int = OpTypePointer Function %v2int
+         %25 = OpConstantNull %v2int
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+       %uint = OpTypeInt 32 0
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
+         %36 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_26c4f8 = OpFunction %void None %15
+         %18 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v2int Function %25
+        %res = OpVariable %_ptr_Function_v4float Function %5
+               OpStore %arg_1 %22
+         %27 = OpLoad %11 %arg_0
+         %28 = OpLoad %v2int %arg_1
+         %26 = OpImageRead %v4float %27 %28
+               OpStore %res %26
+         %34 = OpAccessChain %_ptr_StorageBuffer_v4float %prevent_dce %uint_0
+         %35 = OpLoad %v4float %res
+               OpStore %34 %35
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %36
+         %38 = OpLabel
+         %39 = OpFunctionCall %void %textureLoad_26c4f8
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %41 = OpLabel
+         %42 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %42
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %45 = OpLabel
+         %46 = OpFunctionCall %void %textureLoad_26c4f8
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %48 = OpLabel
+         %49 = OpFunctionCall %void %textureLoad_26c4f8
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/26c4f8.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/26c4f8.wgsl.expected.wgsl
new file mode 100644
index 0000000..c38e673
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/26c4f8.wgsl.expected.wgsl
@@ -0,0 +1,27 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d<bgra8unorm, read>;
+
+fn textureLoad_26c4f8() {
+  var arg_1 = vec2<i32>(1i);
+  var res : vec4<f32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_26c4f8();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_26c4f8();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_26c4f8();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/26d7f1.wgsl b/test/tint/builtins/gen/var/textureLoad/26d7f1.wgsl
new file mode 100644
index 0000000..97dff6c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/26d7f1.wgsl
@@ -0,0 +1,50 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rg32uint, read>;
+
+// fn textureLoad(texture: texture_storage_2d_array<rg32uint, read>, coords: vec2<u32>, array_index: i32) -> vec4<u32>
+fn textureLoad_26d7f1() {
+  var arg_1 = vec2<u32>(1u);
+  var arg_2 = 1i;
+  var res: vec4<u32> = textureLoad(arg_0, arg_1, arg_2);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_26d7f1();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_26d7f1();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_26d7f1();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/26d7f1.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/26d7f1.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..5ac6c95
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/26d7f1.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_26d7f1() {
+  uint2 arg_1 = (1u).xx;
+  int arg_2 = 1;
+  uint4 res = arg_0.Load(uint4(uint3(arg_1, uint(arg_2)), uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_26d7f1();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_26d7f1();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_26d7f1();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/26d7f1.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/26d7f1.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..5ac6c95
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/26d7f1.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_26d7f1() {
+  uint2 arg_1 = (1u).xx;
+  int arg_2 = 1;
+  uint4 res = arg_0.Load(uint4(uint3(arg_1, uint(arg_2)), uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_26d7f1();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_26d7f1();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_26d7f1();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/26d7f1.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/26d7f1.wgsl.expected.glsl
new file mode 100644
index 0000000..6017b1e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/26d7f1.wgsl.expected.glsl
@@ -0,0 +1,96 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rg32ui) uniform highp uimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_26d7f1() {
+  uvec2 arg_1 = uvec2(1u);
+  int arg_2 = 1;
+  uvec4 res = texelFetch(arg_0, ivec3(uvec3(arg_1, uint(arg_2))));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_26d7f1();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rg32ui) uniform highp uimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_26d7f1() {
+  uvec2 arg_1 = uvec2(1u);
+  int arg_2 = 1;
+  uvec4 res = texelFetch(arg_0, ivec3(uvec3(arg_1, uint(arg_2))));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_26d7f1();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'image load-store format' : not supported with this profile: es
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rg32ui) uniform highp uimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_26d7f1() {
+  uvec2 arg_1 = uvec2(1u);
+  int arg_2 = 1;
+  uvec4 res = texelFetch(arg_0, ivec3(uvec3(arg_1, uint(arg_2))));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_26d7f1();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/26d7f1.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/26d7f1.wgsl.expected.msl
new file mode 100644
index 0000000..e80e436
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/26d7f1.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_26d7f1(texture2d_array<uint, access::read> tint_symbol_1, device uint4* const tint_symbol_2) {
+  uint2 arg_1 = uint2(1u);
+  int arg_2 = 1;
+  uint4 res = tint_symbol_1.read(uint2(arg_1), arg_2);
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<uint, access::read> tint_symbol_3, device uint4* const tint_symbol_4) {
+  textureLoad_26d7f1(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<uint, access::read> tint_symbol_5 [[texture(0)]], device uint4* tint_symbol_6 [[buffer(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<uint, access::read> tint_symbol_7 [[texture(0)]], device uint4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_26d7f1(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<uint, access::read> tint_symbol_9 [[texture(0)]], device uint4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_26d7f1(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/26d7f1.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/26d7f1.wgsl.expected.spvasm
new file mode 100644
index 0000000..e40c6e0
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/26d7f1.wgsl.expected.spvasm
@@ -0,0 +1,113 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 62
+; Schema: 0
+               OpCapability Shader
+               OpCapability StorageImageExtendedFormats
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_26d7f1 "textureLoad_26d7f1"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 2D 0 1 0 2 Rg32ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+     %v4uint = OpTypeVector %uint 4
+%prevent_dce_block = OpTypeStruct %v4uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+     %v2uint = OpTypeVector %uint 2
+     %uint_1 = OpConstant %uint 1
+         %23 = OpConstantComposite %v2uint %uint_1 %uint_1
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %26 = OpConstantNull %v2uint
+        %int = OpTypeInt 32 1
+      %int_1 = OpConstant %int 1
+%_ptr_Function_int = OpTypePointer Function %int
+         %31 = OpConstantNull %int
+     %v3uint = OpTypeVector %uint 3
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+         %43 = OpConstantNull %v4uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4uint = OpTypePointer StorageBuffer %v4uint
+         %48 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_26d7f1 = OpFunction %void None %17
+         %20 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v2uint Function %26
+      %arg_2 = OpVariable %_ptr_Function_int Function %31
+        %res = OpVariable %_ptr_Function_v4uint Function %43
+               OpStore %arg_1 %23
+               OpStore %arg_2 %int_1
+         %33 = OpLoad %11 %arg_0
+         %35 = OpLoad %v2uint %arg_1
+         %36 = OpCompositeExtract %uint %35 0
+         %37 = OpCompositeExtract %uint %35 1
+         %39 = OpLoad %int %arg_2
+         %38 = OpBitcast %uint %39
+         %40 = OpCompositeConstruct %v3uint %36 %37 %38
+         %32 = OpImageRead %v4uint %33 %40
+               OpStore %res %32
+         %46 = OpAccessChain %_ptr_StorageBuffer_v4uint %prevent_dce %uint_0
+         %47 = OpLoad %v4uint %res
+               OpStore %46 %47
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %48
+         %50 = OpLabel
+         %51 = OpFunctionCall %void %textureLoad_26d7f1
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %53 = OpLabel
+         %54 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %54
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %57 = OpLabel
+         %58 = OpFunctionCall %void %textureLoad_26d7f1
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %60 = OpLabel
+         %61 = OpFunctionCall %void %textureLoad_26d7f1
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/26d7f1.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/26d7f1.wgsl.expected.wgsl
new file mode 100644
index 0000000..dbe0b97
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/26d7f1.wgsl.expected.wgsl
@@ -0,0 +1,28 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rg32uint, read>;
+
+fn textureLoad_26d7f1() {
+  var arg_1 = vec2<u32>(1u);
+  var arg_2 = 1i;
+  var res : vec4<u32> = textureLoad(arg_0, arg_1, arg_2);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_26d7f1();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_26d7f1();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_26d7f1();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/276a2c.wgsl b/test/tint/builtins/gen/var/textureLoad/276a2c.wgsl
new file mode 100644
index 0000000..3f2a66f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/276a2c.wgsl
@@ -0,0 +1,49 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_1d<rgba32uint, read>;
+
+// fn textureLoad(texture: texture_storage_1d<rgba32uint, read>, coords: i32) -> vec4<u32>
+fn textureLoad_276a2c() {
+  var arg_1 = 1i;
+  var res: vec4<u32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_276a2c();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_276a2c();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_276a2c();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/276a2c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/276a2c.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..fbc8a98
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/276a2c.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture1D<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_276a2c() {
+  int arg_1 = 1;
+  uint4 res = arg_0.Load(int2(arg_1, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_276a2c();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_276a2c();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_276a2c();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/276a2c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/276a2c.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..fbc8a98
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/276a2c.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture1D<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_276a2c() {
+  int arg_1 = 1;
+  uint4 res = arg_0.Load(int2(arg_1, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_276a2c();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_276a2c();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_276a2c();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/276a2c.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/276a2c.wgsl.expected.glsl
new file mode 100644
index 0000000..3eefe46
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/276a2c.wgsl.expected.glsl
@@ -0,0 +1,90 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba32ui) uniform highp uimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_276a2c() {
+  int arg_1 = 1;
+  uvec4 res = texelFetch(arg_0, ivec2(arg_1, 0));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_276a2c();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba32ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba32ui) uniform highp uimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_276a2c() {
+  int arg_1 = 1;
+  uvec4 res = texelFetch(arg_0, ivec2(arg_1, 0));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_276a2c();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba32ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba32ui) uniform highp uimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_276a2c() {
+  int arg_1 = 1;
+  uvec4 res = texelFetch(arg_0, ivec2(arg_1, 0));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_276a2c();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba32ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/276a2c.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/276a2c.wgsl.expected.msl
new file mode 100644
index 0000000..4de8461
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/276a2c.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_276a2c(texture1d<uint, access::read> tint_symbol_1, device uint4* const tint_symbol_2) {
+  int arg_1 = 1;
+  uint4 res = tint_symbol_1.read(uint(arg_1));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<uint, access::read> tint_symbol_3, device uint4* const tint_symbol_4) {
+  textureLoad_276a2c(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<uint, access::read> tint_symbol_5 [[texture(0)]], device uint4* tint_symbol_6 [[buffer(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(texture1d<uint, access::read> tint_symbol_7 [[texture(0)]], device uint4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_276a2c(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture1d<uint, access::read> tint_symbol_9 [[texture(0)]], device uint4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_276a2c(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/276a2c.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/276a2c.wgsl.expected.spvasm
new file mode 100644
index 0000000..293219e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/276a2c.wgsl.expected.spvasm
@@ -0,0 +1,99 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 50
+; Schema: 0
+               OpCapability Shader
+               OpCapability Image1D
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_276a2c "textureLoad_276a2c"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 1D 0 0 0 2 Rgba32ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+     %v4uint = OpTypeVector %uint 4
+%prevent_dce_block = OpTypeStruct %v4uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %int_1 = OpConstant %int 1
+%_ptr_Function_int = OpTypePointer Function %int
+         %25 = OpConstantNull %int
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+         %31 = OpConstantNull %v4uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4uint = OpTypePointer StorageBuffer %v4uint
+         %36 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_276a2c = OpFunction %void None %17
+         %20 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_int Function %25
+        %res = OpVariable %_ptr_Function_v4uint Function %31
+               OpStore %arg_1 %int_1
+         %27 = OpLoad %11 %arg_0
+         %28 = OpLoad %int %arg_1
+         %26 = OpImageRead %v4uint %27 %28
+               OpStore %res %26
+         %34 = OpAccessChain %_ptr_StorageBuffer_v4uint %prevent_dce %uint_0
+         %35 = OpLoad %v4uint %res
+               OpStore %34 %35
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %36
+         %38 = OpLabel
+         %39 = OpFunctionCall %void %textureLoad_276a2c
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %41 = OpLabel
+         %42 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %42
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %45 = OpLabel
+         %46 = OpFunctionCall %void %textureLoad_276a2c
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %48 = OpLabel
+         %49 = OpFunctionCall %void %textureLoad_276a2c
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/276a2c.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/276a2c.wgsl.expected.wgsl
new file mode 100644
index 0000000..aa7f54b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/276a2c.wgsl.expected.wgsl
@@ -0,0 +1,27 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_1d<rgba32uint, read>;
+
+fn textureLoad_276a2c() {
+  var arg_1 = 1i;
+  var res : vec4<u32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_276a2c();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_276a2c();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_276a2c();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/2887d7.wgsl b/test/tint/builtins/gen/var/textureLoad/2887d7.wgsl
new file mode 100644
index 0000000..ed991c9
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/2887d7.wgsl
@@ -0,0 +1,49 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_1d<rgba32float, read>;
+
+// fn textureLoad(texture: texture_storage_1d<rgba32float, read>, coords: i32) -> vec4<f32>
+fn textureLoad_2887d7() {
+  var arg_1 = 1i;
+  var res: vec4<f32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_2887d7();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_2887d7();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_2887d7();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/2887d7.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/2887d7.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..d2a685a
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/2887d7.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture1D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_2887d7() {
+  int arg_1 = 1;
+  float4 res = arg_0.Load(int2(arg_1, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_2887d7();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_2887d7();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_2887d7();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/2887d7.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/2887d7.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..d2a685a
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/2887d7.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture1D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_2887d7() {
+  int arg_1 = 1;
+  float4 res = arg_0.Load(int2(arg_1, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_2887d7();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_2887d7();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_2887d7();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/2887d7.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/2887d7.wgsl.expected.glsl
new file mode 100644
index 0000000..3d65835
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/2887d7.wgsl.expected.glsl
@@ -0,0 +1,90 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba32f) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_2887d7() {
+  int arg_1 = 1;
+  vec4 res = texelFetch(arg_0, ivec2(arg_1, 0));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_2887d7();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba32f' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba32f) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_2887d7() {
+  int arg_1 = 1;
+  vec4 res = texelFetch(arg_0, ivec2(arg_1, 0));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_2887d7();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba32f' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba32f) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_2887d7() {
+  int arg_1 = 1;
+  vec4 res = texelFetch(arg_0, ivec2(arg_1, 0));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_2887d7();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba32f' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/2887d7.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/2887d7.wgsl.expected.msl
new file mode 100644
index 0000000..b9ca405
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/2887d7.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_2887d7(texture1d<float, access::read> tint_symbol_1, device float4* const tint_symbol_2) {
+  int arg_1 = 1;
+  float4 res = tint_symbol_1.read(uint(arg_1));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<float, access::read> tint_symbol_3, device float4* const tint_symbol_4) {
+  textureLoad_2887d7(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<float, access::read> tint_symbol_5 [[texture(0)]], device float4* tint_symbol_6 [[buffer(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(texture1d<float, access::read> tint_symbol_7 [[texture(0)]], device float4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_2887d7(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture1d<float, access::read> tint_symbol_9 [[texture(0)]], device float4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_2887d7(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/2887d7.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/2887d7.wgsl.expected.spvasm
new file mode 100644
index 0000000..dfb98d1
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/2887d7.wgsl.expected.spvasm
@@ -0,0 +1,97 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 48
+; Schema: 0
+               OpCapability Shader
+               OpCapability Image1D
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_2887d7 "textureLoad_2887d7"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 1D 0 0 0 2 Rgba32f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+%prevent_dce_block = OpTypeStruct %v4float
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %int_1 = OpConstant %int 1
+%_ptr_Function_int = OpTypePointer Function %int
+         %23 = OpConstantNull %int
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+       %uint = OpTypeInt 32 0
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
+         %34 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_2887d7 = OpFunction %void None %15
+         %18 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_int Function %23
+        %res = OpVariable %_ptr_Function_v4float Function %5
+               OpStore %arg_1 %int_1
+         %25 = OpLoad %11 %arg_0
+         %26 = OpLoad %int %arg_1
+         %24 = OpImageRead %v4float %25 %26
+               OpStore %res %24
+         %32 = OpAccessChain %_ptr_StorageBuffer_v4float %prevent_dce %uint_0
+         %33 = OpLoad %v4float %res
+               OpStore %32 %33
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %34
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %textureLoad_2887d7
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %39 = OpLabel
+         %40 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %40
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %43 = OpLabel
+         %44 = OpFunctionCall %void %textureLoad_2887d7
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %46 = OpLabel
+         %47 = OpFunctionCall %void %textureLoad_2887d7
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/2887d7.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/2887d7.wgsl.expected.wgsl
new file mode 100644
index 0000000..ebb5558
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/2887d7.wgsl.expected.wgsl
@@ -0,0 +1,27 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_1d<rgba32float, read>;
+
+fn textureLoad_2887d7() {
+  var arg_1 = 1i;
+  var res : vec4<f32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_2887d7();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_2887d7();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_2887d7();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/2a82d9.wgsl b/test/tint/builtins/gen/var/textureLoad/2a82d9.wgsl
new file mode 100644
index 0000000..b8488ad
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/2a82d9.wgsl
@@ -0,0 +1,50 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba32sint, read>;
+
+// fn textureLoad(texture: texture_storage_2d_array<rgba32sint, read>, coords: vec2<u32>, array_index: u32) -> vec4<i32>
+fn textureLoad_2a82d9() {
+  var arg_1 = vec2<u32>(1u);
+  var arg_2 = 1u;
+  var res: vec4<i32> = textureLoad(arg_0, arg_1, arg_2);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_2a82d9();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_2a82d9();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_2a82d9();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/2a82d9.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/2a82d9.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..07a1035
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/2a82d9.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_2a82d9() {
+  uint2 arg_1 = (1u).xx;
+  uint arg_2 = 1u;
+  int4 res = arg_0.Load(uint4(uint3(arg_1, arg_2), uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_2a82d9();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_2a82d9();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_2a82d9();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/2a82d9.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/2a82d9.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..07a1035
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/2a82d9.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_2a82d9() {
+  uint2 arg_1 = (1u).xx;
+  uint arg_2 = 1u;
+  int4 res = arg_0.Load(uint4(uint3(arg_1, arg_2), uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_2a82d9();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_2a82d9();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_2a82d9();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/2a82d9.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/2a82d9.wgsl.expected.glsl
new file mode 100644
index 0000000..d15195be
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/2a82d9.wgsl.expected.glsl
@@ -0,0 +1,93 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba32i) uniform highp iimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_2a82d9() {
+  uvec2 arg_1 = uvec2(1u);
+  uint arg_2 = 1u;
+  ivec4 res = texelFetch(arg_0, ivec3(uvec3(arg_1, arg_2)));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_2a82d9();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba32i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba32i) uniform highp iimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_2a82d9() {
+  uvec2 arg_1 = uvec2(1u);
+  uint arg_2 = 1u;
+  ivec4 res = texelFetch(arg_0, ivec3(uvec3(arg_1, arg_2)));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_2a82d9();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba32i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba32i) uniform highp iimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_2a82d9() {
+  uvec2 arg_1 = uvec2(1u);
+  uint arg_2 = 1u;
+  ivec4 res = texelFetch(arg_0, ivec3(uvec3(arg_1, arg_2)));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_2a82d9();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba32i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/2a82d9.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/2a82d9.wgsl.expected.msl
new file mode 100644
index 0000000..d0bb689
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/2a82d9.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_2a82d9(texture2d_array<int, access::read> tint_symbol_1, device int4* const tint_symbol_2) {
+  uint2 arg_1 = uint2(1u);
+  uint arg_2 = 1u;
+  int4 res = tint_symbol_1.read(uint2(arg_1), arg_2);
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<int, access::read> tint_symbol_3, device int4* const tint_symbol_4) {
+  textureLoad_2a82d9(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<int, access::read> tint_symbol_5 [[texture(0)]], device int4* tint_symbol_6 [[buffer(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<int, access::read> tint_symbol_7 [[texture(0)]], device int4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_2a82d9(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<int, access::read> tint_symbol_9 [[texture(0)]], device int4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_2a82d9(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/2a82d9.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/2a82d9.wgsl.expected.spvasm
new file mode 100644
index 0000000..5df012d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/2a82d9.wgsl.expected.spvasm
@@ -0,0 +1,110 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 60
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_2a82d9 "textureLoad_2a82d9"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 2D 0 1 0 2 Rgba32i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+      %v4int = OpTypeVector %int 4
+%prevent_dce_block = OpTypeStruct %v4int
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+     %uint_1 = OpConstant %uint 1
+         %24 = OpConstantComposite %v2uint %uint_1 %uint_1
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %27 = OpConstantNull %v2uint
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %30 = OpConstantNull %uint
+     %v3uint = OpTypeVector %uint 3
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+         %41 = OpConstantNull %v4int
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4int = OpTypePointer StorageBuffer %v4int
+         %46 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_2a82d9 = OpFunction %void None %17
+         %20 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v2uint Function %27
+      %arg_2 = OpVariable %_ptr_Function_uint Function %30
+        %res = OpVariable %_ptr_Function_v4int Function %41
+               OpStore %arg_1 %24
+               OpStore %arg_2 %uint_1
+         %32 = OpLoad %11 %arg_0
+         %34 = OpLoad %v2uint %arg_1
+         %35 = OpCompositeExtract %uint %34 0
+         %36 = OpCompositeExtract %uint %34 1
+         %37 = OpLoad %uint %arg_2
+         %38 = OpCompositeConstruct %v3uint %35 %36 %37
+         %31 = OpImageRead %v4int %32 %38
+               OpStore %res %31
+         %44 = OpAccessChain %_ptr_StorageBuffer_v4int %prevent_dce %uint_0
+         %45 = OpLoad %v4int %res
+               OpStore %44 %45
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %46
+         %48 = OpLabel
+         %49 = OpFunctionCall %void %textureLoad_2a82d9
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %51 = OpLabel
+         %52 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %52
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %55 = OpLabel
+         %56 = OpFunctionCall %void %textureLoad_2a82d9
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %58 = OpLabel
+         %59 = OpFunctionCall %void %textureLoad_2a82d9
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/2a82d9.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/2a82d9.wgsl.expected.wgsl
new file mode 100644
index 0000000..79c65af
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/2a82d9.wgsl.expected.wgsl
@@ -0,0 +1,28 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba32sint, read>;
+
+fn textureLoad_2a82d9() {
+  var arg_1 = vec2<u32>(1u);
+  var arg_2 = 1u;
+  var res : vec4<i32> = textureLoad(arg_0, arg_1, arg_2);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_2a82d9();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_2a82d9();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_2a82d9();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/2ae485.wgsl b/test/tint/builtins/gen/var/textureLoad/2ae485.wgsl
new file mode 100644
index 0000000..578dde9
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/2ae485.wgsl
@@ -0,0 +1,49 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d<rgba16sint, read>;
+
+// fn textureLoad(texture: texture_storage_2d<rgba16sint, read>, coords: vec2<i32>) -> vec4<i32>
+fn textureLoad_2ae485() {
+  var arg_1 = vec2<i32>(1i);
+  var res: vec4<i32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_2ae485();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_2ae485();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_2ae485();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/2ae485.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/2ae485.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..8789b8b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/2ae485.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture2D<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_2ae485() {
+  int2 arg_1 = (1).xx;
+  int4 res = arg_0.Load(int3(arg_1, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_2ae485();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_2ae485();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_2ae485();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/2ae485.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/2ae485.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..8789b8b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/2ae485.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture2D<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_2ae485() {
+  int2 arg_1 = (1).xx;
+  int4 res = arg_0.Load(int3(arg_1, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_2ae485();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_2ae485();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_2ae485();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/2ae485.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/2ae485.wgsl.expected.glsl
new file mode 100644
index 0000000..b746f0f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/2ae485.wgsl.expected.glsl
@@ -0,0 +1,90 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba16i) uniform highp iimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_2ae485() {
+  ivec2 arg_1 = ivec2(1);
+  ivec4 res = texelFetch(arg_0, arg_1);
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_2ae485();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba16i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba16i) uniform highp iimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_2ae485() {
+  ivec2 arg_1 = ivec2(1);
+  ivec4 res = texelFetch(arg_0, arg_1);
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_2ae485();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba16i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba16i) uniform highp iimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_2ae485() {
+  ivec2 arg_1 = ivec2(1);
+  ivec4 res = texelFetch(arg_0, arg_1);
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_2ae485();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba16i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/2ae485.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/2ae485.wgsl.expected.msl
new file mode 100644
index 0000000..58c4ac2
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/2ae485.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_2ae485(texture2d<int, access::read> tint_symbol_1, device int4* const tint_symbol_2) {
+  int2 arg_1 = int2(1);
+  int4 res = tint_symbol_1.read(uint2(arg_1));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<int, access::read> tint_symbol_3, device int4* const tint_symbol_4) {
+  textureLoad_2ae485(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<int, access::read> tint_symbol_5 [[texture(0)]], device int4* tint_symbol_6 [[buffer(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<int, access::read> tint_symbol_7 [[texture(0)]], device int4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_2ae485(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d<int, access::read> tint_symbol_9 [[texture(0)]], device int4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_2ae485(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/2ae485.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/2ae485.wgsl.expected.spvasm
new file mode 100644
index 0000000..f870d84
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/2ae485.wgsl.expected.spvasm
@@ -0,0 +1,100 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 52
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_2ae485 "textureLoad_2ae485"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 2D 0 0 0 2 Rgba16i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+      %v4int = OpTypeVector %int 4
+%prevent_dce_block = OpTypeStruct %v4int
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+      %v2int = OpTypeVector %int 2
+      %int_1 = OpConstant %int 1
+         %23 = OpConstantComposite %v2int %int_1 %int_1
+%_ptr_Function_v2int = OpTypePointer Function %v2int
+         %26 = OpConstantNull %v2int
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+         %32 = OpConstantNull %v4int
+       %uint = OpTypeInt 32 0
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4int = OpTypePointer StorageBuffer %v4int
+         %38 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_2ae485 = OpFunction %void None %17
+         %20 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v2int Function %26
+        %res = OpVariable %_ptr_Function_v4int Function %32
+               OpStore %arg_1 %23
+         %28 = OpLoad %11 %arg_0
+         %29 = OpLoad %v2int %arg_1
+         %27 = OpImageRead %v4int %28 %29
+               OpStore %res %27
+         %36 = OpAccessChain %_ptr_StorageBuffer_v4int %prevent_dce %uint_0
+         %37 = OpLoad %v4int %res
+               OpStore %36 %37
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %38
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %textureLoad_2ae485
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %43 = OpLabel
+         %44 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %44
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %47 = OpLabel
+         %48 = OpFunctionCall %void %textureLoad_2ae485
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %50 = OpLabel
+         %51 = OpFunctionCall %void %textureLoad_2ae485
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/2ae485.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/2ae485.wgsl.expected.wgsl
new file mode 100644
index 0000000..ab639b1
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/2ae485.wgsl.expected.wgsl
@@ -0,0 +1,27 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d<rgba16sint, read>;
+
+fn textureLoad_2ae485() {
+  var arg_1 = vec2<i32>(1i);
+  var res : vec4<i32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_2ae485();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_2ae485();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_2ae485();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/2c72ae.wgsl b/test/tint/builtins/gen/var/textureLoad/2c72ae.wgsl
new file mode 100644
index 0000000..109decd
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/2c72ae.wgsl
@@ -0,0 +1,49 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d<rgba32sint, read>;
+
+// fn textureLoad(texture: texture_storage_2d<rgba32sint, read>, coords: vec2<u32>) -> vec4<i32>
+fn textureLoad_2c72ae() {
+  var arg_1 = vec2<u32>(1u);
+  var res: vec4<i32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_2c72ae();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_2c72ae();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_2c72ae();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/2c72ae.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/2c72ae.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..dfd037e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/2c72ae.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture2D<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_2c72ae() {
+  uint2 arg_1 = (1u).xx;
+  int4 res = arg_0.Load(uint3(arg_1, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_2c72ae();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_2c72ae();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_2c72ae();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/2c72ae.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/2c72ae.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..dfd037e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/2c72ae.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture2D<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_2c72ae() {
+  uint2 arg_1 = (1u).xx;
+  int4 res = arg_0.Load(uint3(arg_1, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_2c72ae();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_2c72ae();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_2c72ae();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/2c72ae.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/2c72ae.wgsl.expected.glsl
new file mode 100644
index 0000000..fc3bc0a
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/2c72ae.wgsl.expected.glsl
@@ -0,0 +1,90 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba32i) uniform highp iimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_2c72ae() {
+  uvec2 arg_1 = uvec2(1u);
+  ivec4 res = texelFetch(arg_0, ivec2(arg_1));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_2c72ae();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba32i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba32i) uniform highp iimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_2c72ae() {
+  uvec2 arg_1 = uvec2(1u);
+  ivec4 res = texelFetch(arg_0, ivec2(arg_1));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_2c72ae();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba32i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba32i) uniform highp iimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_2c72ae() {
+  uvec2 arg_1 = uvec2(1u);
+  ivec4 res = texelFetch(arg_0, ivec2(arg_1));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_2c72ae();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba32i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/2c72ae.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/2c72ae.wgsl.expected.msl
new file mode 100644
index 0000000..0f53871
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/2c72ae.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_2c72ae(texture2d<int, access::read> tint_symbol_1, device int4* const tint_symbol_2) {
+  uint2 arg_1 = uint2(1u);
+  int4 res = tint_symbol_1.read(uint2(arg_1));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<int, access::read> tint_symbol_3, device int4* const tint_symbol_4) {
+  textureLoad_2c72ae(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<int, access::read> tint_symbol_5 [[texture(0)]], device int4* tint_symbol_6 [[buffer(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<int, access::read> tint_symbol_7 [[texture(0)]], device int4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_2c72ae(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d<int, access::read> tint_symbol_9 [[texture(0)]], device int4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_2c72ae(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/2c72ae.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/2c72ae.wgsl.expected.spvasm
new file mode 100644
index 0000000..fa87699
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/2c72ae.wgsl.expected.spvasm
@@ -0,0 +1,100 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 52
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_2c72ae "textureLoad_2c72ae"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 2D 0 0 0 2 Rgba32i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+      %v4int = OpTypeVector %int 4
+%prevent_dce_block = OpTypeStruct %v4int
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+     %uint_1 = OpConstant %uint 1
+         %24 = OpConstantComposite %v2uint %uint_1 %uint_1
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %27 = OpConstantNull %v2uint
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+         %33 = OpConstantNull %v4int
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4int = OpTypePointer StorageBuffer %v4int
+         %38 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_2c72ae = OpFunction %void None %17
+         %20 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v2uint Function %27
+        %res = OpVariable %_ptr_Function_v4int Function %33
+               OpStore %arg_1 %24
+         %29 = OpLoad %11 %arg_0
+         %30 = OpLoad %v2uint %arg_1
+         %28 = OpImageRead %v4int %29 %30
+               OpStore %res %28
+         %36 = OpAccessChain %_ptr_StorageBuffer_v4int %prevent_dce %uint_0
+         %37 = OpLoad %v4int %res
+               OpStore %36 %37
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %38
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %textureLoad_2c72ae
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %43 = OpLabel
+         %44 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %44
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %47 = OpLabel
+         %48 = OpFunctionCall %void %textureLoad_2c72ae
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %50 = OpLabel
+         %51 = OpFunctionCall %void %textureLoad_2c72ae
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/2c72ae.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/2c72ae.wgsl.expected.wgsl
new file mode 100644
index 0000000..3d3d9a6
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/2c72ae.wgsl.expected.wgsl
@@ -0,0 +1,27 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d<rgba32sint, read>;
+
+fn textureLoad_2c72ae() {
+  var arg_1 = vec2<u32>(1u);
+  var res : vec4<i32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_2c72ae();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_2c72ae();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_2c72ae();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/2d6cf7.wgsl b/test/tint/builtins/gen/var/textureLoad/2d6cf7.wgsl
new file mode 100644
index 0000000..f389c35
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/2d6cf7.wgsl
@@ -0,0 +1,49 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_1d<rg32sint, read>;
+
+// fn textureLoad(texture: texture_storage_1d<rg32sint, read>, coords: i32) -> vec4<i32>
+fn textureLoad_2d6cf7() {
+  var arg_1 = 1i;
+  var res: vec4<i32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_2d6cf7();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_2d6cf7();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_2d6cf7();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/2d6cf7.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/2d6cf7.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..404f904
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/2d6cf7.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture1D<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_2d6cf7() {
+  int arg_1 = 1;
+  int4 res = arg_0.Load(int2(arg_1, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_2d6cf7();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_2d6cf7();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_2d6cf7();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/2d6cf7.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/2d6cf7.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..404f904
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/2d6cf7.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture1D<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_2d6cf7() {
+  int arg_1 = 1;
+  int4 res = arg_0.Load(int2(arg_1, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_2d6cf7();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_2d6cf7();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_2d6cf7();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/2d6cf7.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/2d6cf7.wgsl.expected.glsl
new file mode 100644
index 0000000..7aa5411
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/2d6cf7.wgsl.expected.glsl
@@ -0,0 +1,93 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rg32i) uniform highp iimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_2d6cf7() {
+  int arg_1 = 1;
+  ivec4 res = texelFetch(arg_0, ivec2(arg_1, 0));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_2d6cf7();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rg32i) uniform highp iimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_2d6cf7() {
+  int arg_1 = 1;
+  ivec4 res = texelFetch(arg_0, ivec2(arg_1, 0));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_2d6cf7();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'image load-store format' : not supported with this profile: es
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rg32i) uniform highp iimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_2d6cf7() {
+  int arg_1 = 1;
+  ivec4 res = texelFetch(arg_0, ivec2(arg_1, 0));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_2d6cf7();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/2d6cf7.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/2d6cf7.wgsl.expected.msl
new file mode 100644
index 0000000..896dd46
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/2d6cf7.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_2d6cf7(texture1d<int, access::read> tint_symbol_1, device int4* const tint_symbol_2) {
+  int arg_1 = 1;
+  int4 res = tint_symbol_1.read(uint(arg_1));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<int, access::read> tint_symbol_3, device int4* const tint_symbol_4) {
+  textureLoad_2d6cf7(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<int, access::read> tint_symbol_5 [[texture(0)]], device int4* tint_symbol_6 [[buffer(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(texture1d<int, access::read> tint_symbol_7 [[texture(0)]], device int4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_2d6cf7(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture1d<int, access::read> tint_symbol_9 [[texture(0)]], device int4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_2d6cf7(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/2d6cf7.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/2d6cf7.wgsl.expected.spvasm
new file mode 100644
index 0000000..6bc0fa9
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/2d6cf7.wgsl.expected.spvasm
@@ -0,0 +1,100 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 50
+; Schema: 0
+               OpCapability Shader
+               OpCapability Image1D
+               OpCapability StorageImageExtendedFormats
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_2d6cf7 "textureLoad_2d6cf7"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 1D 0 0 0 2 Rg32i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+      %v4int = OpTypeVector %int 4
+%prevent_dce_block = OpTypeStruct %v4int
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+      %int_1 = OpConstant %int 1
+%_ptr_Function_int = OpTypePointer Function %int
+         %24 = OpConstantNull %int
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+         %30 = OpConstantNull %v4int
+       %uint = OpTypeInt 32 0
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4int = OpTypePointer StorageBuffer %v4int
+         %36 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_2d6cf7 = OpFunction %void None %17
+         %20 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_int Function %24
+        %res = OpVariable %_ptr_Function_v4int Function %30
+               OpStore %arg_1 %int_1
+         %26 = OpLoad %11 %arg_0
+         %27 = OpLoad %int %arg_1
+         %25 = OpImageRead %v4int %26 %27
+               OpStore %res %25
+         %34 = OpAccessChain %_ptr_StorageBuffer_v4int %prevent_dce %uint_0
+         %35 = OpLoad %v4int %res
+               OpStore %34 %35
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %36
+         %38 = OpLabel
+         %39 = OpFunctionCall %void %textureLoad_2d6cf7
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %41 = OpLabel
+         %42 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %42
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %45 = OpLabel
+         %46 = OpFunctionCall %void %textureLoad_2d6cf7
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %48 = OpLabel
+         %49 = OpFunctionCall %void %textureLoad_2d6cf7
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/2d6cf7.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/2d6cf7.wgsl.expected.wgsl
new file mode 100644
index 0000000..db1c62b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/2d6cf7.wgsl.expected.wgsl
@@ -0,0 +1,27 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_1d<rg32sint, read>;
+
+fn textureLoad_2d6cf7() {
+  var arg_1 = 1i;
+  var res : vec4<i32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_2d6cf7();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_2d6cf7();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_2d6cf7();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/2e3552.wgsl b/test/tint/builtins/gen/var/textureLoad/2e3552.wgsl
new file mode 100644
index 0000000..aee7cb5
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/2e3552.wgsl
@@ -0,0 +1,50 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<r32float, read>;
+
+// fn textureLoad(texture: texture_storage_2d_array<r32float, read>, coords: vec2<u32>, array_index: i32) -> vec4<f32>
+fn textureLoad_2e3552() {
+  var arg_1 = vec2<u32>(1u);
+  var arg_2 = 1i;
+  var res: vec4<f32> = textureLoad(arg_0, arg_1, arg_2);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_2e3552();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_2e3552();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_2e3552();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/2e3552.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/2e3552.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..88d1dcf
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/2e3552.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_2e3552() {
+  uint2 arg_1 = (1u).xx;
+  int arg_2 = 1;
+  float4 res = arg_0.Load(uint4(uint3(arg_1, uint(arg_2)), uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_2e3552();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_2e3552();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_2e3552();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/2e3552.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/2e3552.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..88d1dcf
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/2e3552.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_2e3552() {
+  uint2 arg_1 = (1u).xx;
+  int arg_2 = 1;
+  float4 res = arg_0.Load(uint4(uint3(arg_1, uint(arg_2)), uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_2e3552();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_2e3552();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_2e3552();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/2e3552.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/2e3552.wgsl.expected.glsl
new file mode 100644
index 0000000..46365e1
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/2e3552.wgsl.expected.glsl
@@ -0,0 +1,99 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(r32f) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_2e3552() {
+  uvec2 arg_1 = uvec2(1u);
+  int arg_2 = 1;
+  vec4 res = texelFetch(arg_0, ivec3(uvec3(arg_1, uint(arg_2))));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_2e3552();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:11: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:11: '=' :  cannot convert from ' const float' to ' temp highp 4-component vector of float'
+ERROR: 0:11: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(r32f) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_2e3552() {
+  uvec2 arg_1 = uvec2(1u);
+  int arg_2 = 1;
+  vec4 res = texelFetch(arg_0, ivec3(uvec3(arg_1, uint(arg_2))));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_2e3552();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:12: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:12: '=' :  cannot convert from ' const float' to ' temp highp 4-component vector of float'
+ERROR: 0:12: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(r32f) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_2e3552() {
+  uvec2 arg_1 = uvec2(1u);
+  int arg_2 = 1;
+  vec4 res = texelFetch(arg_0, ivec3(uvec3(arg_1, uint(arg_2))));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_2e3552();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:11: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:11: '=' :  cannot convert from ' const float' to ' temp highp 4-component vector of float'
+ERROR: 0:11: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/2e3552.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/2e3552.wgsl.expected.msl
new file mode 100644
index 0000000..1a78f65
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/2e3552.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_2e3552(texture2d_array<float, access::read> tint_symbol_1, device float4* const tint_symbol_2) {
+  uint2 arg_1 = uint2(1u);
+  int arg_2 = 1;
+  float4 res = tint_symbol_1.read(uint2(arg_1), arg_2);
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<float, access::read> tint_symbol_3, device float4* const tint_symbol_4) {
+  textureLoad_2e3552(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<float, access::read> tint_symbol_5 [[texture(0)]], device float4* tint_symbol_6 [[buffer(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::read> tint_symbol_7 [[texture(0)]], device float4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_2e3552(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<float, access::read> tint_symbol_9 [[texture(0)]], device float4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_2e3552(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/2e3552.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/2e3552.wgsl.expected.spvasm
new file mode 100644
index 0000000..17545ea
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/2e3552.wgsl.expected.spvasm
@@ -0,0 +1,110 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 60
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_2e3552 "textureLoad_2e3552"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 1 0 2 R32f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+%prevent_dce_block = OpTypeStruct %v4float
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+     %uint_1 = OpConstant %uint 1
+         %22 = OpConstantComposite %v2uint %uint_1 %uint_1
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %25 = OpConstantNull %v2uint
+        %int = OpTypeInt 32 1
+      %int_1 = OpConstant %int 1
+%_ptr_Function_int = OpTypePointer Function %int
+         %30 = OpConstantNull %int
+     %v3uint = OpTypeVector %uint 3
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
+         %46 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_2e3552 = OpFunction %void None %15
+         %18 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v2uint Function %25
+      %arg_2 = OpVariable %_ptr_Function_int Function %30
+        %res = OpVariable %_ptr_Function_v4float Function %5
+               OpStore %arg_1 %22
+               OpStore %arg_2 %int_1
+         %32 = OpLoad %11 %arg_0
+         %34 = OpLoad %v2uint %arg_1
+         %35 = OpCompositeExtract %uint %34 0
+         %36 = OpCompositeExtract %uint %34 1
+         %38 = OpLoad %int %arg_2
+         %37 = OpBitcast %uint %38
+         %39 = OpCompositeConstruct %v3uint %35 %36 %37
+         %31 = OpImageRead %v4float %32 %39
+               OpStore %res %31
+         %44 = OpAccessChain %_ptr_StorageBuffer_v4float %prevent_dce %uint_0
+         %45 = OpLoad %v4float %res
+               OpStore %44 %45
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %46
+         %48 = OpLabel
+         %49 = OpFunctionCall %void %textureLoad_2e3552
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %51 = OpLabel
+         %52 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %52
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %55 = OpLabel
+         %56 = OpFunctionCall %void %textureLoad_2e3552
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %58 = OpLabel
+         %59 = OpFunctionCall %void %textureLoad_2e3552
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/2e3552.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/2e3552.wgsl.expected.wgsl
new file mode 100644
index 0000000..cd48ace
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/2e3552.wgsl.expected.wgsl
@@ -0,0 +1,28 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<r32float, read>;
+
+fn textureLoad_2e3552() {
+  var arg_1 = vec2<u32>(1u);
+  var arg_2 = 1i;
+  var res : vec4<f32> = textureLoad(arg_0, arg_1, arg_2);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_2e3552();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_2e3552();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_2e3552();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/313c73.wgsl b/test/tint/builtins/gen/var/textureLoad/313c73.wgsl
new file mode 100644
index 0000000..337a793
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/313c73.wgsl
@@ -0,0 +1,50 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba16sint, read>;
+
+// fn textureLoad(texture: texture_storage_2d_array<rgba16sint, read>, coords: vec2<u32>, array_index: u32) -> vec4<i32>
+fn textureLoad_313c73() {
+  var arg_1 = vec2<u32>(1u);
+  var arg_2 = 1u;
+  var res: vec4<i32> = textureLoad(arg_0, arg_1, arg_2);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_313c73();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_313c73();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_313c73();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/313c73.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/313c73.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..1731a8e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/313c73.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_313c73() {
+  uint2 arg_1 = (1u).xx;
+  uint arg_2 = 1u;
+  int4 res = arg_0.Load(uint4(uint3(arg_1, arg_2), uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_313c73();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_313c73();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_313c73();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/313c73.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/313c73.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..1731a8e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/313c73.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_313c73() {
+  uint2 arg_1 = (1u).xx;
+  uint arg_2 = 1u;
+  int4 res = arg_0.Load(uint4(uint3(arg_1, arg_2), uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_313c73();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_313c73();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_313c73();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/313c73.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/313c73.wgsl.expected.glsl
new file mode 100644
index 0000000..ccb05d4
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/313c73.wgsl.expected.glsl
@@ -0,0 +1,93 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba16i) uniform highp iimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_313c73() {
+  uvec2 arg_1 = uvec2(1u);
+  uint arg_2 = 1u;
+  ivec4 res = texelFetch(arg_0, ivec3(uvec3(arg_1, arg_2)));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_313c73();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba16i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba16i) uniform highp iimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_313c73() {
+  uvec2 arg_1 = uvec2(1u);
+  uint arg_2 = 1u;
+  ivec4 res = texelFetch(arg_0, ivec3(uvec3(arg_1, arg_2)));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_313c73();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba16i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba16i) uniform highp iimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_313c73() {
+  uvec2 arg_1 = uvec2(1u);
+  uint arg_2 = 1u;
+  ivec4 res = texelFetch(arg_0, ivec3(uvec3(arg_1, arg_2)));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_313c73();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba16i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/313c73.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/313c73.wgsl.expected.msl
new file mode 100644
index 0000000..125ae20
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/313c73.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_313c73(texture2d_array<int, access::read> tint_symbol_1, device int4* const tint_symbol_2) {
+  uint2 arg_1 = uint2(1u);
+  uint arg_2 = 1u;
+  int4 res = tint_symbol_1.read(uint2(arg_1), arg_2);
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<int, access::read> tint_symbol_3, device int4* const tint_symbol_4) {
+  textureLoad_313c73(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<int, access::read> tint_symbol_5 [[texture(0)]], device int4* tint_symbol_6 [[buffer(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<int, access::read> tint_symbol_7 [[texture(0)]], device int4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_313c73(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<int, access::read> tint_symbol_9 [[texture(0)]], device int4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_313c73(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/313c73.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/313c73.wgsl.expected.spvasm
new file mode 100644
index 0000000..9fb28e9
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/313c73.wgsl.expected.spvasm
@@ -0,0 +1,110 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 60
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_313c73 "textureLoad_313c73"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 2D 0 1 0 2 Rgba16i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+      %v4int = OpTypeVector %int 4
+%prevent_dce_block = OpTypeStruct %v4int
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+     %uint_1 = OpConstant %uint 1
+         %24 = OpConstantComposite %v2uint %uint_1 %uint_1
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %27 = OpConstantNull %v2uint
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %30 = OpConstantNull %uint
+     %v3uint = OpTypeVector %uint 3
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+         %41 = OpConstantNull %v4int
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4int = OpTypePointer StorageBuffer %v4int
+         %46 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_313c73 = OpFunction %void None %17
+         %20 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v2uint Function %27
+      %arg_2 = OpVariable %_ptr_Function_uint Function %30
+        %res = OpVariable %_ptr_Function_v4int Function %41
+               OpStore %arg_1 %24
+               OpStore %arg_2 %uint_1
+         %32 = OpLoad %11 %arg_0
+         %34 = OpLoad %v2uint %arg_1
+         %35 = OpCompositeExtract %uint %34 0
+         %36 = OpCompositeExtract %uint %34 1
+         %37 = OpLoad %uint %arg_2
+         %38 = OpCompositeConstruct %v3uint %35 %36 %37
+         %31 = OpImageRead %v4int %32 %38
+               OpStore %res %31
+         %44 = OpAccessChain %_ptr_StorageBuffer_v4int %prevent_dce %uint_0
+         %45 = OpLoad %v4int %res
+               OpStore %44 %45
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %46
+         %48 = OpLabel
+         %49 = OpFunctionCall %void %textureLoad_313c73
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %51 = OpLabel
+         %52 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %52
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %55 = OpLabel
+         %56 = OpFunctionCall %void %textureLoad_313c73
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %58 = OpLabel
+         %59 = OpFunctionCall %void %textureLoad_313c73
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/313c73.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/313c73.wgsl.expected.wgsl
new file mode 100644
index 0000000..0a196aa
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/313c73.wgsl.expected.wgsl
@@ -0,0 +1,28 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba16sint, read>;
+
+fn textureLoad_313c73() {
+  var arg_1 = vec2<u32>(1u);
+  var arg_2 = 1u;
+  var res : vec4<i32> = textureLoad(arg_0, arg_1, arg_2);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_313c73();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_313c73();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_313c73();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/31db4b.wgsl b/test/tint/builtins/gen/var/textureLoad/31db4b.wgsl
new file mode 100644
index 0000000..5715ecc
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/31db4b.wgsl
@@ -0,0 +1,49 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_1d<r32uint, read>;
+
+// fn textureLoad(texture: texture_storage_1d<r32uint, read>, coords: u32) -> vec4<u32>
+fn textureLoad_31db4b() {
+  var arg_1 = 1u;
+  var res: vec4<u32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_31db4b();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_31db4b();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_31db4b();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/31db4b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/31db4b.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..202aec2
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/31db4b.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture1D<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_31db4b() {
+  uint arg_1 = 1u;
+  uint4 res = arg_0.Load(uint2(arg_1, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_31db4b();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_31db4b();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_31db4b();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/31db4b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/31db4b.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..202aec2
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/31db4b.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture1D<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_31db4b() {
+  uint arg_1 = 1u;
+  uint4 res = arg_0.Load(uint2(arg_1, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_31db4b();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_31db4b();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_31db4b();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/31db4b.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/31db4b.wgsl.expected.glsl
new file mode 100644
index 0000000..32f21cc
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/31db4b.wgsl.expected.glsl
@@ -0,0 +1,96 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(r32ui) uniform highp uimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_31db4b() {
+  uint arg_1 = 1u;
+  uvec4 res = texelFetch(arg_0, ivec2(uvec2(arg_1, 0u)));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_31db4b();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:10: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:10: '=' :  cannot convert from ' const float' to ' temp highp 4-component vector of uint'
+ERROR: 0:10: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(r32ui) uniform highp uimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_31db4b() {
+  uint arg_1 = 1u;
+  uvec4 res = texelFetch(arg_0, ivec2(uvec2(arg_1, 0u)));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_31db4b();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:11: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:11: '=' :  cannot convert from ' const float' to ' temp mediump 4-component vector of uint'
+ERROR: 0:11: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(r32ui) uniform highp uimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_31db4b() {
+  uint arg_1 = 1u;
+  uvec4 res = texelFetch(arg_0, ivec2(uvec2(arg_1, 0u)));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_31db4b();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:10: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:10: '=' :  cannot convert from ' const float' to ' temp highp 4-component vector of uint'
+ERROR: 0:10: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/31db4b.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/31db4b.wgsl.expected.msl
new file mode 100644
index 0000000..d925278
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/31db4b.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_31db4b(texture1d<uint, access::read> tint_symbol_1, device uint4* const tint_symbol_2) {
+  uint arg_1 = 1u;
+  uint4 res = tint_symbol_1.read(uint(arg_1));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<uint, access::read> tint_symbol_3, device uint4* const tint_symbol_4) {
+  textureLoad_31db4b(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<uint, access::read> tint_symbol_5 [[texture(0)]], device uint4* tint_symbol_6 [[buffer(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(texture1d<uint, access::read> tint_symbol_7 [[texture(0)]], device uint4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_31db4b(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture1d<uint, access::read> tint_symbol_9 [[texture(0)]], device uint4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_31db4b(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/31db4b.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/31db4b.wgsl.expected.spvasm
new file mode 100644
index 0000000..6f81d96
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/31db4b.wgsl.expected.spvasm
@@ -0,0 +1,98 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 49
+; Schema: 0
+               OpCapability Shader
+               OpCapability Image1D
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_31db4b "textureLoad_31db4b"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 1D 0 0 0 2 R32ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+     %v4uint = OpTypeVector %uint 4
+%prevent_dce_block = OpTypeStruct %v4uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %24 = OpConstantNull %uint
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+         %30 = OpConstantNull %v4uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4uint = OpTypePointer StorageBuffer %v4uint
+         %35 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_31db4b = OpFunction %void None %17
+         %20 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_uint Function %24
+        %res = OpVariable %_ptr_Function_v4uint Function %30
+               OpStore %arg_1 %uint_1
+         %26 = OpLoad %11 %arg_0
+         %27 = OpLoad %uint %arg_1
+         %25 = OpImageRead %v4uint %26 %27
+               OpStore %res %25
+         %33 = OpAccessChain %_ptr_StorageBuffer_v4uint %prevent_dce %uint_0
+         %34 = OpLoad %v4uint %res
+               OpStore %33 %34
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %35
+         %37 = OpLabel
+         %38 = OpFunctionCall %void %textureLoad_31db4b
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %40 = OpLabel
+         %41 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %41
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %44 = OpLabel
+         %45 = OpFunctionCall %void %textureLoad_31db4b
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %47 = OpLabel
+         %48 = OpFunctionCall %void %textureLoad_31db4b
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/31db4b.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/31db4b.wgsl.expected.wgsl
new file mode 100644
index 0000000..a7f9edd
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/31db4b.wgsl.expected.wgsl
@@ -0,0 +1,27 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_1d<r32uint, read>;
+
+fn textureLoad_31db4b() {
+  var arg_1 = 1u;
+  var res : vec4<u32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_31db4b();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_31db4b();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_31db4b();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/321210.wgsl b/test/tint/builtins/gen/var/textureLoad/321210.wgsl
new file mode 100644
index 0000000..c7f8fad
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/321210.wgsl
@@ -0,0 +1,50 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba16uint, read>;
+
+// fn textureLoad(texture: texture_storage_2d_array<rgba16uint, read>, coords: vec2<i32>, array_index: u32) -> vec4<u32>
+fn textureLoad_321210() {
+  var arg_1 = vec2<i32>(1i);
+  var arg_2 = 1u;
+  var res: vec4<u32> = textureLoad(arg_0, arg_1, arg_2);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_321210();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_321210();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_321210();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/321210.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/321210.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..c51a974
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/321210.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_321210() {
+  int2 arg_1 = (1).xx;
+  uint arg_2 = 1u;
+  uint4 res = arg_0.Load(int4(int3(arg_1, int(arg_2)), 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_321210();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_321210();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_321210();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/321210.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/321210.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..c51a974
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/321210.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_321210() {
+  int2 arg_1 = (1).xx;
+  uint arg_2 = 1u;
+  uint4 res = arg_0.Load(int4(int3(arg_1, int(arg_2)), 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_321210();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_321210();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_321210();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/321210.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/321210.wgsl.expected.glsl
new file mode 100644
index 0000000..0237d56
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/321210.wgsl.expected.glsl
@@ -0,0 +1,93 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba16ui) uniform highp uimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_321210() {
+  ivec2 arg_1 = ivec2(1);
+  uint arg_2 = 1u;
+  uvec4 res = texelFetch(arg_0, ivec3(arg_1, int(arg_2)));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_321210();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba16ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba16ui) uniform highp uimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_321210() {
+  ivec2 arg_1 = ivec2(1);
+  uint arg_2 = 1u;
+  uvec4 res = texelFetch(arg_0, ivec3(arg_1, int(arg_2)));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_321210();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba16ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba16ui) uniform highp uimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_321210() {
+  ivec2 arg_1 = ivec2(1);
+  uint arg_2 = 1u;
+  uvec4 res = texelFetch(arg_0, ivec3(arg_1, int(arg_2)));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_321210();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba16ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/321210.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/321210.wgsl.expected.msl
new file mode 100644
index 0000000..72784f9
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/321210.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_321210(texture2d_array<uint, access::read> tint_symbol_1, device uint4* const tint_symbol_2) {
+  int2 arg_1 = int2(1);
+  uint arg_2 = 1u;
+  uint4 res = tint_symbol_1.read(uint2(arg_1), arg_2);
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<uint, access::read> tint_symbol_3, device uint4* const tint_symbol_4) {
+  textureLoad_321210(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<uint, access::read> tint_symbol_5 [[texture(0)]], device uint4* tint_symbol_6 [[buffer(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<uint, access::read> tint_symbol_7 [[texture(0)]], device uint4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_321210(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<uint, access::read> tint_symbol_9 [[texture(0)]], device uint4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_321210(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/321210.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/321210.wgsl.expected.spvasm
new file mode 100644
index 0000000..a66aece
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/321210.wgsl.expected.spvasm
@@ -0,0 +1,112 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 62
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_321210 "textureLoad_321210"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 2D 0 1 0 2 Rgba16ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+     %v4uint = OpTypeVector %uint 4
+%prevent_dce_block = OpTypeStruct %v4uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %v2int = OpTypeVector %int 2
+      %int_1 = OpConstant %int 1
+         %24 = OpConstantComposite %v2int %int_1 %int_1
+%_ptr_Function_v2int = OpTypePointer Function %v2int
+         %27 = OpConstantNull %v2int
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %31 = OpConstantNull %uint
+      %v3int = OpTypeVector %int 3
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+         %43 = OpConstantNull %v4uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4uint = OpTypePointer StorageBuffer %v4uint
+         %48 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_321210 = OpFunction %void None %17
+         %20 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v2int Function %27
+      %arg_2 = OpVariable %_ptr_Function_uint Function %31
+        %res = OpVariable %_ptr_Function_v4uint Function %43
+               OpStore %arg_1 %24
+               OpStore %arg_2 %uint_1
+         %33 = OpLoad %11 %arg_0
+         %35 = OpLoad %v2int %arg_1
+         %36 = OpCompositeExtract %int %35 0
+         %37 = OpCompositeExtract %int %35 1
+         %39 = OpLoad %uint %arg_2
+         %38 = OpBitcast %int %39
+         %40 = OpCompositeConstruct %v3int %36 %37 %38
+         %32 = OpImageRead %v4uint %33 %40
+               OpStore %res %32
+         %46 = OpAccessChain %_ptr_StorageBuffer_v4uint %prevent_dce %uint_0
+         %47 = OpLoad %v4uint %res
+               OpStore %46 %47
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %48
+         %50 = OpLabel
+         %51 = OpFunctionCall %void %textureLoad_321210
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %53 = OpLabel
+         %54 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %54
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %57 = OpLabel
+         %58 = OpFunctionCall %void %textureLoad_321210
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %60 = OpLabel
+         %61 = OpFunctionCall %void %textureLoad_321210
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/321210.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/321210.wgsl.expected.wgsl
new file mode 100644
index 0000000..bb564c1
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/321210.wgsl.expected.wgsl
@@ -0,0 +1,28 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba16uint, read>;
+
+fn textureLoad_321210() {
+  var arg_1 = vec2<i32>(1i);
+  var arg_2 = 1u;
+  var res : vec4<u32> = textureLoad(arg_0, arg_1, arg_2);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_321210();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_321210();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_321210();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/33d3aa.wgsl b/test/tint/builtins/gen/var/textureLoad/33d3aa.wgsl
new file mode 100644
index 0000000..507e8e3
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/33d3aa.wgsl
@@ -0,0 +1,49 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_1d<rgba32sint, read>;
+
+// fn textureLoad(texture: texture_storage_1d<rgba32sint, read>, coords: u32) -> vec4<i32>
+fn textureLoad_33d3aa() {
+  var arg_1 = 1u;
+  var res: vec4<i32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_33d3aa();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_33d3aa();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_33d3aa();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/33d3aa.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/33d3aa.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..0b72d47
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/33d3aa.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture1D<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_33d3aa() {
+  uint arg_1 = 1u;
+  int4 res = arg_0.Load(uint2(arg_1, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_33d3aa();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_33d3aa();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_33d3aa();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/33d3aa.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/33d3aa.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..0b72d47
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/33d3aa.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture1D<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_33d3aa() {
+  uint arg_1 = 1u;
+  int4 res = arg_0.Load(uint2(arg_1, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_33d3aa();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_33d3aa();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_33d3aa();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/33d3aa.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/33d3aa.wgsl.expected.glsl
new file mode 100644
index 0000000..7bfb854
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/33d3aa.wgsl.expected.glsl
@@ -0,0 +1,90 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba32i) uniform highp iimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_33d3aa() {
+  uint arg_1 = 1u;
+  ivec4 res = texelFetch(arg_0, ivec2(uvec2(arg_1, 0u)));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_33d3aa();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba32i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba32i) uniform highp iimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_33d3aa() {
+  uint arg_1 = 1u;
+  ivec4 res = texelFetch(arg_0, ivec2(uvec2(arg_1, 0u)));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_33d3aa();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba32i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba32i) uniform highp iimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_33d3aa() {
+  uint arg_1 = 1u;
+  ivec4 res = texelFetch(arg_0, ivec2(uvec2(arg_1, 0u)));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_33d3aa();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba32i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/33d3aa.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/33d3aa.wgsl.expected.msl
new file mode 100644
index 0000000..0d19718
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/33d3aa.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_33d3aa(texture1d<int, access::read> tint_symbol_1, device int4* const tint_symbol_2) {
+  uint arg_1 = 1u;
+  int4 res = tint_symbol_1.read(uint(arg_1));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<int, access::read> tint_symbol_3, device int4* const tint_symbol_4) {
+  textureLoad_33d3aa(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<int, access::read> tint_symbol_5 [[texture(0)]], device int4* tint_symbol_6 [[buffer(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(texture1d<int, access::read> tint_symbol_7 [[texture(0)]], device int4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_33d3aa(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture1d<int, access::read> tint_symbol_9 [[texture(0)]], device int4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_33d3aa(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/33d3aa.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/33d3aa.wgsl.expected.spvasm
new file mode 100644
index 0000000..4b7514e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/33d3aa.wgsl.expected.spvasm
@@ -0,0 +1,99 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 50
+; Schema: 0
+               OpCapability Shader
+               OpCapability Image1D
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_33d3aa "textureLoad_33d3aa"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 1D 0 0 0 2 Rgba32i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+      %v4int = OpTypeVector %int 4
+%prevent_dce_block = OpTypeStruct %v4int
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %25 = OpConstantNull %uint
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+         %31 = OpConstantNull %v4int
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4int = OpTypePointer StorageBuffer %v4int
+         %36 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_33d3aa = OpFunction %void None %17
+         %20 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_uint Function %25
+        %res = OpVariable %_ptr_Function_v4int Function %31
+               OpStore %arg_1 %uint_1
+         %27 = OpLoad %11 %arg_0
+         %28 = OpLoad %uint %arg_1
+         %26 = OpImageRead %v4int %27 %28
+               OpStore %res %26
+         %34 = OpAccessChain %_ptr_StorageBuffer_v4int %prevent_dce %uint_0
+         %35 = OpLoad %v4int %res
+               OpStore %34 %35
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %36
+         %38 = OpLabel
+         %39 = OpFunctionCall %void %textureLoad_33d3aa
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %41 = OpLabel
+         %42 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %42
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %45 = OpLabel
+         %46 = OpFunctionCall %void %textureLoad_33d3aa
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %48 = OpLabel
+         %49 = OpFunctionCall %void %textureLoad_33d3aa
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/33d3aa.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/33d3aa.wgsl.expected.wgsl
new file mode 100644
index 0000000..08d29d2
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/33d3aa.wgsl.expected.wgsl
@@ -0,0 +1,27 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_1d<rgba32sint, read>;
+
+fn textureLoad_33d3aa() {
+  var arg_1 = 1u;
+  var res : vec4<i32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_33d3aa();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_33d3aa();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_33d3aa();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/348827.wgsl b/test/tint/builtins/gen/var/textureLoad/348827.wgsl
new file mode 100644
index 0000000..33b8884
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/348827.wgsl
@@ -0,0 +1,50 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba32uint, read>;
+
+// fn textureLoad(texture: texture_storage_2d_array<rgba32uint, read>, coords: vec2<u32>, array_index: u32) -> vec4<u32>
+fn textureLoad_348827() {
+  var arg_1 = vec2<u32>(1u);
+  var arg_2 = 1u;
+  var res: vec4<u32> = textureLoad(arg_0, arg_1, arg_2);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_348827();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_348827();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_348827();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/348827.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/348827.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..558cf24
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/348827.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_348827() {
+  uint2 arg_1 = (1u).xx;
+  uint arg_2 = 1u;
+  uint4 res = arg_0.Load(uint4(uint3(arg_1, arg_2), uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_348827();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_348827();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_348827();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/348827.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/348827.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..558cf24
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/348827.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_348827() {
+  uint2 arg_1 = (1u).xx;
+  uint arg_2 = 1u;
+  uint4 res = arg_0.Load(uint4(uint3(arg_1, arg_2), uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_348827();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_348827();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_348827();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/348827.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/348827.wgsl.expected.glsl
new file mode 100644
index 0000000..e5e034d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/348827.wgsl.expected.glsl
@@ -0,0 +1,93 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba32ui) uniform highp uimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_348827() {
+  uvec2 arg_1 = uvec2(1u);
+  uint arg_2 = 1u;
+  uvec4 res = texelFetch(arg_0, ivec3(uvec3(arg_1, arg_2)));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_348827();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba32ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba32ui) uniform highp uimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_348827() {
+  uvec2 arg_1 = uvec2(1u);
+  uint arg_2 = 1u;
+  uvec4 res = texelFetch(arg_0, ivec3(uvec3(arg_1, arg_2)));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_348827();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba32ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba32ui) uniform highp uimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_348827() {
+  uvec2 arg_1 = uvec2(1u);
+  uint arg_2 = 1u;
+  uvec4 res = texelFetch(arg_0, ivec3(uvec3(arg_1, arg_2)));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_348827();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba32ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/348827.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/348827.wgsl.expected.msl
new file mode 100644
index 0000000..0deaa8b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/348827.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_348827(texture2d_array<uint, access::read> tint_symbol_1, device uint4* const tint_symbol_2) {
+  uint2 arg_1 = uint2(1u);
+  uint arg_2 = 1u;
+  uint4 res = tint_symbol_1.read(uint2(arg_1), arg_2);
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<uint, access::read> tint_symbol_3, device uint4* const tint_symbol_4) {
+  textureLoad_348827(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<uint, access::read> tint_symbol_5 [[texture(0)]], device uint4* tint_symbol_6 [[buffer(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<uint, access::read> tint_symbol_7 [[texture(0)]], device uint4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_348827(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<uint, access::read> tint_symbol_9 [[texture(0)]], device uint4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_348827(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/348827.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/348827.wgsl.expected.spvasm
new file mode 100644
index 0000000..5c98c3e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/348827.wgsl.expected.spvasm
@@ -0,0 +1,109 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 59
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_348827 "textureLoad_348827"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 2D 0 1 0 2 Rgba32ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+     %v4uint = OpTypeVector %uint 4
+%prevent_dce_block = OpTypeStruct %v4uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+     %v2uint = OpTypeVector %uint 2
+     %uint_1 = OpConstant %uint 1
+         %23 = OpConstantComposite %v2uint %uint_1 %uint_1
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %26 = OpConstantNull %v2uint
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %29 = OpConstantNull %uint
+     %v3uint = OpTypeVector %uint 3
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+         %40 = OpConstantNull %v4uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4uint = OpTypePointer StorageBuffer %v4uint
+         %45 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_348827 = OpFunction %void None %17
+         %20 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v2uint Function %26
+      %arg_2 = OpVariable %_ptr_Function_uint Function %29
+        %res = OpVariable %_ptr_Function_v4uint Function %40
+               OpStore %arg_1 %23
+               OpStore %arg_2 %uint_1
+         %31 = OpLoad %11 %arg_0
+         %33 = OpLoad %v2uint %arg_1
+         %34 = OpCompositeExtract %uint %33 0
+         %35 = OpCompositeExtract %uint %33 1
+         %36 = OpLoad %uint %arg_2
+         %37 = OpCompositeConstruct %v3uint %34 %35 %36
+         %30 = OpImageRead %v4uint %31 %37
+               OpStore %res %30
+         %43 = OpAccessChain %_ptr_StorageBuffer_v4uint %prevent_dce %uint_0
+         %44 = OpLoad %v4uint %res
+               OpStore %43 %44
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %45
+         %47 = OpLabel
+         %48 = OpFunctionCall %void %textureLoad_348827
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %50 = OpLabel
+         %51 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %51
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %54 = OpLabel
+         %55 = OpFunctionCall %void %textureLoad_348827
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %57 = OpLabel
+         %58 = OpFunctionCall %void %textureLoad_348827
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/348827.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/348827.wgsl.expected.wgsl
new file mode 100644
index 0000000..08d65f9
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/348827.wgsl.expected.wgsl
@@ -0,0 +1,28 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba32uint, read>;
+
+fn textureLoad_348827() {
+  var arg_1 = vec2<u32>(1u);
+  var arg_2 = 1u;
+  var res : vec4<u32> = textureLoad(arg_0, arg_1, arg_2);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_348827();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_348827();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_348827();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/374351.wgsl b/test/tint/builtins/gen/var/textureLoad/374351.wgsl
new file mode 100644
index 0000000..3f5fd8f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/374351.wgsl
@@ -0,0 +1,49 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_3d<rgba16uint, read>;
+
+// fn textureLoad(texture: texture_storage_3d<rgba16uint, read>, coords: vec3<u32>) -> vec4<u32>
+fn textureLoad_374351() {
+  var arg_1 = vec3<u32>(1u);
+  var res: vec4<u32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_374351();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_374351();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_374351();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/374351.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/374351.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..3e0c5fa
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/374351.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture3D<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_374351() {
+  uint3 arg_1 = (1u).xxx;
+  uint4 res = arg_0.Load(uint4(arg_1, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_374351();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_374351();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_374351();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/374351.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/374351.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..3e0c5fa
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/374351.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture3D<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_374351() {
+  uint3 arg_1 = (1u).xxx;
+  uint4 res = arg_0.Load(uint4(arg_1, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_374351();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_374351();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_374351();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/374351.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/374351.wgsl.expected.glsl
new file mode 100644
index 0000000..24b4bb9
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/374351.wgsl.expected.glsl
@@ -0,0 +1,90 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba16ui) uniform highp uimage3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_374351() {
+  uvec3 arg_1 = uvec3(1u);
+  uvec4 res = texelFetch(arg_0, ivec3(arg_1));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_374351();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba16ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba16ui) uniform highp uimage3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_374351() {
+  uvec3 arg_1 = uvec3(1u);
+  uvec4 res = texelFetch(arg_0, ivec3(arg_1));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_374351();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba16ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba16ui) uniform highp uimage3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_374351() {
+  uvec3 arg_1 = uvec3(1u);
+  uvec4 res = texelFetch(arg_0, ivec3(arg_1));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_374351();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba16ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/374351.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/374351.wgsl.expected.msl
new file mode 100644
index 0000000..72508ba
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/374351.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_374351(texture3d<uint, access::read> tint_symbol_1, device uint4* const tint_symbol_2) {
+  uint3 arg_1 = uint3(1u);
+  uint4 res = tint_symbol_1.read(uint3(arg_1));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<uint, access::read> tint_symbol_3, device uint4* const tint_symbol_4) {
+  textureLoad_374351(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<uint, access::read> tint_symbol_5 [[texture(0)]], device uint4* tint_symbol_6 [[buffer(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<uint, access::read> tint_symbol_7 [[texture(0)]], device uint4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_374351(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture3d<uint, access::read> tint_symbol_9 [[texture(0)]], device uint4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_374351(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/374351.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/374351.wgsl.expected.spvasm
new file mode 100644
index 0000000..daceb47
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/374351.wgsl.expected.spvasm
@@ -0,0 +1,99 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 51
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_374351 "textureLoad_374351"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 3D 0 0 0 2 Rgba16ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+     %v4uint = OpTypeVector %uint 4
+%prevent_dce_block = OpTypeStruct %v4uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+     %v3uint = OpTypeVector %uint 3
+     %uint_1 = OpConstant %uint 1
+         %23 = OpConstantComposite %v3uint %uint_1 %uint_1 %uint_1
+%_ptr_Function_v3uint = OpTypePointer Function %v3uint
+         %26 = OpConstantNull %v3uint
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+         %32 = OpConstantNull %v4uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4uint = OpTypePointer StorageBuffer %v4uint
+         %37 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_374351 = OpFunction %void None %17
+         %20 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v3uint Function %26
+        %res = OpVariable %_ptr_Function_v4uint Function %32
+               OpStore %arg_1 %23
+         %28 = OpLoad %11 %arg_0
+         %29 = OpLoad %v3uint %arg_1
+         %27 = OpImageRead %v4uint %28 %29
+               OpStore %res %27
+         %35 = OpAccessChain %_ptr_StorageBuffer_v4uint %prevent_dce %uint_0
+         %36 = OpLoad %v4uint %res
+               OpStore %35 %36
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %37
+         %39 = OpLabel
+         %40 = OpFunctionCall %void %textureLoad_374351
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %42 = OpLabel
+         %43 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %43
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %46 = OpLabel
+         %47 = OpFunctionCall %void %textureLoad_374351
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %49 = OpLabel
+         %50 = OpFunctionCall %void %textureLoad_374351
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/374351.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/374351.wgsl.expected.wgsl
new file mode 100644
index 0000000..fcbab0e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/374351.wgsl.expected.wgsl
@@ -0,0 +1,27 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_3d<rgba16uint, read>;
+
+fn textureLoad_374351() {
+  var arg_1 = vec3<u32>(1u);
+  var res : vec4<u32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_374351();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_374351();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_374351();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/388688.wgsl b/test/tint/builtins/gen/var/textureLoad/388688.wgsl
new file mode 100644
index 0000000..b8c9d64
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/388688.wgsl
@@ -0,0 +1,49 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_1d<rgba8snorm, read>;
+
+// fn textureLoad(texture: texture_storage_1d<rgba8snorm, read>, coords: u32) -> vec4<f32>
+fn textureLoad_388688() {
+  var arg_1 = 1u;
+  var res: vec4<f32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_388688();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_388688();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_388688();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/388688.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/388688.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..9edec65
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/388688.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture1D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_388688() {
+  uint arg_1 = 1u;
+  float4 res = arg_0.Load(uint2(arg_1, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_388688();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_388688();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_388688();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/388688.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/388688.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..9edec65
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/388688.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture1D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_388688() {
+  uint arg_1 = 1u;
+  float4 res = arg_0.Load(uint2(arg_1, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_388688();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_388688();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_388688();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/388688.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/388688.wgsl.expected.glsl
new file mode 100644
index 0000000..56305d1
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/388688.wgsl.expected.glsl
@@ -0,0 +1,90 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba8_snorm) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_388688() {
+  uint arg_1 = 1u;
+  vec4 res = texelFetch(arg_0, ivec2(uvec2(arg_1, 0u)));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_388688();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8_snorm' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba8_snorm) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_388688() {
+  uint arg_1 = 1u;
+  vec4 res = texelFetch(arg_0, ivec2(uvec2(arg_1, 0u)));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_388688();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba8_snorm' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba8_snorm) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_388688() {
+  uint arg_1 = 1u;
+  vec4 res = texelFetch(arg_0, ivec2(uvec2(arg_1, 0u)));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_388688();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8_snorm' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/388688.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/388688.wgsl.expected.msl
new file mode 100644
index 0000000..aca2b94
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/388688.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_388688(texture1d<float, access::read> tint_symbol_1, device float4* const tint_symbol_2) {
+  uint arg_1 = 1u;
+  float4 res = tint_symbol_1.read(uint(arg_1));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<float, access::read> tint_symbol_3, device float4* const tint_symbol_4) {
+  textureLoad_388688(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<float, access::read> tint_symbol_5 [[texture(0)]], device float4* tint_symbol_6 [[buffer(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(texture1d<float, access::read> tint_symbol_7 [[texture(0)]], device float4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_388688(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture1d<float, access::read> tint_symbol_9 [[texture(0)]], device float4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_388688(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/388688.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/388688.wgsl.expected.spvasm
new file mode 100644
index 0000000..156e13d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/388688.wgsl.expected.spvasm
@@ -0,0 +1,96 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 47
+; Schema: 0
+               OpCapability Shader
+               OpCapability Image1D
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_388688 "textureLoad_388688"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 1D 0 0 0 2 Rgba8Snorm
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+%prevent_dce_block = OpTypeStruct %v4float
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %23 = OpConstantNull %uint
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
+         %33 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_388688 = OpFunction %void None %15
+         %18 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_uint Function %23
+        %res = OpVariable %_ptr_Function_v4float Function %5
+               OpStore %arg_1 %uint_1
+         %25 = OpLoad %11 %arg_0
+         %26 = OpLoad %uint %arg_1
+         %24 = OpImageRead %v4float %25 %26
+               OpStore %res %24
+         %31 = OpAccessChain %_ptr_StorageBuffer_v4float %prevent_dce %uint_0
+         %32 = OpLoad %v4float %res
+               OpStore %31 %32
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %33
+         %35 = OpLabel
+         %36 = OpFunctionCall %void %textureLoad_388688
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %38 = OpLabel
+         %39 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %39
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %42 = OpLabel
+         %43 = OpFunctionCall %void %textureLoad_388688
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %45 = OpLabel
+         %46 = OpFunctionCall %void %textureLoad_388688
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/388688.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/388688.wgsl.expected.wgsl
new file mode 100644
index 0000000..e77c341
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/388688.wgsl.expected.wgsl
@@ -0,0 +1,27 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_1d<rgba8snorm, read>;
+
+fn textureLoad_388688() {
+  var arg_1 = 1u;
+  var res : vec4<f32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_388688();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_388688();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_388688();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/39ef40.wgsl b/test/tint/builtins/gen/var/textureLoad/39ef40.wgsl
new file mode 100644
index 0000000..1a33072
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/39ef40.wgsl
@@ -0,0 +1,49 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_1d<rgba16float, read>;
+
+// fn textureLoad(texture: texture_storage_1d<rgba16float, read>, coords: u32) -> vec4<f32>
+fn textureLoad_39ef40() {
+  var arg_1 = 1u;
+  var res: vec4<f32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_39ef40();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_39ef40();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_39ef40();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/39ef40.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/39ef40.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..399808e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/39ef40.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture1D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_39ef40() {
+  uint arg_1 = 1u;
+  float4 res = arg_0.Load(uint2(arg_1, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_39ef40();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_39ef40();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_39ef40();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/39ef40.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/39ef40.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..399808e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/39ef40.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture1D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_39ef40() {
+  uint arg_1 = 1u;
+  float4 res = arg_0.Load(uint2(arg_1, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_39ef40();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_39ef40();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_39ef40();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/39ef40.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/39ef40.wgsl.expected.glsl
new file mode 100644
index 0000000..250ead6
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/39ef40.wgsl.expected.glsl
@@ -0,0 +1,90 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba16f) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_39ef40() {
+  uint arg_1 = 1u;
+  vec4 res = texelFetch(arg_0, ivec2(uvec2(arg_1, 0u)));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_39ef40();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba16f' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba16f) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_39ef40() {
+  uint arg_1 = 1u;
+  vec4 res = texelFetch(arg_0, ivec2(uvec2(arg_1, 0u)));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_39ef40();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba16f' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba16f) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_39ef40() {
+  uint arg_1 = 1u;
+  vec4 res = texelFetch(arg_0, ivec2(uvec2(arg_1, 0u)));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_39ef40();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba16f' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/39ef40.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/39ef40.wgsl.expected.msl
new file mode 100644
index 0000000..d1ab06f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/39ef40.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_39ef40(texture1d<float, access::read> tint_symbol_1, device float4* const tint_symbol_2) {
+  uint arg_1 = 1u;
+  float4 res = tint_symbol_1.read(uint(arg_1));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<float, access::read> tint_symbol_3, device float4* const tint_symbol_4) {
+  textureLoad_39ef40(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<float, access::read> tint_symbol_5 [[texture(0)]], device float4* tint_symbol_6 [[buffer(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(texture1d<float, access::read> tint_symbol_7 [[texture(0)]], device float4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_39ef40(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture1d<float, access::read> tint_symbol_9 [[texture(0)]], device float4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_39ef40(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/39ef40.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/39ef40.wgsl.expected.spvasm
new file mode 100644
index 0000000..fa3781b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/39ef40.wgsl.expected.spvasm
@@ -0,0 +1,96 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 47
+; Schema: 0
+               OpCapability Shader
+               OpCapability Image1D
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_39ef40 "textureLoad_39ef40"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 1D 0 0 0 2 Rgba16f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+%prevent_dce_block = OpTypeStruct %v4float
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %23 = OpConstantNull %uint
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
+         %33 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_39ef40 = OpFunction %void None %15
+         %18 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_uint Function %23
+        %res = OpVariable %_ptr_Function_v4float Function %5
+               OpStore %arg_1 %uint_1
+         %25 = OpLoad %11 %arg_0
+         %26 = OpLoad %uint %arg_1
+         %24 = OpImageRead %v4float %25 %26
+               OpStore %res %24
+         %31 = OpAccessChain %_ptr_StorageBuffer_v4float %prevent_dce %uint_0
+         %32 = OpLoad %v4float %res
+               OpStore %31 %32
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %33
+         %35 = OpLabel
+         %36 = OpFunctionCall %void %textureLoad_39ef40
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %38 = OpLabel
+         %39 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %39
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %42 = OpLabel
+         %43 = OpFunctionCall %void %textureLoad_39ef40
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %45 = OpLabel
+         %46 = OpFunctionCall %void %textureLoad_39ef40
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/39ef40.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/39ef40.wgsl.expected.wgsl
new file mode 100644
index 0000000..314ec08
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/39ef40.wgsl.expected.wgsl
@@ -0,0 +1,27 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_1d<rgba16float, read>;
+
+fn textureLoad_39ef40() {
+  var arg_1 = 1u;
+  var res : vec4<f32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_39ef40();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_39ef40();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_39ef40();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/3c0d9e.wgsl b/test/tint/builtins/gen/var/textureLoad/3c0d9e.wgsl
new file mode 100644
index 0000000..8a7fb9f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/3c0d9e.wgsl
@@ -0,0 +1,49 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d<rgba8uint, read>;
+
+// fn textureLoad(texture: texture_storage_2d<rgba8uint, read>, coords: vec2<i32>) -> vec4<u32>
+fn textureLoad_3c0d9e() {
+  var arg_1 = vec2<i32>(1i);
+  var res: vec4<u32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_3c0d9e();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_3c0d9e();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_3c0d9e();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/3c0d9e.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/3c0d9e.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..e57c541
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/3c0d9e.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture2D<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_3c0d9e() {
+  int2 arg_1 = (1).xx;
+  uint4 res = arg_0.Load(int3(arg_1, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_3c0d9e();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_3c0d9e();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_3c0d9e();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/3c0d9e.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/3c0d9e.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..e57c541
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/3c0d9e.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture2D<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_3c0d9e() {
+  int2 arg_1 = (1).xx;
+  uint4 res = arg_0.Load(int3(arg_1, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_3c0d9e();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_3c0d9e();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_3c0d9e();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/3c0d9e.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/3c0d9e.wgsl.expected.glsl
new file mode 100644
index 0000000..9d1ae1a
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/3c0d9e.wgsl.expected.glsl
@@ -0,0 +1,90 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba8ui) uniform highp uimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_3c0d9e() {
+  ivec2 arg_1 = ivec2(1);
+  uvec4 res = texelFetch(arg_0, arg_1);
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_3c0d9e();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba8ui) uniform highp uimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_3c0d9e() {
+  ivec2 arg_1 = ivec2(1);
+  uvec4 res = texelFetch(arg_0, arg_1);
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_3c0d9e();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba8ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba8ui) uniform highp uimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_3c0d9e() {
+  ivec2 arg_1 = ivec2(1);
+  uvec4 res = texelFetch(arg_0, arg_1);
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_3c0d9e();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/3c0d9e.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/3c0d9e.wgsl.expected.msl
new file mode 100644
index 0000000..2ede377
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/3c0d9e.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_3c0d9e(texture2d<uint, access::read> tint_symbol_1, device uint4* const tint_symbol_2) {
+  int2 arg_1 = int2(1);
+  uint4 res = tint_symbol_1.read(uint2(arg_1));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<uint, access::read> tint_symbol_3, device uint4* const tint_symbol_4) {
+  textureLoad_3c0d9e(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<uint, access::read> tint_symbol_5 [[texture(0)]], device uint4* tint_symbol_6 [[buffer(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<uint, access::read> tint_symbol_7 [[texture(0)]], device uint4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_3c0d9e(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d<uint, access::read> tint_symbol_9 [[texture(0)]], device uint4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_3c0d9e(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/3c0d9e.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/3c0d9e.wgsl.expected.spvasm
new file mode 100644
index 0000000..68ee1aa
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/3c0d9e.wgsl.expected.spvasm
@@ -0,0 +1,100 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 52
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_3c0d9e "textureLoad_3c0d9e"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 2D 0 0 0 2 Rgba8ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+     %v4uint = OpTypeVector %uint 4
+%prevent_dce_block = OpTypeStruct %v4uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %v2int = OpTypeVector %int 2
+      %int_1 = OpConstant %int 1
+         %24 = OpConstantComposite %v2int %int_1 %int_1
+%_ptr_Function_v2int = OpTypePointer Function %v2int
+         %27 = OpConstantNull %v2int
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+         %33 = OpConstantNull %v4uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4uint = OpTypePointer StorageBuffer %v4uint
+         %38 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_3c0d9e = OpFunction %void None %17
+         %20 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v2int Function %27
+        %res = OpVariable %_ptr_Function_v4uint Function %33
+               OpStore %arg_1 %24
+         %29 = OpLoad %11 %arg_0
+         %30 = OpLoad %v2int %arg_1
+         %28 = OpImageRead %v4uint %29 %30
+               OpStore %res %28
+         %36 = OpAccessChain %_ptr_StorageBuffer_v4uint %prevent_dce %uint_0
+         %37 = OpLoad %v4uint %res
+               OpStore %36 %37
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %38
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %textureLoad_3c0d9e
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %43 = OpLabel
+         %44 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %44
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %47 = OpLabel
+         %48 = OpFunctionCall %void %textureLoad_3c0d9e
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %50 = OpLabel
+         %51 = OpFunctionCall %void %textureLoad_3c0d9e
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/3c0d9e.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/3c0d9e.wgsl.expected.wgsl
new file mode 100644
index 0000000..8e6c6ce
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/3c0d9e.wgsl.expected.wgsl
@@ -0,0 +1,27 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d<rgba8uint, read>;
+
+fn textureLoad_3c0d9e() {
+  var arg_1 = vec2<i32>(1i);
+  var res : vec4<u32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_3c0d9e();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_3c0d9e();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_3c0d9e();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/3c9587.wgsl b/test/tint/builtins/gen/var/textureLoad/3c9587.wgsl
new file mode 100644
index 0000000..f4be83e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/3c9587.wgsl
@@ -0,0 +1,49 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d<rgba8unorm, read>;
+
+// fn textureLoad(texture: texture_storage_2d<rgba8unorm, read>, coords: vec2<i32>) -> vec4<f32>
+fn textureLoad_3c9587() {
+  var arg_1 = vec2<i32>(1i);
+  var res: vec4<f32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_3c9587();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_3c9587();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_3c9587();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/3c9587.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/3c9587.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..79795d3
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/3c9587.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture2D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_3c9587() {
+  int2 arg_1 = (1).xx;
+  float4 res = arg_0.Load(int3(arg_1, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_3c9587();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_3c9587();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_3c9587();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/3c9587.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/3c9587.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..79795d3
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/3c9587.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture2D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_3c9587() {
+  int2 arg_1 = (1).xx;
+  float4 res = arg_0.Load(int3(arg_1, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_3c9587();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_3c9587();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_3c9587();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/3c9587.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/3c9587.wgsl.expected.glsl
new file mode 100644
index 0000000..1445832
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/3c9587.wgsl.expected.glsl
@@ -0,0 +1,90 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba8) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_3c9587() {
+  ivec2 arg_1 = ivec2(1);
+  vec4 res = texelFetch(arg_0, arg_1);
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_3c9587();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba8) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_3c9587() {
+  ivec2 arg_1 = ivec2(1);
+  vec4 res = texelFetch(arg_0, arg_1);
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_3c9587();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba8' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba8) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_3c9587() {
+  ivec2 arg_1 = ivec2(1);
+  vec4 res = texelFetch(arg_0, arg_1);
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_3c9587();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/3c9587.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/3c9587.wgsl.expected.msl
new file mode 100644
index 0000000..c354e16
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/3c9587.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_3c9587(texture2d<float, access::read> tint_symbol_1, device float4* const tint_symbol_2) {
+  int2 arg_1 = int2(1);
+  float4 res = tint_symbol_1.read(uint2(arg_1));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<float, access::read> tint_symbol_3, device float4* const tint_symbol_4) {
+  textureLoad_3c9587(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<float, access::read> tint_symbol_5 [[texture(0)]], device float4* tint_symbol_6 [[buffer(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::read> tint_symbol_7 [[texture(0)]], device float4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_3c9587(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d<float, access::read> tint_symbol_9 [[texture(0)]], device float4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_3c9587(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/3c9587.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/3c9587.wgsl.expected.spvasm
new file mode 100644
index 0000000..489016b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/3c9587.wgsl.expected.spvasm
@@ -0,0 +1,98 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 50
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_3c9587 "textureLoad_3c9587"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 0 0 2 Rgba8
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+%prevent_dce_block = OpTypeStruct %v4float
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %v2int = OpTypeVector %int 2
+      %int_1 = OpConstant %int 1
+         %22 = OpConstantComposite %v2int %int_1 %int_1
+%_ptr_Function_v2int = OpTypePointer Function %v2int
+         %25 = OpConstantNull %v2int
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+       %uint = OpTypeInt 32 0
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
+         %36 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_3c9587 = OpFunction %void None %15
+         %18 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v2int Function %25
+        %res = OpVariable %_ptr_Function_v4float Function %5
+               OpStore %arg_1 %22
+         %27 = OpLoad %11 %arg_0
+         %28 = OpLoad %v2int %arg_1
+         %26 = OpImageRead %v4float %27 %28
+               OpStore %res %26
+         %34 = OpAccessChain %_ptr_StorageBuffer_v4float %prevent_dce %uint_0
+         %35 = OpLoad %v4float %res
+               OpStore %34 %35
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %36
+         %38 = OpLabel
+         %39 = OpFunctionCall %void %textureLoad_3c9587
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %41 = OpLabel
+         %42 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %42
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %45 = OpLabel
+         %46 = OpFunctionCall %void %textureLoad_3c9587
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %48 = OpLabel
+         %49 = OpFunctionCall %void %textureLoad_3c9587
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/3c9587.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/3c9587.wgsl.expected.wgsl
new file mode 100644
index 0000000..bcc564c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/3c9587.wgsl.expected.wgsl
@@ -0,0 +1,27 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d<rgba8unorm, read>;
+
+fn textureLoad_3c9587() {
+  var arg_1 = vec2<i32>(1i);
+  var res : vec4<f32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_3c9587();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_3c9587();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_3c9587();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/3d001b.wgsl b/test/tint/builtins/gen/var/textureLoad/3d001b.wgsl
new file mode 100644
index 0000000..9dfc1de
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/3d001b.wgsl
@@ -0,0 +1,49 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_3d<rgba8sint, read>;
+
+// fn textureLoad(texture: texture_storage_3d<rgba8sint, read>, coords: vec3<i32>) -> vec4<i32>
+fn textureLoad_3d001b() {
+  var arg_1 = vec3<i32>(1i);
+  var res: vec4<i32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_3d001b();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_3d001b();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_3d001b();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/3d001b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/3d001b.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..6186a4b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/3d001b.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture3D<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_3d001b() {
+  int3 arg_1 = (1).xxx;
+  int4 res = arg_0.Load(int4(arg_1, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_3d001b();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_3d001b();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_3d001b();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/3d001b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/3d001b.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..6186a4b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/3d001b.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture3D<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_3d001b() {
+  int3 arg_1 = (1).xxx;
+  int4 res = arg_0.Load(int4(arg_1, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_3d001b();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_3d001b();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_3d001b();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/3d001b.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/3d001b.wgsl.expected.glsl
new file mode 100644
index 0000000..970e0f7
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/3d001b.wgsl.expected.glsl
@@ -0,0 +1,90 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba8i) uniform highp iimage3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_3d001b() {
+  ivec3 arg_1 = ivec3(1);
+  ivec4 res = texelFetch(arg_0, arg_1);
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_3d001b();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba8i) uniform highp iimage3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_3d001b() {
+  ivec3 arg_1 = ivec3(1);
+  ivec4 res = texelFetch(arg_0, arg_1);
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_3d001b();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba8i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba8i) uniform highp iimage3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_3d001b() {
+  ivec3 arg_1 = ivec3(1);
+  ivec4 res = texelFetch(arg_0, arg_1);
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_3d001b();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/3d001b.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/3d001b.wgsl.expected.msl
new file mode 100644
index 0000000..9430fb7
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/3d001b.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_3d001b(texture3d<int, access::read> tint_symbol_1, device int4* const tint_symbol_2) {
+  int3 arg_1 = int3(1);
+  int4 res = tint_symbol_1.read(uint3(arg_1));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<int, access::read> tint_symbol_3, device int4* const tint_symbol_4) {
+  textureLoad_3d001b(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<int, access::read> tint_symbol_5 [[texture(0)]], device int4* tint_symbol_6 [[buffer(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<int, access::read> tint_symbol_7 [[texture(0)]], device int4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_3d001b(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture3d<int, access::read> tint_symbol_9 [[texture(0)]], device int4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_3d001b(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/3d001b.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/3d001b.wgsl.expected.spvasm
new file mode 100644
index 0000000..55202b4
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/3d001b.wgsl.expected.spvasm
@@ -0,0 +1,100 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 52
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_3d001b "textureLoad_3d001b"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 3D 0 0 0 2 Rgba8i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+      %v4int = OpTypeVector %int 4
+%prevent_dce_block = OpTypeStruct %v4int
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+      %v3int = OpTypeVector %int 3
+      %int_1 = OpConstant %int 1
+         %23 = OpConstantComposite %v3int %int_1 %int_1 %int_1
+%_ptr_Function_v3int = OpTypePointer Function %v3int
+         %26 = OpConstantNull %v3int
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+         %32 = OpConstantNull %v4int
+       %uint = OpTypeInt 32 0
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4int = OpTypePointer StorageBuffer %v4int
+         %38 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_3d001b = OpFunction %void None %17
+         %20 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v3int Function %26
+        %res = OpVariable %_ptr_Function_v4int Function %32
+               OpStore %arg_1 %23
+         %28 = OpLoad %11 %arg_0
+         %29 = OpLoad %v3int %arg_1
+         %27 = OpImageRead %v4int %28 %29
+               OpStore %res %27
+         %36 = OpAccessChain %_ptr_StorageBuffer_v4int %prevent_dce %uint_0
+         %37 = OpLoad %v4int %res
+               OpStore %36 %37
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %38
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %textureLoad_3d001b
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %43 = OpLabel
+         %44 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %44
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %47 = OpLabel
+         %48 = OpFunctionCall %void %textureLoad_3d001b
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %50 = OpLabel
+         %51 = OpFunctionCall %void %textureLoad_3d001b
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/3d001b.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/3d001b.wgsl.expected.wgsl
new file mode 100644
index 0000000..b660404
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/3d001b.wgsl.expected.wgsl
@@ -0,0 +1,27 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_3d<rgba8sint, read>;
+
+fn textureLoad_3d001b() {
+  var arg_1 = vec3<i32>(1i);
+  var res : vec4<i32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_3d001b();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_3d001b();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_3d001b();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/3d9c90.wgsl b/test/tint/builtins/gen/var/textureLoad/3d9c90.wgsl
new file mode 100644
index 0000000..6a4afcc
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/3d9c90.wgsl
@@ -0,0 +1,49 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_3d<rgba32float, read>;
+
+// fn textureLoad(texture: texture_storage_3d<rgba32float, read>, coords: vec3<i32>) -> vec4<f32>
+fn textureLoad_3d9c90() {
+  var arg_1 = vec3<i32>(1i);
+  var res: vec4<f32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_3d9c90();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_3d9c90();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_3d9c90();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/3d9c90.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/3d9c90.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..0acd551
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/3d9c90.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture3D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_3d9c90() {
+  int3 arg_1 = (1).xxx;
+  float4 res = arg_0.Load(int4(arg_1, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_3d9c90();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_3d9c90();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_3d9c90();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/3d9c90.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/3d9c90.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..0acd551
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/3d9c90.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture3D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_3d9c90() {
+  int3 arg_1 = (1).xxx;
+  float4 res = arg_0.Load(int4(arg_1, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_3d9c90();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_3d9c90();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_3d9c90();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/3d9c90.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/3d9c90.wgsl.expected.glsl
new file mode 100644
index 0000000..454cb58
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/3d9c90.wgsl.expected.glsl
@@ -0,0 +1,90 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba32f) uniform highp image3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_3d9c90() {
+  ivec3 arg_1 = ivec3(1);
+  vec4 res = texelFetch(arg_0, arg_1);
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_3d9c90();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba32f' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba32f) uniform highp image3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_3d9c90() {
+  ivec3 arg_1 = ivec3(1);
+  vec4 res = texelFetch(arg_0, arg_1);
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_3d9c90();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba32f' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba32f) uniform highp image3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_3d9c90() {
+  ivec3 arg_1 = ivec3(1);
+  vec4 res = texelFetch(arg_0, arg_1);
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_3d9c90();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba32f' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/3d9c90.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/3d9c90.wgsl.expected.msl
new file mode 100644
index 0000000..5c7216e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/3d9c90.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_3d9c90(texture3d<float, access::read> tint_symbol_1, device float4* const tint_symbol_2) {
+  int3 arg_1 = int3(1);
+  float4 res = tint_symbol_1.read(uint3(arg_1));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<float, access::read> tint_symbol_3, device float4* const tint_symbol_4) {
+  textureLoad_3d9c90(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<float, access::read> tint_symbol_5 [[texture(0)]], device float4* tint_symbol_6 [[buffer(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::read> tint_symbol_7 [[texture(0)]], device float4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_3d9c90(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture3d<float, access::read> tint_symbol_9 [[texture(0)]], device float4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_3d9c90(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/3d9c90.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/3d9c90.wgsl.expected.spvasm
new file mode 100644
index 0000000..e87f613
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/3d9c90.wgsl.expected.spvasm
@@ -0,0 +1,98 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 50
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_3d9c90 "textureLoad_3d9c90"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 3D 0 0 0 2 Rgba32f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+%prevent_dce_block = OpTypeStruct %v4float
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %v3int = OpTypeVector %int 3
+      %int_1 = OpConstant %int 1
+         %22 = OpConstantComposite %v3int %int_1 %int_1 %int_1
+%_ptr_Function_v3int = OpTypePointer Function %v3int
+         %25 = OpConstantNull %v3int
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+       %uint = OpTypeInt 32 0
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
+         %36 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_3d9c90 = OpFunction %void None %15
+         %18 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v3int Function %25
+        %res = OpVariable %_ptr_Function_v4float Function %5
+               OpStore %arg_1 %22
+         %27 = OpLoad %11 %arg_0
+         %28 = OpLoad %v3int %arg_1
+         %26 = OpImageRead %v4float %27 %28
+               OpStore %res %26
+         %34 = OpAccessChain %_ptr_StorageBuffer_v4float %prevent_dce %uint_0
+         %35 = OpLoad %v4float %res
+               OpStore %34 %35
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %36
+         %38 = OpLabel
+         %39 = OpFunctionCall %void %textureLoad_3d9c90
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %41 = OpLabel
+         %42 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %42
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %45 = OpLabel
+         %46 = OpFunctionCall %void %textureLoad_3d9c90
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %48 = OpLabel
+         %49 = OpFunctionCall %void %textureLoad_3d9c90
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/3d9c90.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/3d9c90.wgsl.expected.wgsl
new file mode 100644
index 0000000..f4b72f1
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/3d9c90.wgsl.expected.wgsl
@@ -0,0 +1,27 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_3d<rgba32float, read>;
+
+fn textureLoad_3d9c90() {
+  var arg_1 = vec3<i32>(1i);
+  var res : vec4<f32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_3d9c90();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_3d9c90();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_3d9c90();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/3e5f6a.wgsl b/test/tint/builtins/gen/var/textureLoad/3e5f6a.wgsl
new file mode 100644
index 0000000..3fa205c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/3e5f6a.wgsl
@@ -0,0 +1,49 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d<rgba16float, read>;
+
+// fn textureLoad(texture: texture_storage_2d<rgba16float, read>, coords: vec2<u32>) -> vec4<f32>
+fn textureLoad_3e5f6a() {
+  var arg_1 = vec2<u32>(1u);
+  var res: vec4<f32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_3e5f6a();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_3e5f6a();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_3e5f6a();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/3e5f6a.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/3e5f6a.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..118926d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/3e5f6a.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture2D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_3e5f6a() {
+  uint2 arg_1 = (1u).xx;
+  float4 res = arg_0.Load(uint3(arg_1, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_3e5f6a();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_3e5f6a();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_3e5f6a();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/3e5f6a.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/3e5f6a.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..118926d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/3e5f6a.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture2D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_3e5f6a() {
+  uint2 arg_1 = (1u).xx;
+  float4 res = arg_0.Load(uint3(arg_1, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_3e5f6a();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_3e5f6a();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_3e5f6a();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/3e5f6a.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/3e5f6a.wgsl.expected.glsl
new file mode 100644
index 0000000..7b120eb
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/3e5f6a.wgsl.expected.glsl
@@ -0,0 +1,90 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba16f) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_3e5f6a() {
+  uvec2 arg_1 = uvec2(1u);
+  vec4 res = texelFetch(arg_0, ivec2(arg_1));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_3e5f6a();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba16f' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba16f) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_3e5f6a() {
+  uvec2 arg_1 = uvec2(1u);
+  vec4 res = texelFetch(arg_0, ivec2(arg_1));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_3e5f6a();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba16f' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba16f) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_3e5f6a() {
+  uvec2 arg_1 = uvec2(1u);
+  vec4 res = texelFetch(arg_0, ivec2(arg_1));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_3e5f6a();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba16f' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/3e5f6a.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/3e5f6a.wgsl.expected.msl
new file mode 100644
index 0000000..d7bd899
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/3e5f6a.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_3e5f6a(texture2d<float, access::read> tint_symbol_1, device float4* const tint_symbol_2) {
+  uint2 arg_1 = uint2(1u);
+  float4 res = tint_symbol_1.read(uint2(arg_1));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<float, access::read> tint_symbol_3, device float4* const tint_symbol_4) {
+  textureLoad_3e5f6a(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<float, access::read> tint_symbol_5 [[texture(0)]], device float4* tint_symbol_6 [[buffer(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::read> tint_symbol_7 [[texture(0)]], device float4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_3e5f6a(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d<float, access::read> tint_symbol_9 [[texture(0)]], device float4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_3e5f6a(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/3e5f6a.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/3e5f6a.wgsl.expected.spvasm
new file mode 100644
index 0000000..3d7ba0d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/3e5f6a.wgsl.expected.spvasm
@@ -0,0 +1,97 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 49
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_3e5f6a "textureLoad_3e5f6a"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 0 0 2 Rgba16f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+%prevent_dce_block = OpTypeStruct %v4float
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+     %uint_1 = OpConstant %uint 1
+         %22 = OpConstantComposite %v2uint %uint_1 %uint_1
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %25 = OpConstantNull %v2uint
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
+         %35 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_3e5f6a = OpFunction %void None %15
+         %18 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v2uint Function %25
+        %res = OpVariable %_ptr_Function_v4float Function %5
+               OpStore %arg_1 %22
+         %27 = OpLoad %11 %arg_0
+         %28 = OpLoad %v2uint %arg_1
+         %26 = OpImageRead %v4float %27 %28
+               OpStore %res %26
+         %33 = OpAccessChain %_ptr_StorageBuffer_v4float %prevent_dce %uint_0
+         %34 = OpLoad %v4float %res
+               OpStore %33 %34
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %35
+         %37 = OpLabel
+         %38 = OpFunctionCall %void %textureLoad_3e5f6a
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %40 = OpLabel
+         %41 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %41
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %44 = OpLabel
+         %45 = OpFunctionCall %void %textureLoad_3e5f6a
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %47 = OpLabel
+         %48 = OpFunctionCall %void %textureLoad_3e5f6a
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/3e5f6a.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/3e5f6a.wgsl.expected.wgsl
new file mode 100644
index 0000000..b701f8d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/3e5f6a.wgsl.expected.wgsl
@@ -0,0 +1,27 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d<rgba16float, read>;
+
+fn textureLoad_3e5f6a() {
+  var arg_1 = vec2<u32>(1u);
+  var res : vec4<f32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_3e5f6a();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_3e5f6a();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_3e5f6a();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/44c826.wgsl b/test/tint/builtins/gen/var/textureLoad/44c826.wgsl
new file mode 100644
index 0000000..defb797
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/44c826.wgsl
@@ -0,0 +1,49 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_1d<rg32uint, read>;
+
+// fn textureLoad(texture: texture_storage_1d<rg32uint, read>, coords: u32) -> vec4<u32>
+fn textureLoad_44c826() {
+  var arg_1 = 1u;
+  var res: vec4<u32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_44c826();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_44c826();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_44c826();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/44c826.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/44c826.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..c2e81e3
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/44c826.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture1D<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_44c826() {
+  uint arg_1 = 1u;
+  uint4 res = arg_0.Load(uint2(arg_1, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_44c826();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_44c826();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_44c826();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/44c826.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/44c826.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..c2e81e3
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/44c826.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture1D<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_44c826() {
+  uint arg_1 = 1u;
+  uint4 res = arg_0.Load(uint2(arg_1, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_44c826();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_44c826();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_44c826();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/44c826.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/44c826.wgsl.expected.glsl
new file mode 100644
index 0000000..720e964
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/44c826.wgsl.expected.glsl
@@ -0,0 +1,93 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rg32ui) uniform highp uimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_44c826() {
+  uint arg_1 = 1u;
+  uvec4 res = texelFetch(arg_0, ivec2(uvec2(arg_1, 0u)));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_44c826();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rg32ui) uniform highp uimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_44c826() {
+  uint arg_1 = 1u;
+  uvec4 res = texelFetch(arg_0, ivec2(uvec2(arg_1, 0u)));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_44c826();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'image load-store format' : not supported with this profile: es
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rg32ui) uniform highp uimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_44c826() {
+  uint arg_1 = 1u;
+  uvec4 res = texelFetch(arg_0, ivec2(uvec2(arg_1, 0u)));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_44c826();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/44c826.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/44c826.wgsl.expected.msl
new file mode 100644
index 0000000..a747b72
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/44c826.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_44c826(texture1d<uint, access::read> tint_symbol_1, device uint4* const tint_symbol_2) {
+  uint arg_1 = 1u;
+  uint4 res = tint_symbol_1.read(uint(arg_1));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<uint, access::read> tint_symbol_3, device uint4* const tint_symbol_4) {
+  textureLoad_44c826(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<uint, access::read> tint_symbol_5 [[texture(0)]], device uint4* tint_symbol_6 [[buffer(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(texture1d<uint, access::read> tint_symbol_7 [[texture(0)]], device uint4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_44c826(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture1d<uint, access::read> tint_symbol_9 [[texture(0)]], device uint4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_44c826(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/44c826.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/44c826.wgsl.expected.spvasm
new file mode 100644
index 0000000..082203c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/44c826.wgsl.expected.spvasm
@@ -0,0 +1,99 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 49
+; Schema: 0
+               OpCapability Shader
+               OpCapability Image1D
+               OpCapability StorageImageExtendedFormats
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_44c826 "textureLoad_44c826"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 1D 0 0 0 2 Rg32ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+     %v4uint = OpTypeVector %uint 4
+%prevent_dce_block = OpTypeStruct %v4uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %24 = OpConstantNull %uint
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+         %30 = OpConstantNull %v4uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4uint = OpTypePointer StorageBuffer %v4uint
+         %35 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_44c826 = OpFunction %void None %17
+         %20 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_uint Function %24
+        %res = OpVariable %_ptr_Function_v4uint Function %30
+               OpStore %arg_1 %uint_1
+         %26 = OpLoad %11 %arg_0
+         %27 = OpLoad %uint %arg_1
+         %25 = OpImageRead %v4uint %26 %27
+               OpStore %res %25
+         %33 = OpAccessChain %_ptr_StorageBuffer_v4uint %prevent_dce %uint_0
+         %34 = OpLoad %v4uint %res
+               OpStore %33 %34
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %35
+         %37 = OpLabel
+         %38 = OpFunctionCall %void %textureLoad_44c826
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %40 = OpLabel
+         %41 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %41
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %44 = OpLabel
+         %45 = OpFunctionCall %void %textureLoad_44c826
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %47 = OpLabel
+         %48 = OpFunctionCall %void %textureLoad_44c826
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/44c826.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/44c826.wgsl.expected.wgsl
new file mode 100644
index 0000000..c939cc3
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/44c826.wgsl.expected.wgsl
@@ -0,0 +1,27 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_1d<rg32uint, read>;
+
+fn textureLoad_44c826() {
+  var arg_1 = 1u;
+  var res : vec4<u32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_44c826();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_44c826();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_44c826();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/454347.wgsl b/test/tint/builtins/gen/var/textureLoad/454347.wgsl
new file mode 100644
index 0000000..c732b23
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/454347.wgsl
@@ -0,0 +1,49 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_1d<rgba32uint, read>;
+
+// fn textureLoad(texture: texture_storage_1d<rgba32uint, read>, coords: u32) -> vec4<u32>
+fn textureLoad_454347() {
+  var arg_1 = 1u;
+  var res: vec4<u32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_454347();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_454347();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_454347();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/454347.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/454347.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..45508b8
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/454347.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture1D<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_454347() {
+  uint arg_1 = 1u;
+  uint4 res = arg_0.Load(uint2(arg_1, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_454347();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_454347();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_454347();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/454347.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/454347.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..45508b8
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/454347.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture1D<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_454347() {
+  uint arg_1 = 1u;
+  uint4 res = arg_0.Load(uint2(arg_1, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_454347();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_454347();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_454347();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/454347.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/454347.wgsl.expected.glsl
new file mode 100644
index 0000000..ee1e4ce
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/454347.wgsl.expected.glsl
@@ -0,0 +1,90 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba32ui) uniform highp uimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_454347() {
+  uint arg_1 = 1u;
+  uvec4 res = texelFetch(arg_0, ivec2(uvec2(arg_1, 0u)));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_454347();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba32ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba32ui) uniform highp uimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_454347() {
+  uint arg_1 = 1u;
+  uvec4 res = texelFetch(arg_0, ivec2(uvec2(arg_1, 0u)));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_454347();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba32ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba32ui) uniform highp uimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_454347() {
+  uint arg_1 = 1u;
+  uvec4 res = texelFetch(arg_0, ivec2(uvec2(arg_1, 0u)));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_454347();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba32ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/454347.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/454347.wgsl.expected.msl
new file mode 100644
index 0000000..6e1b174
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/454347.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_454347(texture1d<uint, access::read> tint_symbol_1, device uint4* const tint_symbol_2) {
+  uint arg_1 = 1u;
+  uint4 res = tint_symbol_1.read(uint(arg_1));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<uint, access::read> tint_symbol_3, device uint4* const tint_symbol_4) {
+  textureLoad_454347(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<uint, access::read> tint_symbol_5 [[texture(0)]], device uint4* tint_symbol_6 [[buffer(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(texture1d<uint, access::read> tint_symbol_7 [[texture(0)]], device uint4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_454347(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture1d<uint, access::read> tint_symbol_9 [[texture(0)]], device uint4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_454347(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/454347.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/454347.wgsl.expected.spvasm
new file mode 100644
index 0000000..0a96de8
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/454347.wgsl.expected.spvasm
@@ -0,0 +1,98 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 49
+; Schema: 0
+               OpCapability Shader
+               OpCapability Image1D
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_454347 "textureLoad_454347"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 1D 0 0 0 2 Rgba32ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+     %v4uint = OpTypeVector %uint 4
+%prevent_dce_block = OpTypeStruct %v4uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %24 = OpConstantNull %uint
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+         %30 = OpConstantNull %v4uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4uint = OpTypePointer StorageBuffer %v4uint
+         %35 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_454347 = OpFunction %void None %17
+         %20 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_uint Function %24
+        %res = OpVariable %_ptr_Function_v4uint Function %30
+               OpStore %arg_1 %uint_1
+         %26 = OpLoad %11 %arg_0
+         %27 = OpLoad %uint %arg_1
+         %25 = OpImageRead %v4uint %26 %27
+               OpStore %res %25
+         %33 = OpAccessChain %_ptr_StorageBuffer_v4uint %prevent_dce %uint_0
+         %34 = OpLoad %v4uint %res
+               OpStore %33 %34
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %35
+         %37 = OpLabel
+         %38 = OpFunctionCall %void %textureLoad_454347
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %40 = OpLabel
+         %41 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %41
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %44 = OpLabel
+         %45 = OpFunctionCall %void %textureLoad_454347
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %47 = OpLabel
+         %48 = OpFunctionCall %void %textureLoad_454347
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/454347.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/454347.wgsl.expected.wgsl
new file mode 100644
index 0000000..a96ac28
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/454347.wgsl.expected.wgsl
@@ -0,0 +1,27 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_1d<rgba32uint, read>;
+
+fn textureLoad_454347() {
+  var arg_1 = 1u;
+  var res : vec4<u32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_454347();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_454347();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_454347();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/4638a0.wgsl b/test/tint/builtins/gen/var/textureLoad/4638a0.wgsl
new file mode 100644
index 0000000..bad4860
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/4638a0.wgsl
@@ -0,0 +1,50 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba16sint, read>;
+
+// fn textureLoad(texture: texture_storage_2d_array<rgba16sint, read>, coords: vec2<i32>, array_index: u32) -> vec4<i32>
+fn textureLoad_4638a0() {
+  var arg_1 = vec2<i32>(1i);
+  var arg_2 = 1u;
+  var res: vec4<i32> = textureLoad(arg_0, arg_1, arg_2);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_4638a0();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_4638a0();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_4638a0();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/4638a0.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/4638a0.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..6dcc331
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/4638a0.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_4638a0() {
+  int2 arg_1 = (1).xx;
+  uint arg_2 = 1u;
+  int4 res = arg_0.Load(int4(int3(arg_1, int(arg_2)), 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_4638a0();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_4638a0();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_4638a0();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/4638a0.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/4638a0.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..6dcc331
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/4638a0.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_4638a0() {
+  int2 arg_1 = (1).xx;
+  uint arg_2 = 1u;
+  int4 res = arg_0.Load(int4(int3(arg_1, int(arg_2)), 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_4638a0();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_4638a0();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_4638a0();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/4638a0.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/4638a0.wgsl.expected.glsl
new file mode 100644
index 0000000..f0a14b0
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/4638a0.wgsl.expected.glsl
@@ -0,0 +1,93 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba16i) uniform highp iimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_4638a0() {
+  ivec2 arg_1 = ivec2(1);
+  uint arg_2 = 1u;
+  ivec4 res = texelFetch(arg_0, ivec3(arg_1, int(arg_2)));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_4638a0();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba16i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba16i) uniform highp iimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_4638a0() {
+  ivec2 arg_1 = ivec2(1);
+  uint arg_2 = 1u;
+  ivec4 res = texelFetch(arg_0, ivec3(arg_1, int(arg_2)));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_4638a0();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba16i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba16i) uniform highp iimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_4638a0() {
+  ivec2 arg_1 = ivec2(1);
+  uint arg_2 = 1u;
+  ivec4 res = texelFetch(arg_0, ivec3(arg_1, int(arg_2)));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_4638a0();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba16i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/4638a0.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/4638a0.wgsl.expected.msl
new file mode 100644
index 0000000..adc0e98
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/4638a0.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_4638a0(texture2d_array<int, access::read> tint_symbol_1, device int4* const tint_symbol_2) {
+  int2 arg_1 = int2(1);
+  uint arg_2 = 1u;
+  int4 res = tint_symbol_1.read(uint2(arg_1), arg_2);
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<int, access::read> tint_symbol_3, device int4* const tint_symbol_4) {
+  textureLoad_4638a0(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<int, access::read> tint_symbol_5 [[texture(0)]], device int4* tint_symbol_6 [[buffer(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<int, access::read> tint_symbol_7 [[texture(0)]], device int4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_4638a0(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<int, access::read> tint_symbol_9 [[texture(0)]], device int4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_4638a0(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/4638a0.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/4638a0.wgsl.expected.spvasm
new file mode 100644
index 0000000..ccd7e51
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/4638a0.wgsl.expected.spvasm
@@ -0,0 +1,112 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 62
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_4638a0 "textureLoad_4638a0"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 2D 0 1 0 2 Rgba16i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+      %v4int = OpTypeVector %int 4
+%prevent_dce_block = OpTypeStruct %v4int
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+      %v2int = OpTypeVector %int 2
+      %int_1 = OpConstant %int 1
+         %23 = OpConstantComposite %v2int %int_1 %int_1
+%_ptr_Function_v2int = OpTypePointer Function %v2int
+         %26 = OpConstantNull %v2int
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %31 = OpConstantNull %uint
+      %v3int = OpTypeVector %int 3
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+         %43 = OpConstantNull %v4int
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4int = OpTypePointer StorageBuffer %v4int
+         %48 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_4638a0 = OpFunction %void None %17
+         %20 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v2int Function %26
+      %arg_2 = OpVariable %_ptr_Function_uint Function %31
+        %res = OpVariable %_ptr_Function_v4int Function %43
+               OpStore %arg_1 %23
+               OpStore %arg_2 %uint_1
+         %33 = OpLoad %11 %arg_0
+         %35 = OpLoad %v2int %arg_1
+         %36 = OpCompositeExtract %int %35 0
+         %37 = OpCompositeExtract %int %35 1
+         %39 = OpLoad %uint %arg_2
+         %38 = OpBitcast %int %39
+         %40 = OpCompositeConstruct %v3int %36 %37 %38
+         %32 = OpImageRead %v4int %33 %40
+               OpStore %res %32
+         %46 = OpAccessChain %_ptr_StorageBuffer_v4int %prevent_dce %uint_0
+         %47 = OpLoad %v4int %res
+               OpStore %46 %47
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %48
+         %50 = OpLabel
+         %51 = OpFunctionCall %void %textureLoad_4638a0
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %53 = OpLabel
+         %54 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %54
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %57 = OpLabel
+         %58 = OpFunctionCall %void %textureLoad_4638a0
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %60 = OpLabel
+         %61 = OpFunctionCall %void %textureLoad_4638a0
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/4638a0.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/4638a0.wgsl.expected.wgsl
new file mode 100644
index 0000000..1d2469e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/4638a0.wgsl.expected.wgsl
@@ -0,0 +1,28 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba16sint, read>;
+
+fn textureLoad_4638a0() {
+  var arg_1 = vec2<i32>(1i);
+  var arg_2 = 1u;
+  var res : vec4<i32> = textureLoad(arg_0, arg_1, arg_2);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_4638a0();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_4638a0();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_4638a0();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/46dbf5.wgsl b/test/tint/builtins/gen/var/textureLoad/46dbf5.wgsl
new file mode 100644
index 0000000..ff036ca
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/46dbf5.wgsl
@@ -0,0 +1,49 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_3d<rgba8unorm, read>;
+
+// fn textureLoad(texture: texture_storage_3d<rgba8unorm, read>, coords: vec3<u32>) -> vec4<f32>
+fn textureLoad_46dbf5() {
+  var arg_1 = vec3<u32>(1u);
+  var res: vec4<f32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_46dbf5();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_46dbf5();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_46dbf5();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/46dbf5.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/46dbf5.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..a0f165a
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/46dbf5.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture3D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_46dbf5() {
+  uint3 arg_1 = (1u).xxx;
+  float4 res = arg_0.Load(uint4(arg_1, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_46dbf5();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_46dbf5();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_46dbf5();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/46dbf5.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/46dbf5.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..a0f165a
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/46dbf5.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture3D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_46dbf5() {
+  uint3 arg_1 = (1u).xxx;
+  float4 res = arg_0.Load(uint4(arg_1, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_46dbf5();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_46dbf5();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_46dbf5();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/46dbf5.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/46dbf5.wgsl.expected.glsl
new file mode 100644
index 0000000..6053839
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/46dbf5.wgsl.expected.glsl
@@ -0,0 +1,90 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba8) uniform highp image3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_46dbf5() {
+  uvec3 arg_1 = uvec3(1u);
+  vec4 res = texelFetch(arg_0, ivec3(arg_1));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_46dbf5();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba8) uniform highp image3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_46dbf5() {
+  uvec3 arg_1 = uvec3(1u);
+  vec4 res = texelFetch(arg_0, ivec3(arg_1));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_46dbf5();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba8' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba8) uniform highp image3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_46dbf5() {
+  uvec3 arg_1 = uvec3(1u);
+  vec4 res = texelFetch(arg_0, ivec3(arg_1));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_46dbf5();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/46dbf5.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/46dbf5.wgsl.expected.msl
new file mode 100644
index 0000000..9771b4f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/46dbf5.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_46dbf5(texture3d<float, access::read> tint_symbol_1, device float4* const tint_symbol_2) {
+  uint3 arg_1 = uint3(1u);
+  float4 res = tint_symbol_1.read(uint3(arg_1));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<float, access::read> tint_symbol_3, device float4* const tint_symbol_4) {
+  textureLoad_46dbf5(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<float, access::read> tint_symbol_5 [[texture(0)]], device float4* tint_symbol_6 [[buffer(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::read> tint_symbol_7 [[texture(0)]], device float4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_46dbf5(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture3d<float, access::read> tint_symbol_9 [[texture(0)]], device float4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_46dbf5(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/46dbf5.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/46dbf5.wgsl.expected.spvasm
new file mode 100644
index 0000000..2d62c53
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/46dbf5.wgsl.expected.spvasm
@@ -0,0 +1,97 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 49
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_46dbf5 "textureLoad_46dbf5"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 3D 0 0 0 2 Rgba8
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+%prevent_dce_block = OpTypeStruct %v4float
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v3uint = OpTypeVector %uint 3
+     %uint_1 = OpConstant %uint 1
+         %22 = OpConstantComposite %v3uint %uint_1 %uint_1 %uint_1
+%_ptr_Function_v3uint = OpTypePointer Function %v3uint
+         %25 = OpConstantNull %v3uint
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
+         %35 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_46dbf5 = OpFunction %void None %15
+         %18 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v3uint Function %25
+        %res = OpVariable %_ptr_Function_v4float Function %5
+               OpStore %arg_1 %22
+         %27 = OpLoad %11 %arg_0
+         %28 = OpLoad %v3uint %arg_1
+         %26 = OpImageRead %v4float %27 %28
+               OpStore %res %26
+         %33 = OpAccessChain %_ptr_StorageBuffer_v4float %prevent_dce %uint_0
+         %34 = OpLoad %v4float %res
+               OpStore %33 %34
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %35
+         %37 = OpLabel
+         %38 = OpFunctionCall %void %textureLoad_46dbf5
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %40 = OpLabel
+         %41 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %41
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %44 = OpLabel
+         %45 = OpFunctionCall %void %textureLoad_46dbf5
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %47 = OpLabel
+         %48 = OpFunctionCall %void %textureLoad_46dbf5
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/46dbf5.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/46dbf5.wgsl.expected.wgsl
new file mode 100644
index 0000000..ecaec49
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/46dbf5.wgsl.expected.wgsl
@@ -0,0 +1,27 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_3d<rgba8unorm, read>;
+
+fn textureLoad_46dbf5() {
+  var arg_1 = vec3<u32>(1u);
+  var res : vec4<f32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_46dbf5();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_46dbf5();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_46dbf5();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/4c67be.wgsl b/test/tint/builtins/gen/var/textureLoad/4c67be.wgsl
new file mode 100644
index 0000000..30cc877
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/4c67be.wgsl
@@ -0,0 +1,49 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d<r32float, read>;
+
+// fn textureLoad(texture: texture_storage_2d<r32float, read>, coords: vec2<u32>) -> vec4<f32>
+fn textureLoad_4c67be() {
+  var arg_1 = vec2<u32>(1u);
+  var res: vec4<f32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_4c67be();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_4c67be();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_4c67be();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/4c67be.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/4c67be.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..11dea1d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/4c67be.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture2D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_4c67be() {
+  uint2 arg_1 = (1u).xx;
+  float4 res = arg_0.Load(uint3(arg_1, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_4c67be();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_4c67be();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_4c67be();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/4c67be.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/4c67be.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..11dea1d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/4c67be.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture2D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_4c67be() {
+  uint2 arg_1 = (1u).xx;
+  float4 res = arg_0.Load(uint3(arg_1, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_4c67be();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_4c67be();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_4c67be();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/4c67be.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/4c67be.wgsl.expected.glsl
new file mode 100644
index 0000000..95b399d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/4c67be.wgsl.expected.glsl
@@ -0,0 +1,96 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(r32f) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_4c67be() {
+  uvec2 arg_1 = uvec2(1u);
+  vec4 res = texelFetch(arg_0, ivec2(arg_1));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_4c67be();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:10: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:10: '=' :  cannot convert from ' const float' to ' temp highp 4-component vector of float'
+ERROR: 0:10: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(r32f) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_4c67be() {
+  uvec2 arg_1 = uvec2(1u);
+  vec4 res = texelFetch(arg_0, ivec2(arg_1));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_4c67be();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:11: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:11: '=' :  cannot convert from ' const float' to ' temp highp 4-component vector of float'
+ERROR: 0:11: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(r32f) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_4c67be() {
+  uvec2 arg_1 = uvec2(1u);
+  vec4 res = texelFetch(arg_0, ivec2(arg_1));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_4c67be();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:10: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:10: '=' :  cannot convert from ' const float' to ' temp highp 4-component vector of float'
+ERROR: 0:10: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/4c67be.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/4c67be.wgsl.expected.msl
new file mode 100644
index 0000000..d7d0262
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/4c67be.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_4c67be(texture2d<float, access::read> tint_symbol_1, device float4* const tint_symbol_2) {
+  uint2 arg_1 = uint2(1u);
+  float4 res = tint_symbol_1.read(uint2(arg_1));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<float, access::read> tint_symbol_3, device float4* const tint_symbol_4) {
+  textureLoad_4c67be(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<float, access::read> tint_symbol_5 [[texture(0)]], device float4* tint_symbol_6 [[buffer(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::read> tint_symbol_7 [[texture(0)]], device float4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_4c67be(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d<float, access::read> tint_symbol_9 [[texture(0)]], device float4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_4c67be(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/4c67be.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/4c67be.wgsl.expected.spvasm
new file mode 100644
index 0000000..51c0f4f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/4c67be.wgsl.expected.spvasm
@@ -0,0 +1,97 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 49
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_4c67be "textureLoad_4c67be"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 0 0 2 R32f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+%prevent_dce_block = OpTypeStruct %v4float
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+     %uint_1 = OpConstant %uint 1
+         %22 = OpConstantComposite %v2uint %uint_1 %uint_1
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %25 = OpConstantNull %v2uint
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
+         %35 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_4c67be = OpFunction %void None %15
+         %18 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v2uint Function %25
+        %res = OpVariable %_ptr_Function_v4float Function %5
+               OpStore %arg_1 %22
+         %27 = OpLoad %11 %arg_0
+         %28 = OpLoad %v2uint %arg_1
+         %26 = OpImageRead %v4float %27 %28
+               OpStore %res %26
+         %33 = OpAccessChain %_ptr_StorageBuffer_v4float %prevent_dce %uint_0
+         %34 = OpLoad %v4float %res
+               OpStore %33 %34
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %35
+         %37 = OpLabel
+         %38 = OpFunctionCall %void %textureLoad_4c67be
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %40 = OpLabel
+         %41 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %41
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %44 = OpLabel
+         %45 = OpFunctionCall %void %textureLoad_4c67be
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %47 = OpLabel
+         %48 = OpFunctionCall %void %textureLoad_4c67be
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/4c67be.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/4c67be.wgsl.expected.wgsl
new file mode 100644
index 0000000..92dbde2
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/4c67be.wgsl.expected.wgsl
@@ -0,0 +1,27 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d<r32float, read>;
+
+fn textureLoad_4c67be() {
+  var arg_1 = vec2<u32>(1u);
+  var res : vec4<f32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_4c67be();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_4c67be();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_4c67be();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/4cdca5.wgsl b/test/tint/builtins/gen/var/textureLoad/4cdca5.wgsl
new file mode 100644
index 0000000..0b9dfef
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/4cdca5.wgsl
@@ -0,0 +1,50 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba8sint, read>;
+
+// fn textureLoad(texture: texture_storage_2d_array<rgba8sint, read>, coords: vec2<i32>, array_index: u32) -> vec4<i32>
+fn textureLoad_4cdca5() {
+  var arg_1 = vec2<i32>(1i);
+  var arg_2 = 1u;
+  var res: vec4<i32> = textureLoad(arg_0, arg_1, arg_2);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_4cdca5();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_4cdca5();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_4cdca5();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/4cdca5.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/4cdca5.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..0210b4f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/4cdca5.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_4cdca5() {
+  int2 arg_1 = (1).xx;
+  uint arg_2 = 1u;
+  int4 res = arg_0.Load(int4(int3(arg_1, int(arg_2)), 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_4cdca5();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_4cdca5();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_4cdca5();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/4cdca5.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/4cdca5.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..0210b4f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/4cdca5.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_4cdca5() {
+  int2 arg_1 = (1).xx;
+  uint arg_2 = 1u;
+  int4 res = arg_0.Load(int4(int3(arg_1, int(arg_2)), 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_4cdca5();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_4cdca5();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_4cdca5();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/4cdca5.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/4cdca5.wgsl.expected.glsl
new file mode 100644
index 0000000..e059ed6
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/4cdca5.wgsl.expected.glsl
@@ -0,0 +1,93 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba8i) uniform highp iimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_4cdca5() {
+  ivec2 arg_1 = ivec2(1);
+  uint arg_2 = 1u;
+  ivec4 res = texelFetch(arg_0, ivec3(arg_1, int(arg_2)));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_4cdca5();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba8i) uniform highp iimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_4cdca5() {
+  ivec2 arg_1 = ivec2(1);
+  uint arg_2 = 1u;
+  ivec4 res = texelFetch(arg_0, ivec3(arg_1, int(arg_2)));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_4cdca5();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba8i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba8i) uniform highp iimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_4cdca5() {
+  ivec2 arg_1 = ivec2(1);
+  uint arg_2 = 1u;
+  ivec4 res = texelFetch(arg_0, ivec3(arg_1, int(arg_2)));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_4cdca5();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/4cdca5.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/4cdca5.wgsl.expected.msl
new file mode 100644
index 0000000..49e9129
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/4cdca5.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_4cdca5(texture2d_array<int, access::read> tint_symbol_1, device int4* const tint_symbol_2) {
+  int2 arg_1 = int2(1);
+  uint arg_2 = 1u;
+  int4 res = tint_symbol_1.read(uint2(arg_1), arg_2);
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<int, access::read> tint_symbol_3, device int4* const tint_symbol_4) {
+  textureLoad_4cdca5(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<int, access::read> tint_symbol_5 [[texture(0)]], device int4* tint_symbol_6 [[buffer(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<int, access::read> tint_symbol_7 [[texture(0)]], device int4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_4cdca5(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<int, access::read> tint_symbol_9 [[texture(0)]], device int4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_4cdca5(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/4cdca5.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/4cdca5.wgsl.expected.spvasm
new file mode 100644
index 0000000..d010a66
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/4cdca5.wgsl.expected.spvasm
@@ -0,0 +1,112 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 62
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_4cdca5 "textureLoad_4cdca5"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 2D 0 1 0 2 Rgba8i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+      %v4int = OpTypeVector %int 4
+%prevent_dce_block = OpTypeStruct %v4int
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+      %v2int = OpTypeVector %int 2
+      %int_1 = OpConstant %int 1
+         %23 = OpConstantComposite %v2int %int_1 %int_1
+%_ptr_Function_v2int = OpTypePointer Function %v2int
+         %26 = OpConstantNull %v2int
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %31 = OpConstantNull %uint
+      %v3int = OpTypeVector %int 3
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+         %43 = OpConstantNull %v4int
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4int = OpTypePointer StorageBuffer %v4int
+         %48 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_4cdca5 = OpFunction %void None %17
+         %20 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v2int Function %26
+      %arg_2 = OpVariable %_ptr_Function_uint Function %31
+        %res = OpVariable %_ptr_Function_v4int Function %43
+               OpStore %arg_1 %23
+               OpStore %arg_2 %uint_1
+         %33 = OpLoad %11 %arg_0
+         %35 = OpLoad %v2int %arg_1
+         %36 = OpCompositeExtract %int %35 0
+         %37 = OpCompositeExtract %int %35 1
+         %39 = OpLoad %uint %arg_2
+         %38 = OpBitcast %int %39
+         %40 = OpCompositeConstruct %v3int %36 %37 %38
+         %32 = OpImageRead %v4int %33 %40
+               OpStore %res %32
+         %46 = OpAccessChain %_ptr_StorageBuffer_v4int %prevent_dce %uint_0
+         %47 = OpLoad %v4int %res
+               OpStore %46 %47
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %48
+         %50 = OpLabel
+         %51 = OpFunctionCall %void %textureLoad_4cdca5
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %53 = OpLabel
+         %54 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %54
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %57 = OpLabel
+         %58 = OpFunctionCall %void %textureLoad_4cdca5
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %60 = OpLabel
+         %61 = OpFunctionCall %void %textureLoad_4cdca5
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/4cdca5.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/4cdca5.wgsl.expected.wgsl
new file mode 100644
index 0000000..d6ba707
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/4cdca5.wgsl.expected.wgsl
@@ -0,0 +1,28 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba8sint, read>;
+
+fn textureLoad_4cdca5() {
+  var arg_1 = vec2<i32>(1i);
+  var arg_2 = 1u;
+  var res : vec4<i32> = textureLoad(arg_0, arg_1, arg_2);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_4cdca5();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_4cdca5();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_4cdca5();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/4fa6ae.wgsl b/test/tint/builtins/gen/var/textureLoad/4fa6ae.wgsl
new file mode 100644
index 0000000..1621e48
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/4fa6ae.wgsl
@@ -0,0 +1,49 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_3d<bgra8unorm, read>;
+
+// fn textureLoad(texture: texture_storage_3d<bgra8unorm, read>, coords: vec3<u32>) -> vec4<f32>
+fn textureLoad_4fa6ae() {
+  var arg_1 = vec3<u32>(1u);
+  var res: vec4<f32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_4fa6ae();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_4fa6ae();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_4fa6ae();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/4fa6ae.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/4fa6ae.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..a033c69
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/4fa6ae.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture3D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_4fa6ae() {
+  uint3 arg_1 = (1u).xxx;
+  float4 res = arg_0.Load(uint4(arg_1, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_4fa6ae();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_4fa6ae();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_4fa6ae();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/4fa6ae.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/4fa6ae.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..a033c69
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/4fa6ae.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture3D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_4fa6ae() {
+  uint3 arg_1 = (1u).xxx;
+  float4 res = arg_0.Load(uint4(arg_1, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_4fa6ae();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_4fa6ae();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_4fa6ae();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/4fa6ae.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/4fa6ae.wgsl.expected.glsl
new file mode 100644
index 0000000..aca0a1d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/4fa6ae.wgsl.expected.glsl
@@ -0,0 +1,90 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba8) uniform highp image3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_4fa6ae() {
+  uvec3 arg_1 = uvec3(1u);
+  vec4 res = texelFetch(arg_0, ivec3(arg_1));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_4fa6ae();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba8) uniform highp image3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_4fa6ae() {
+  uvec3 arg_1 = uvec3(1u);
+  vec4 res = texelFetch(arg_0, ivec3(arg_1));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_4fa6ae();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba8' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba8) uniform highp image3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_4fa6ae() {
+  uvec3 arg_1 = uvec3(1u);
+  vec4 res = texelFetch(arg_0, ivec3(arg_1));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_4fa6ae();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/4fa6ae.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/4fa6ae.wgsl.expected.msl
new file mode 100644
index 0000000..b92e8ba
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/4fa6ae.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_4fa6ae(texture3d<float, access::read> tint_symbol_1, device float4* const tint_symbol_2) {
+  uint3 arg_1 = uint3(1u);
+  float4 res = tint_symbol_1.read(uint3(arg_1));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<float, access::read> tint_symbol_3, device float4* const tint_symbol_4) {
+  textureLoad_4fa6ae(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<float, access::read> tint_symbol_5 [[texture(0)]], device float4* tint_symbol_6 [[buffer(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::read> tint_symbol_7 [[texture(0)]], device float4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_4fa6ae(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture3d<float, access::read> tint_symbol_9 [[texture(0)]], device float4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_4fa6ae(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/4fa6ae.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/4fa6ae.wgsl.expected.spvasm
new file mode 100644
index 0000000..8bdf1d3
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/4fa6ae.wgsl.expected.spvasm
@@ -0,0 +1,97 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 49
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_4fa6ae "textureLoad_4fa6ae"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 3D 0 0 0 2 Rgba8
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+%prevent_dce_block = OpTypeStruct %v4float
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v3uint = OpTypeVector %uint 3
+     %uint_1 = OpConstant %uint 1
+         %22 = OpConstantComposite %v3uint %uint_1 %uint_1 %uint_1
+%_ptr_Function_v3uint = OpTypePointer Function %v3uint
+         %25 = OpConstantNull %v3uint
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
+         %35 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_4fa6ae = OpFunction %void None %15
+         %18 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v3uint Function %25
+        %res = OpVariable %_ptr_Function_v4float Function %5
+               OpStore %arg_1 %22
+         %27 = OpLoad %11 %arg_0
+         %28 = OpLoad %v3uint %arg_1
+         %26 = OpImageRead %v4float %27 %28
+               OpStore %res %26
+         %33 = OpAccessChain %_ptr_StorageBuffer_v4float %prevent_dce %uint_0
+         %34 = OpLoad %v4float %res
+               OpStore %33 %34
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %35
+         %37 = OpLabel
+         %38 = OpFunctionCall %void %textureLoad_4fa6ae
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %40 = OpLabel
+         %41 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %41
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %44 = OpLabel
+         %45 = OpFunctionCall %void %textureLoad_4fa6ae
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %47 = OpLabel
+         %48 = OpFunctionCall %void %textureLoad_4fa6ae
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/4fa6ae.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/4fa6ae.wgsl.expected.wgsl
new file mode 100644
index 0000000..8f06517
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/4fa6ae.wgsl.expected.wgsl
@@ -0,0 +1,27 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_3d<bgra8unorm, read>;
+
+fn textureLoad_4fa6ae() {
+  var arg_1 = vec3<u32>(1u);
+  var res : vec4<f32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_4fa6ae();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_4fa6ae();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_4fa6ae();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/505aa2.wgsl b/test/tint/builtins/gen/var/textureLoad/505aa2.wgsl
new file mode 100644
index 0000000..5f0c751
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/505aa2.wgsl
@@ -0,0 +1,49 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_3d<r32sint, read>;
+
+// fn textureLoad(texture: texture_storage_3d<r32sint, read>, coords: vec3<i32>) -> vec4<i32>
+fn textureLoad_505aa2() {
+  var arg_1 = vec3<i32>(1i);
+  var res: vec4<i32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_505aa2();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_505aa2();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_505aa2();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/505aa2.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/505aa2.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..b02155d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/505aa2.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture3D<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_505aa2() {
+  int3 arg_1 = (1).xxx;
+  int4 res = arg_0.Load(int4(arg_1, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_505aa2();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_505aa2();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_505aa2();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/505aa2.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/505aa2.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..b02155d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/505aa2.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture3D<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_505aa2() {
+  int3 arg_1 = (1).xxx;
+  int4 res = arg_0.Load(int4(arg_1, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_505aa2();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_505aa2();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_505aa2();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/505aa2.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/505aa2.wgsl.expected.glsl
new file mode 100644
index 0000000..2caab52
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/505aa2.wgsl.expected.glsl
@@ -0,0 +1,96 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(r32i) uniform highp iimage3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_505aa2() {
+  ivec3 arg_1 = ivec3(1);
+  ivec4 res = texelFetch(arg_0, arg_1);
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_505aa2();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:10: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:10: '=' :  cannot convert from ' const float' to ' temp highp 4-component vector of int'
+ERROR: 0:10: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(r32i) uniform highp iimage3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_505aa2() {
+  ivec3 arg_1 = ivec3(1);
+  ivec4 res = texelFetch(arg_0, arg_1);
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_505aa2();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:11: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:11: '=' :  cannot convert from ' const float' to ' temp mediump 4-component vector of int'
+ERROR: 0:11: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(r32i) uniform highp iimage3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_505aa2() {
+  ivec3 arg_1 = ivec3(1);
+  ivec4 res = texelFetch(arg_0, arg_1);
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_505aa2();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:10: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:10: '=' :  cannot convert from ' const float' to ' temp highp 4-component vector of int'
+ERROR: 0:10: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/505aa2.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/505aa2.wgsl.expected.msl
new file mode 100644
index 0000000..733832b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/505aa2.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_505aa2(texture3d<int, access::read> tint_symbol_1, device int4* const tint_symbol_2) {
+  int3 arg_1 = int3(1);
+  int4 res = tint_symbol_1.read(uint3(arg_1));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<int, access::read> tint_symbol_3, device int4* const tint_symbol_4) {
+  textureLoad_505aa2(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<int, access::read> tint_symbol_5 [[texture(0)]], device int4* tint_symbol_6 [[buffer(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<int, access::read> tint_symbol_7 [[texture(0)]], device int4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_505aa2(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture3d<int, access::read> tint_symbol_9 [[texture(0)]], device int4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_505aa2(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/505aa2.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/505aa2.wgsl.expected.spvasm
new file mode 100644
index 0000000..79b1f63
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/505aa2.wgsl.expected.spvasm
@@ -0,0 +1,100 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 52
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_505aa2 "textureLoad_505aa2"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 3D 0 0 0 2 R32i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+      %v4int = OpTypeVector %int 4
+%prevent_dce_block = OpTypeStruct %v4int
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+      %v3int = OpTypeVector %int 3
+      %int_1 = OpConstant %int 1
+         %23 = OpConstantComposite %v3int %int_1 %int_1 %int_1
+%_ptr_Function_v3int = OpTypePointer Function %v3int
+         %26 = OpConstantNull %v3int
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+         %32 = OpConstantNull %v4int
+       %uint = OpTypeInt 32 0
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4int = OpTypePointer StorageBuffer %v4int
+         %38 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_505aa2 = OpFunction %void None %17
+         %20 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v3int Function %26
+        %res = OpVariable %_ptr_Function_v4int Function %32
+               OpStore %arg_1 %23
+         %28 = OpLoad %11 %arg_0
+         %29 = OpLoad %v3int %arg_1
+         %27 = OpImageRead %v4int %28 %29
+               OpStore %res %27
+         %36 = OpAccessChain %_ptr_StorageBuffer_v4int %prevent_dce %uint_0
+         %37 = OpLoad %v4int %res
+               OpStore %36 %37
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %38
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %textureLoad_505aa2
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %43 = OpLabel
+         %44 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %44
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %47 = OpLabel
+         %48 = OpFunctionCall %void %textureLoad_505aa2
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %50 = OpLabel
+         %51 = OpFunctionCall %void %textureLoad_505aa2
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/505aa2.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/505aa2.wgsl.expected.wgsl
new file mode 100644
index 0000000..9a167d07
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/505aa2.wgsl.expected.wgsl
@@ -0,0 +1,27 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_3d<r32sint, read>;
+
+fn textureLoad_505aa2() {
+  var arg_1 = vec3<i32>(1i);
+  var res : vec4<i32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_505aa2();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_505aa2();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_505aa2();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/50915c.wgsl b/test/tint/builtins/gen/var/textureLoad/50915c.wgsl
new file mode 100644
index 0000000..bf95a5b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/50915c.wgsl
@@ -0,0 +1,49 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_3d<rgba8uint, read>;
+
+// fn textureLoad(texture: texture_storage_3d<rgba8uint, read>, coords: vec3<u32>) -> vec4<u32>
+fn textureLoad_50915c() {
+  var arg_1 = vec3<u32>(1u);
+  var res: vec4<u32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_50915c();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_50915c();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_50915c();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/50915c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/50915c.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..b1fff5d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/50915c.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture3D<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_50915c() {
+  uint3 arg_1 = (1u).xxx;
+  uint4 res = arg_0.Load(uint4(arg_1, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_50915c();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_50915c();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_50915c();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/50915c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/50915c.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..b1fff5d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/50915c.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture3D<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_50915c() {
+  uint3 arg_1 = (1u).xxx;
+  uint4 res = arg_0.Load(uint4(arg_1, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_50915c();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_50915c();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_50915c();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/50915c.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/50915c.wgsl.expected.glsl
new file mode 100644
index 0000000..0da786d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/50915c.wgsl.expected.glsl
@@ -0,0 +1,90 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba8ui) uniform highp uimage3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_50915c() {
+  uvec3 arg_1 = uvec3(1u);
+  uvec4 res = texelFetch(arg_0, ivec3(arg_1));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_50915c();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba8ui) uniform highp uimage3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_50915c() {
+  uvec3 arg_1 = uvec3(1u);
+  uvec4 res = texelFetch(arg_0, ivec3(arg_1));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_50915c();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba8ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba8ui) uniform highp uimage3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_50915c() {
+  uvec3 arg_1 = uvec3(1u);
+  uvec4 res = texelFetch(arg_0, ivec3(arg_1));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_50915c();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/50915c.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/50915c.wgsl.expected.msl
new file mode 100644
index 0000000..b4dad1a
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/50915c.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_50915c(texture3d<uint, access::read> tint_symbol_1, device uint4* const tint_symbol_2) {
+  uint3 arg_1 = uint3(1u);
+  uint4 res = tint_symbol_1.read(uint3(arg_1));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<uint, access::read> tint_symbol_3, device uint4* const tint_symbol_4) {
+  textureLoad_50915c(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<uint, access::read> tint_symbol_5 [[texture(0)]], device uint4* tint_symbol_6 [[buffer(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<uint, access::read> tint_symbol_7 [[texture(0)]], device uint4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_50915c(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture3d<uint, access::read> tint_symbol_9 [[texture(0)]], device uint4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_50915c(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/50915c.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/50915c.wgsl.expected.spvasm
new file mode 100644
index 0000000..b650f9c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/50915c.wgsl.expected.spvasm
@@ -0,0 +1,99 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 51
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_50915c "textureLoad_50915c"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 3D 0 0 0 2 Rgba8ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+     %v4uint = OpTypeVector %uint 4
+%prevent_dce_block = OpTypeStruct %v4uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+     %v3uint = OpTypeVector %uint 3
+     %uint_1 = OpConstant %uint 1
+         %23 = OpConstantComposite %v3uint %uint_1 %uint_1 %uint_1
+%_ptr_Function_v3uint = OpTypePointer Function %v3uint
+         %26 = OpConstantNull %v3uint
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+         %32 = OpConstantNull %v4uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4uint = OpTypePointer StorageBuffer %v4uint
+         %37 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_50915c = OpFunction %void None %17
+         %20 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v3uint Function %26
+        %res = OpVariable %_ptr_Function_v4uint Function %32
+               OpStore %arg_1 %23
+         %28 = OpLoad %11 %arg_0
+         %29 = OpLoad %v3uint %arg_1
+         %27 = OpImageRead %v4uint %28 %29
+               OpStore %res %27
+         %35 = OpAccessChain %_ptr_StorageBuffer_v4uint %prevent_dce %uint_0
+         %36 = OpLoad %v4uint %res
+               OpStore %35 %36
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %37
+         %39 = OpLabel
+         %40 = OpFunctionCall %void %textureLoad_50915c
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %42 = OpLabel
+         %43 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %43
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %46 = OpLabel
+         %47 = OpFunctionCall %void %textureLoad_50915c
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %49 = OpLabel
+         %50 = OpFunctionCall %void %textureLoad_50915c
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/50915c.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/50915c.wgsl.expected.wgsl
new file mode 100644
index 0000000..c044213
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/50915c.wgsl.expected.wgsl
@@ -0,0 +1,27 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_3d<rgba8uint, read>;
+
+fn textureLoad_50915c() {
+  var arg_1 = vec3<u32>(1u);
+  var res : vec4<u32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_50915c();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_50915c();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_50915c();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/519ab5.wgsl b/test/tint/builtins/gen/var/textureLoad/519ab5.wgsl
new file mode 100644
index 0000000..6407774
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/519ab5.wgsl
@@ -0,0 +1,49 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_1d<rgba8unorm, read>;
+
+// fn textureLoad(texture: texture_storage_1d<rgba8unorm, read>, coords: i32) -> vec4<f32>
+fn textureLoad_519ab5() {
+  var arg_1 = 1i;
+  var res: vec4<f32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_519ab5();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_519ab5();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_519ab5();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/519ab5.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/519ab5.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..e240c83
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/519ab5.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture1D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_519ab5() {
+  int arg_1 = 1;
+  float4 res = arg_0.Load(int2(arg_1, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_519ab5();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_519ab5();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_519ab5();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/519ab5.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/519ab5.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..e240c83
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/519ab5.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture1D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_519ab5() {
+  int arg_1 = 1;
+  float4 res = arg_0.Load(int2(arg_1, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_519ab5();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_519ab5();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_519ab5();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/519ab5.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/519ab5.wgsl.expected.glsl
new file mode 100644
index 0000000..608dcac
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/519ab5.wgsl.expected.glsl
@@ -0,0 +1,90 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba8) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_519ab5() {
+  int arg_1 = 1;
+  vec4 res = texelFetch(arg_0, ivec2(arg_1, 0));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_519ab5();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba8) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_519ab5() {
+  int arg_1 = 1;
+  vec4 res = texelFetch(arg_0, ivec2(arg_1, 0));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_519ab5();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba8' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba8) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_519ab5() {
+  int arg_1 = 1;
+  vec4 res = texelFetch(arg_0, ivec2(arg_1, 0));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_519ab5();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/519ab5.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/519ab5.wgsl.expected.msl
new file mode 100644
index 0000000..f1cf1bb
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/519ab5.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_519ab5(texture1d<float, access::read> tint_symbol_1, device float4* const tint_symbol_2) {
+  int arg_1 = 1;
+  float4 res = tint_symbol_1.read(uint(arg_1));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<float, access::read> tint_symbol_3, device float4* const tint_symbol_4) {
+  textureLoad_519ab5(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<float, access::read> tint_symbol_5 [[texture(0)]], device float4* tint_symbol_6 [[buffer(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(texture1d<float, access::read> tint_symbol_7 [[texture(0)]], device float4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_519ab5(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture1d<float, access::read> tint_symbol_9 [[texture(0)]], device float4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_519ab5(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/519ab5.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/519ab5.wgsl.expected.spvasm
new file mode 100644
index 0000000..ff16511
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/519ab5.wgsl.expected.spvasm
@@ -0,0 +1,97 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 48
+; Schema: 0
+               OpCapability Shader
+               OpCapability Image1D
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_519ab5 "textureLoad_519ab5"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 1D 0 0 0 2 Rgba8
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+%prevent_dce_block = OpTypeStruct %v4float
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %int_1 = OpConstant %int 1
+%_ptr_Function_int = OpTypePointer Function %int
+         %23 = OpConstantNull %int
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+       %uint = OpTypeInt 32 0
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
+         %34 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_519ab5 = OpFunction %void None %15
+         %18 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_int Function %23
+        %res = OpVariable %_ptr_Function_v4float Function %5
+               OpStore %arg_1 %int_1
+         %25 = OpLoad %11 %arg_0
+         %26 = OpLoad %int %arg_1
+         %24 = OpImageRead %v4float %25 %26
+               OpStore %res %24
+         %32 = OpAccessChain %_ptr_StorageBuffer_v4float %prevent_dce %uint_0
+         %33 = OpLoad %v4float %res
+               OpStore %32 %33
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %34
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %textureLoad_519ab5
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %39 = OpLabel
+         %40 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %40
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %43 = OpLabel
+         %44 = OpFunctionCall %void %textureLoad_519ab5
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %46 = OpLabel
+         %47 = OpFunctionCall %void %textureLoad_519ab5
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/519ab5.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/519ab5.wgsl.expected.wgsl
new file mode 100644
index 0000000..76f5789
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/519ab5.wgsl.expected.wgsl
@@ -0,0 +1,27 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_1d<rgba8unorm, read>;
+
+fn textureLoad_519ab5() {
+  var arg_1 = 1i;
+  var res : vec4<f32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_519ab5();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_519ab5();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_519ab5();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/53378a.wgsl b/test/tint/builtins/gen/var/textureLoad/53378a.wgsl
new file mode 100644
index 0000000..d1f3e92
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/53378a.wgsl
@@ -0,0 +1,49 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d<rg32sint, read>;
+
+// fn textureLoad(texture: texture_storage_2d<rg32sint, read>, coords: vec2<i32>) -> vec4<i32>
+fn textureLoad_53378a() {
+  var arg_1 = vec2<i32>(1i);
+  var res: vec4<i32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_53378a();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_53378a();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_53378a();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/53378a.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/53378a.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..186e90a
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/53378a.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture2D<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_53378a() {
+  int2 arg_1 = (1).xx;
+  int4 res = arg_0.Load(int3(arg_1, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_53378a();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_53378a();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_53378a();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/53378a.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/53378a.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..186e90a
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/53378a.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture2D<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_53378a() {
+  int2 arg_1 = (1).xx;
+  int4 res = arg_0.Load(int3(arg_1, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_53378a();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_53378a();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_53378a();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/53378a.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/53378a.wgsl.expected.glsl
new file mode 100644
index 0000000..6675713
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/53378a.wgsl.expected.glsl
@@ -0,0 +1,93 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rg32i) uniform highp iimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_53378a() {
+  ivec2 arg_1 = ivec2(1);
+  ivec4 res = texelFetch(arg_0, arg_1);
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_53378a();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rg32i) uniform highp iimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_53378a() {
+  ivec2 arg_1 = ivec2(1);
+  ivec4 res = texelFetch(arg_0, arg_1);
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_53378a();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'image load-store format' : not supported with this profile: es
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rg32i) uniform highp iimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_53378a() {
+  ivec2 arg_1 = ivec2(1);
+  ivec4 res = texelFetch(arg_0, arg_1);
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_53378a();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/53378a.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/53378a.wgsl.expected.msl
new file mode 100644
index 0000000..f0e646e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/53378a.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_53378a(texture2d<int, access::read> tint_symbol_1, device int4* const tint_symbol_2) {
+  int2 arg_1 = int2(1);
+  int4 res = tint_symbol_1.read(uint2(arg_1));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<int, access::read> tint_symbol_3, device int4* const tint_symbol_4) {
+  textureLoad_53378a(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<int, access::read> tint_symbol_5 [[texture(0)]], device int4* tint_symbol_6 [[buffer(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<int, access::read> tint_symbol_7 [[texture(0)]], device int4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_53378a(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d<int, access::read> tint_symbol_9 [[texture(0)]], device int4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_53378a(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/53378a.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/53378a.wgsl.expected.spvasm
new file mode 100644
index 0000000..833a906
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/53378a.wgsl.expected.spvasm
@@ -0,0 +1,101 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 52
+; Schema: 0
+               OpCapability Shader
+               OpCapability StorageImageExtendedFormats
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_53378a "textureLoad_53378a"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 2D 0 0 0 2 Rg32i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+      %v4int = OpTypeVector %int 4
+%prevent_dce_block = OpTypeStruct %v4int
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+      %v2int = OpTypeVector %int 2
+      %int_1 = OpConstant %int 1
+         %23 = OpConstantComposite %v2int %int_1 %int_1
+%_ptr_Function_v2int = OpTypePointer Function %v2int
+         %26 = OpConstantNull %v2int
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+         %32 = OpConstantNull %v4int
+       %uint = OpTypeInt 32 0
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4int = OpTypePointer StorageBuffer %v4int
+         %38 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_53378a = OpFunction %void None %17
+         %20 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v2int Function %26
+        %res = OpVariable %_ptr_Function_v4int Function %32
+               OpStore %arg_1 %23
+         %28 = OpLoad %11 %arg_0
+         %29 = OpLoad %v2int %arg_1
+         %27 = OpImageRead %v4int %28 %29
+               OpStore %res %27
+         %36 = OpAccessChain %_ptr_StorageBuffer_v4int %prevent_dce %uint_0
+         %37 = OpLoad %v4int %res
+               OpStore %36 %37
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %38
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %textureLoad_53378a
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %43 = OpLabel
+         %44 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %44
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %47 = OpLabel
+         %48 = OpFunctionCall %void %textureLoad_53378a
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %50 = OpLabel
+         %51 = OpFunctionCall %void %textureLoad_53378a
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/53378a.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/53378a.wgsl.expected.wgsl
new file mode 100644
index 0000000..d3109a4
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/53378a.wgsl.expected.wgsl
@@ -0,0 +1,27 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d<rg32sint, read>;
+
+fn textureLoad_53378a() {
+  var arg_1 = vec2<i32>(1i);
+  var res : vec4<i32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_53378a();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_53378a();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_53378a();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/54e0ce.wgsl b/test/tint/builtins/gen/var/textureLoad/54e0ce.wgsl
new file mode 100644
index 0000000..aa5b1af
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/54e0ce.wgsl
@@ -0,0 +1,49 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d<bgra8unorm, read>;
+
+// fn textureLoad(texture: texture_storage_2d<bgra8unorm, read>, coords: vec2<u32>) -> vec4<f32>
+fn textureLoad_54e0ce() {
+  var arg_1 = vec2<u32>(1u);
+  var res: vec4<f32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_54e0ce();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_54e0ce();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_54e0ce();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/54e0ce.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/54e0ce.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..80fd53f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/54e0ce.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture2D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_54e0ce() {
+  uint2 arg_1 = (1u).xx;
+  float4 res = arg_0.Load(uint3(arg_1, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_54e0ce();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_54e0ce();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_54e0ce();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/54e0ce.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/54e0ce.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..80fd53f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/54e0ce.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture2D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_54e0ce() {
+  uint2 arg_1 = (1u).xx;
+  float4 res = arg_0.Load(uint3(arg_1, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_54e0ce();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_54e0ce();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_54e0ce();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/54e0ce.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/54e0ce.wgsl.expected.glsl
new file mode 100644
index 0000000..5878cda
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/54e0ce.wgsl.expected.glsl
@@ -0,0 +1,90 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba8) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_54e0ce() {
+  uvec2 arg_1 = uvec2(1u);
+  vec4 res = texelFetch(arg_0, ivec2(arg_1));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_54e0ce();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba8) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_54e0ce() {
+  uvec2 arg_1 = uvec2(1u);
+  vec4 res = texelFetch(arg_0, ivec2(arg_1));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_54e0ce();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba8' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba8) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_54e0ce() {
+  uvec2 arg_1 = uvec2(1u);
+  vec4 res = texelFetch(arg_0, ivec2(arg_1));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_54e0ce();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/54e0ce.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/54e0ce.wgsl.expected.msl
new file mode 100644
index 0000000..43eef53
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/54e0ce.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_54e0ce(texture2d<float, access::read> tint_symbol_1, device float4* const tint_symbol_2) {
+  uint2 arg_1 = uint2(1u);
+  float4 res = tint_symbol_1.read(uint2(arg_1));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<float, access::read> tint_symbol_3, device float4* const tint_symbol_4) {
+  textureLoad_54e0ce(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<float, access::read> tint_symbol_5 [[texture(0)]], device float4* tint_symbol_6 [[buffer(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::read> tint_symbol_7 [[texture(0)]], device float4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_54e0ce(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d<float, access::read> tint_symbol_9 [[texture(0)]], device float4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_54e0ce(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/54e0ce.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/54e0ce.wgsl.expected.spvasm
new file mode 100644
index 0000000..118dc52
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/54e0ce.wgsl.expected.spvasm
@@ -0,0 +1,97 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 49
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_54e0ce "textureLoad_54e0ce"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 0 0 2 Rgba8
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+%prevent_dce_block = OpTypeStruct %v4float
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+     %uint_1 = OpConstant %uint 1
+         %22 = OpConstantComposite %v2uint %uint_1 %uint_1
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %25 = OpConstantNull %v2uint
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
+         %35 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_54e0ce = OpFunction %void None %15
+         %18 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v2uint Function %25
+        %res = OpVariable %_ptr_Function_v4float Function %5
+               OpStore %arg_1 %22
+         %27 = OpLoad %11 %arg_0
+         %28 = OpLoad %v2uint %arg_1
+         %26 = OpImageRead %v4float %27 %28
+               OpStore %res %26
+         %33 = OpAccessChain %_ptr_StorageBuffer_v4float %prevent_dce %uint_0
+         %34 = OpLoad %v4float %res
+               OpStore %33 %34
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %35
+         %37 = OpLabel
+         %38 = OpFunctionCall %void %textureLoad_54e0ce
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %40 = OpLabel
+         %41 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %41
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %44 = OpLabel
+         %45 = OpFunctionCall %void %textureLoad_54e0ce
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %47 = OpLabel
+         %48 = OpFunctionCall %void %textureLoad_54e0ce
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/54e0ce.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/54e0ce.wgsl.expected.wgsl
new file mode 100644
index 0000000..00c014a
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/54e0ce.wgsl.expected.wgsl
@@ -0,0 +1,27 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d<bgra8unorm, read>;
+
+fn textureLoad_54e0ce() {
+  var arg_1 = vec2<u32>(1u);
+  var res : vec4<f32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_54e0ce();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_54e0ce();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_54e0ce();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/55e745.wgsl b/test/tint/builtins/gen/var/textureLoad/55e745.wgsl
new file mode 100644
index 0000000..997d498
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/55e745.wgsl
@@ -0,0 +1,50 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<r32sint, read>;
+
+// fn textureLoad(texture: texture_storage_2d_array<r32sint, read>, coords: vec2<u32>, array_index: i32) -> vec4<i32>
+fn textureLoad_55e745() {
+  var arg_1 = vec2<u32>(1u);
+  var arg_2 = 1i;
+  var res: vec4<i32> = textureLoad(arg_0, arg_1, arg_2);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_55e745();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_55e745();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_55e745();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/55e745.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/55e745.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..680a3c5
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/55e745.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_55e745() {
+  uint2 arg_1 = (1u).xx;
+  int arg_2 = 1;
+  int4 res = arg_0.Load(uint4(uint3(arg_1, uint(arg_2)), uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_55e745();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_55e745();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_55e745();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/55e745.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/55e745.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..680a3c5
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/55e745.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_55e745() {
+  uint2 arg_1 = (1u).xx;
+  int arg_2 = 1;
+  int4 res = arg_0.Load(uint4(uint3(arg_1, uint(arg_2)), uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_55e745();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_55e745();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_55e745();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/55e745.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/55e745.wgsl.expected.glsl
new file mode 100644
index 0000000..ef3b6ba
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/55e745.wgsl.expected.glsl
@@ -0,0 +1,99 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(r32i) uniform highp iimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_55e745() {
+  uvec2 arg_1 = uvec2(1u);
+  int arg_2 = 1;
+  ivec4 res = texelFetch(arg_0, ivec3(uvec3(arg_1, uint(arg_2))));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_55e745();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:11: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:11: '=' :  cannot convert from ' const float' to ' temp highp 4-component vector of int'
+ERROR: 0:11: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(r32i) uniform highp iimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_55e745() {
+  uvec2 arg_1 = uvec2(1u);
+  int arg_2 = 1;
+  ivec4 res = texelFetch(arg_0, ivec3(uvec3(arg_1, uint(arg_2))));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_55e745();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:12: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:12: '=' :  cannot convert from ' const float' to ' temp mediump 4-component vector of int'
+ERROR: 0:12: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(r32i) uniform highp iimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_55e745() {
+  uvec2 arg_1 = uvec2(1u);
+  int arg_2 = 1;
+  ivec4 res = texelFetch(arg_0, ivec3(uvec3(arg_1, uint(arg_2))));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_55e745();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:11: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:11: '=' :  cannot convert from ' const float' to ' temp highp 4-component vector of int'
+ERROR: 0:11: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/55e745.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/55e745.wgsl.expected.msl
new file mode 100644
index 0000000..8a1916f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/55e745.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_55e745(texture2d_array<int, access::read> tint_symbol_1, device int4* const tint_symbol_2) {
+  uint2 arg_1 = uint2(1u);
+  int arg_2 = 1;
+  int4 res = tint_symbol_1.read(uint2(arg_1), arg_2);
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<int, access::read> tint_symbol_3, device int4* const tint_symbol_4) {
+  textureLoad_55e745(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<int, access::read> tint_symbol_5 [[texture(0)]], device int4* tint_symbol_6 [[buffer(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<int, access::read> tint_symbol_7 [[texture(0)]], device int4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_55e745(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<int, access::read> tint_symbol_9 [[texture(0)]], device int4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_55e745(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/55e745.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/55e745.wgsl.expected.spvasm
new file mode 100644
index 0000000..481f294
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/55e745.wgsl.expected.spvasm
@@ -0,0 +1,112 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 62
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_55e745 "textureLoad_55e745"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 2D 0 1 0 2 R32i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+      %v4int = OpTypeVector %int 4
+%prevent_dce_block = OpTypeStruct %v4int
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+     %uint_1 = OpConstant %uint 1
+         %24 = OpConstantComposite %v2uint %uint_1 %uint_1
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %27 = OpConstantNull %v2uint
+      %int_1 = OpConstant %int 1
+%_ptr_Function_int = OpTypePointer Function %int
+         %31 = OpConstantNull %int
+     %v3uint = OpTypeVector %uint 3
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+         %43 = OpConstantNull %v4int
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4int = OpTypePointer StorageBuffer %v4int
+         %48 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_55e745 = OpFunction %void None %17
+         %20 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v2uint Function %27
+      %arg_2 = OpVariable %_ptr_Function_int Function %31
+        %res = OpVariable %_ptr_Function_v4int Function %43
+               OpStore %arg_1 %24
+               OpStore %arg_2 %int_1
+         %33 = OpLoad %11 %arg_0
+         %35 = OpLoad %v2uint %arg_1
+         %36 = OpCompositeExtract %uint %35 0
+         %37 = OpCompositeExtract %uint %35 1
+         %39 = OpLoad %int %arg_2
+         %38 = OpBitcast %uint %39
+         %40 = OpCompositeConstruct %v3uint %36 %37 %38
+         %32 = OpImageRead %v4int %33 %40
+               OpStore %res %32
+         %46 = OpAccessChain %_ptr_StorageBuffer_v4int %prevent_dce %uint_0
+         %47 = OpLoad %v4int %res
+               OpStore %46 %47
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %48
+         %50 = OpLabel
+         %51 = OpFunctionCall %void %textureLoad_55e745
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %53 = OpLabel
+         %54 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %54
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %57 = OpLabel
+         %58 = OpFunctionCall %void %textureLoad_55e745
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %60 = OpLabel
+         %61 = OpFunctionCall %void %textureLoad_55e745
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/55e745.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/55e745.wgsl.expected.wgsl
new file mode 100644
index 0000000..d0dc54e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/55e745.wgsl.expected.wgsl
@@ -0,0 +1,28 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<r32sint, read>;
+
+fn textureLoad_55e745() {
+  var arg_1 = vec2<u32>(1u);
+  var arg_2 = 1i;
+  var res : vec4<i32> = textureLoad(arg_0, arg_1, arg_2);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_55e745();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_55e745();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_55e745();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/560573.wgsl b/test/tint/builtins/gen/var/textureLoad/560573.wgsl
new file mode 100644
index 0000000..32fe0f3
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/560573.wgsl
@@ -0,0 +1,50 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<r32sint, read>;
+
+// fn textureLoad(texture: texture_storage_2d_array<r32sint, read>, coords: vec2<i32>, array_index: i32) -> vec4<i32>
+fn textureLoad_560573() {
+  var arg_1 = vec2<i32>(1i);
+  var arg_2 = 1i;
+  var res: vec4<i32> = textureLoad(arg_0, arg_1, arg_2);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_560573();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_560573();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_560573();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/560573.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/560573.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..33ef97a
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/560573.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_560573() {
+  int2 arg_1 = (1).xx;
+  int arg_2 = 1;
+  int4 res = arg_0.Load(int4(int3(arg_1, arg_2), 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_560573();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_560573();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_560573();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/560573.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/560573.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..33ef97a
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/560573.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_560573() {
+  int2 arg_1 = (1).xx;
+  int arg_2 = 1;
+  int4 res = arg_0.Load(int4(int3(arg_1, arg_2), 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_560573();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_560573();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_560573();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/560573.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/560573.wgsl.expected.glsl
new file mode 100644
index 0000000..a391014
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/560573.wgsl.expected.glsl
@@ -0,0 +1,99 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(r32i) uniform highp iimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_560573() {
+  ivec2 arg_1 = ivec2(1);
+  int arg_2 = 1;
+  ivec4 res = texelFetch(arg_0, ivec3(arg_1, arg_2));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_560573();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:11: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:11: '=' :  cannot convert from ' const float' to ' temp highp 4-component vector of int'
+ERROR: 0:11: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(r32i) uniform highp iimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_560573() {
+  ivec2 arg_1 = ivec2(1);
+  int arg_2 = 1;
+  ivec4 res = texelFetch(arg_0, ivec3(arg_1, arg_2));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_560573();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:12: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:12: '=' :  cannot convert from ' const float' to ' temp mediump 4-component vector of int'
+ERROR: 0:12: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(r32i) uniform highp iimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_560573() {
+  ivec2 arg_1 = ivec2(1);
+  int arg_2 = 1;
+  ivec4 res = texelFetch(arg_0, ivec3(arg_1, arg_2));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_560573();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:11: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:11: '=' :  cannot convert from ' const float' to ' temp highp 4-component vector of int'
+ERROR: 0:11: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/560573.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/560573.wgsl.expected.msl
new file mode 100644
index 0000000..50f9cdf
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/560573.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_560573(texture2d_array<int, access::read> tint_symbol_1, device int4* const tint_symbol_2) {
+  int2 arg_1 = int2(1);
+  int arg_2 = 1;
+  int4 res = tint_symbol_1.read(uint2(arg_1), arg_2);
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<int, access::read> tint_symbol_3, device int4* const tint_symbol_4) {
+  textureLoad_560573(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<int, access::read> tint_symbol_5 [[texture(0)]], device int4* tint_symbol_6 [[buffer(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<int, access::read> tint_symbol_7 [[texture(0)]], device int4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_560573(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<int, access::read> tint_symbol_9 [[texture(0)]], device int4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_560573(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/560573.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/560573.wgsl.expected.spvasm
new file mode 100644
index 0000000..78f73e9
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/560573.wgsl.expected.spvasm
@@ -0,0 +1,110 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 60
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_560573 "textureLoad_560573"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 2D 0 1 0 2 R32i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+      %v4int = OpTypeVector %int 4
+%prevent_dce_block = OpTypeStruct %v4int
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+      %v2int = OpTypeVector %int 2
+      %int_1 = OpConstant %int 1
+         %23 = OpConstantComposite %v2int %int_1 %int_1
+%_ptr_Function_v2int = OpTypePointer Function %v2int
+         %26 = OpConstantNull %v2int
+%_ptr_Function_int = OpTypePointer Function %int
+         %29 = OpConstantNull %int
+      %v3int = OpTypeVector %int 3
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+         %40 = OpConstantNull %v4int
+       %uint = OpTypeInt 32 0
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4int = OpTypePointer StorageBuffer %v4int
+         %46 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_560573 = OpFunction %void None %17
+         %20 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v2int Function %26
+      %arg_2 = OpVariable %_ptr_Function_int Function %29
+        %res = OpVariable %_ptr_Function_v4int Function %40
+               OpStore %arg_1 %23
+               OpStore %arg_2 %int_1
+         %31 = OpLoad %11 %arg_0
+         %33 = OpLoad %v2int %arg_1
+         %34 = OpCompositeExtract %int %33 0
+         %35 = OpCompositeExtract %int %33 1
+         %36 = OpLoad %int %arg_2
+         %37 = OpCompositeConstruct %v3int %34 %35 %36
+         %30 = OpImageRead %v4int %31 %37
+               OpStore %res %30
+         %44 = OpAccessChain %_ptr_StorageBuffer_v4int %prevent_dce %uint_0
+         %45 = OpLoad %v4int %res
+               OpStore %44 %45
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %46
+         %48 = OpLabel
+         %49 = OpFunctionCall %void %textureLoad_560573
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %51 = OpLabel
+         %52 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %52
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %55 = OpLabel
+         %56 = OpFunctionCall %void %textureLoad_560573
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %58 = OpLabel
+         %59 = OpFunctionCall %void %textureLoad_560573
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/560573.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/560573.wgsl.expected.wgsl
new file mode 100644
index 0000000..5eb1642
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/560573.wgsl.expected.wgsl
@@ -0,0 +1,28 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<r32sint, read>;
+
+fn textureLoad_560573() {
+  var arg_1 = vec2<i32>(1i);
+  var arg_2 = 1i;
+  var res : vec4<i32> = textureLoad(arg_0, arg_1, arg_2);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_560573();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_560573();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_560573();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/582015.wgsl b/test/tint/builtins/gen/var/textureLoad/582015.wgsl
new file mode 100644
index 0000000..9ad6fc7
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/582015.wgsl
@@ -0,0 +1,50 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba8sint, read>;
+
+// fn textureLoad(texture: texture_storage_2d_array<rgba8sint, read>, coords: vec2<i32>, array_index: i32) -> vec4<i32>
+fn textureLoad_582015() {
+  var arg_1 = vec2<i32>(1i);
+  var arg_2 = 1i;
+  var res: vec4<i32> = textureLoad(arg_0, arg_1, arg_2);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_582015();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_582015();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_582015();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/582015.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/582015.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..273ab99
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/582015.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_582015() {
+  int2 arg_1 = (1).xx;
+  int arg_2 = 1;
+  int4 res = arg_0.Load(int4(int3(arg_1, arg_2), 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_582015();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_582015();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_582015();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/582015.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/582015.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..273ab99
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/582015.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_582015() {
+  int2 arg_1 = (1).xx;
+  int arg_2 = 1;
+  int4 res = arg_0.Load(int4(int3(arg_1, arg_2), 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_582015();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_582015();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_582015();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/582015.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/582015.wgsl.expected.glsl
new file mode 100644
index 0000000..ed7d749
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/582015.wgsl.expected.glsl
@@ -0,0 +1,93 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba8i) uniform highp iimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_582015() {
+  ivec2 arg_1 = ivec2(1);
+  int arg_2 = 1;
+  ivec4 res = texelFetch(arg_0, ivec3(arg_1, arg_2));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_582015();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba8i) uniform highp iimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_582015() {
+  ivec2 arg_1 = ivec2(1);
+  int arg_2 = 1;
+  ivec4 res = texelFetch(arg_0, ivec3(arg_1, arg_2));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_582015();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba8i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba8i) uniform highp iimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_582015() {
+  ivec2 arg_1 = ivec2(1);
+  int arg_2 = 1;
+  ivec4 res = texelFetch(arg_0, ivec3(arg_1, arg_2));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_582015();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/582015.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/582015.wgsl.expected.msl
new file mode 100644
index 0000000..b47e692
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/582015.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_582015(texture2d_array<int, access::read> tint_symbol_1, device int4* const tint_symbol_2) {
+  int2 arg_1 = int2(1);
+  int arg_2 = 1;
+  int4 res = tint_symbol_1.read(uint2(arg_1), arg_2);
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<int, access::read> tint_symbol_3, device int4* const tint_symbol_4) {
+  textureLoad_582015(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<int, access::read> tint_symbol_5 [[texture(0)]], device int4* tint_symbol_6 [[buffer(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<int, access::read> tint_symbol_7 [[texture(0)]], device int4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_582015(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<int, access::read> tint_symbol_9 [[texture(0)]], device int4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_582015(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/582015.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/582015.wgsl.expected.spvasm
new file mode 100644
index 0000000..79dff26
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/582015.wgsl.expected.spvasm
@@ -0,0 +1,110 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 60
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_582015 "textureLoad_582015"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 2D 0 1 0 2 Rgba8i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+      %v4int = OpTypeVector %int 4
+%prevent_dce_block = OpTypeStruct %v4int
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+      %v2int = OpTypeVector %int 2
+      %int_1 = OpConstant %int 1
+         %23 = OpConstantComposite %v2int %int_1 %int_1
+%_ptr_Function_v2int = OpTypePointer Function %v2int
+         %26 = OpConstantNull %v2int
+%_ptr_Function_int = OpTypePointer Function %int
+         %29 = OpConstantNull %int
+      %v3int = OpTypeVector %int 3
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+         %40 = OpConstantNull %v4int
+       %uint = OpTypeInt 32 0
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4int = OpTypePointer StorageBuffer %v4int
+         %46 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_582015 = OpFunction %void None %17
+         %20 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v2int Function %26
+      %arg_2 = OpVariable %_ptr_Function_int Function %29
+        %res = OpVariable %_ptr_Function_v4int Function %40
+               OpStore %arg_1 %23
+               OpStore %arg_2 %int_1
+         %31 = OpLoad %11 %arg_0
+         %33 = OpLoad %v2int %arg_1
+         %34 = OpCompositeExtract %int %33 0
+         %35 = OpCompositeExtract %int %33 1
+         %36 = OpLoad %int %arg_2
+         %37 = OpCompositeConstruct %v3int %34 %35 %36
+         %30 = OpImageRead %v4int %31 %37
+               OpStore %res %30
+         %44 = OpAccessChain %_ptr_StorageBuffer_v4int %prevent_dce %uint_0
+         %45 = OpLoad %v4int %res
+               OpStore %44 %45
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %46
+         %48 = OpLabel
+         %49 = OpFunctionCall %void %textureLoad_582015
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %51 = OpLabel
+         %52 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %52
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %55 = OpLabel
+         %56 = OpFunctionCall %void %textureLoad_582015
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %58 = OpLabel
+         %59 = OpFunctionCall %void %textureLoad_582015
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/582015.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/582015.wgsl.expected.wgsl
new file mode 100644
index 0000000..883c25b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/582015.wgsl.expected.wgsl
@@ -0,0 +1,28 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba8sint, read>;
+
+fn textureLoad_582015() {
+  var arg_1 = vec2<i32>(1i);
+  var arg_2 = 1i;
+  var res : vec4<i32> = textureLoad(arg_0, arg_1, arg_2);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_582015();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_582015();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_582015();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/589eaa.wgsl b/test/tint/builtins/gen/var/textureLoad/589eaa.wgsl
new file mode 100644
index 0000000..830ccd5
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/589eaa.wgsl
@@ -0,0 +1,49 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_3d<rgba16float, read>;
+
+// fn textureLoad(texture: texture_storage_3d<rgba16float, read>, coords: vec3<u32>) -> vec4<f32>
+fn textureLoad_589eaa() {
+  var arg_1 = vec3<u32>(1u);
+  var res: vec4<f32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_589eaa();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_589eaa();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_589eaa();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/589eaa.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/589eaa.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..1cb08f1
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/589eaa.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture3D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_589eaa() {
+  uint3 arg_1 = (1u).xxx;
+  float4 res = arg_0.Load(uint4(arg_1, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_589eaa();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_589eaa();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_589eaa();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/589eaa.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/589eaa.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..1cb08f1
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/589eaa.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture3D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_589eaa() {
+  uint3 arg_1 = (1u).xxx;
+  float4 res = arg_0.Load(uint4(arg_1, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_589eaa();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_589eaa();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_589eaa();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/589eaa.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/589eaa.wgsl.expected.glsl
new file mode 100644
index 0000000..ceb218a
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/589eaa.wgsl.expected.glsl
@@ -0,0 +1,90 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba16f) uniform highp image3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_589eaa() {
+  uvec3 arg_1 = uvec3(1u);
+  vec4 res = texelFetch(arg_0, ivec3(arg_1));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_589eaa();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba16f' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba16f) uniform highp image3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_589eaa() {
+  uvec3 arg_1 = uvec3(1u);
+  vec4 res = texelFetch(arg_0, ivec3(arg_1));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_589eaa();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba16f' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba16f) uniform highp image3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_589eaa() {
+  uvec3 arg_1 = uvec3(1u);
+  vec4 res = texelFetch(arg_0, ivec3(arg_1));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_589eaa();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba16f' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/589eaa.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/589eaa.wgsl.expected.msl
new file mode 100644
index 0000000..21a31ac
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/589eaa.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_589eaa(texture3d<float, access::read> tint_symbol_1, device float4* const tint_symbol_2) {
+  uint3 arg_1 = uint3(1u);
+  float4 res = tint_symbol_1.read(uint3(arg_1));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<float, access::read> tint_symbol_3, device float4* const tint_symbol_4) {
+  textureLoad_589eaa(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<float, access::read> tint_symbol_5 [[texture(0)]], device float4* tint_symbol_6 [[buffer(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::read> tint_symbol_7 [[texture(0)]], device float4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_589eaa(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture3d<float, access::read> tint_symbol_9 [[texture(0)]], device float4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_589eaa(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/589eaa.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/589eaa.wgsl.expected.spvasm
new file mode 100644
index 0000000..accee13
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/589eaa.wgsl.expected.spvasm
@@ -0,0 +1,97 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 49
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_589eaa "textureLoad_589eaa"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 3D 0 0 0 2 Rgba16f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+%prevent_dce_block = OpTypeStruct %v4float
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v3uint = OpTypeVector %uint 3
+     %uint_1 = OpConstant %uint 1
+         %22 = OpConstantComposite %v3uint %uint_1 %uint_1 %uint_1
+%_ptr_Function_v3uint = OpTypePointer Function %v3uint
+         %25 = OpConstantNull %v3uint
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
+         %35 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_589eaa = OpFunction %void None %15
+         %18 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v3uint Function %25
+        %res = OpVariable %_ptr_Function_v4float Function %5
+               OpStore %arg_1 %22
+         %27 = OpLoad %11 %arg_0
+         %28 = OpLoad %v3uint %arg_1
+         %26 = OpImageRead %v4float %27 %28
+               OpStore %res %26
+         %33 = OpAccessChain %_ptr_StorageBuffer_v4float %prevent_dce %uint_0
+         %34 = OpLoad %v4float %res
+               OpStore %33 %34
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %35
+         %37 = OpLabel
+         %38 = OpFunctionCall %void %textureLoad_589eaa
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %40 = OpLabel
+         %41 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %41
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %44 = OpLabel
+         %45 = OpFunctionCall %void %textureLoad_589eaa
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %47 = OpLabel
+         %48 = OpFunctionCall %void %textureLoad_589eaa
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/589eaa.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/589eaa.wgsl.expected.wgsl
new file mode 100644
index 0000000..efdf257
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/589eaa.wgsl.expected.wgsl
@@ -0,0 +1,27 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_3d<rgba16float, read>;
+
+fn textureLoad_589eaa() {
+  var arg_1 = vec3<u32>(1u);
+  var res : vec4<f32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_589eaa();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_589eaa();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_589eaa();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/5abbf2.wgsl b/test/tint/builtins/gen/var/textureLoad/5abbf2.wgsl
new file mode 100644
index 0000000..f2b99cd
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/5abbf2.wgsl
@@ -0,0 +1,49 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_1d<rg32float, read>;
+
+// fn textureLoad(texture: texture_storage_1d<rg32float, read>, coords: u32) -> vec4<f32>
+fn textureLoad_5abbf2() {
+  var arg_1 = 1u;
+  var res: vec4<f32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_5abbf2();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_5abbf2();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_5abbf2();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/5abbf2.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/5abbf2.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..7206242
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/5abbf2.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture1D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_5abbf2() {
+  uint arg_1 = 1u;
+  float4 res = arg_0.Load(uint2(arg_1, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_5abbf2();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_5abbf2();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_5abbf2();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/5abbf2.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/5abbf2.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..7206242
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/5abbf2.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture1D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_5abbf2() {
+  uint arg_1 = 1u;
+  float4 res = arg_0.Load(uint2(arg_1, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_5abbf2();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_5abbf2();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_5abbf2();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/5abbf2.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/5abbf2.wgsl.expected.glsl
new file mode 100644
index 0000000..86882d0
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/5abbf2.wgsl.expected.glsl
@@ -0,0 +1,93 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rg32f) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_5abbf2() {
+  uint arg_1 = 1u;
+  vec4 res = texelFetch(arg_0, ivec2(uvec2(arg_1, 0u)));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_5abbf2();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rg32f) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_5abbf2() {
+  uint arg_1 = 1u;
+  vec4 res = texelFetch(arg_0, ivec2(uvec2(arg_1, 0u)));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_5abbf2();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'image load-store format' : not supported with this profile: es
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rg32f) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_5abbf2() {
+  uint arg_1 = 1u;
+  vec4 res = texelFetch(arg_0, ivec2(uvec2(arg_1, 0u)));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_5abbf2();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/5abbf2.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/5abbf2.wgsl.expected.msl
new file mode 100644
index 0000000..da7cae8
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/5abbf2.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_5abbf2(texture1d<float, access::read> tint_symbol_1, device float4* const tint_symbol_2) {
+  uint arg_1 = 1u;
+  float4 res = tint_symbol_1.read(uint(arg_1));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<float, access::read> tint_symbol_3, device float4* const tint_symbol_4) {
+  textureLoad_5abbf2(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<float, access::read> tint_symbol_5 [[texture(0)]], device float4* tint_symbol_6 [[buffer(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(texture1d<float, access::read> tint_symbol_7 [[texture(0)]], device float4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_5abbf2(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture1d<float, access::read> tint_symbol_9 [[texture(0)]], device float4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_5abbf2(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/5abbf2.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/5abbf2.wgsl.expected.spvasm
new file mode 100644
index 0000000..38130cc
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/5abbf2.wgsl.expected.spvasm
@@ -0,0 +1,97 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 47
+; Schema: 0
+               OpCapability Shader
+               OpCapability Image1D
+               OpCapability StorageImageExtendedFormats
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_5abbf2 "textureLoad_5abbf2"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 1D 0 0 0 2 Rg32f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+%prevent_dce_block = OpTypeStruct %v4float
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %23 = OpConstantNull %uint
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
+         %33 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_5abbf2 = OpFunction %void None %15
+         %18 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_uint Function %23
+        %res = OpVariable %_ptr_Function_v4float Function %5
+               OpStore %arg_1 %uint_1
+         %25 = OpLoad %11 %arg_0
+         %26 = OpLoad %uint %arg_1
+         %24 = OpImageRead %v4float %25 %26
+               OpStore %res %24
+         %31 = OpAccessChain %_ptr_StorageBuffer_v4float %prevent_dce %uint_0
+         %32 = OpLoad %v4float %res
+               OpStore %31 %32
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %33
+         %35 = OpLabel
+         %36 = OpFunctionCall %void %textureLoad_5abbf2
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %38 = OpLabel
+         %39 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %39
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %42 = OpLabel
+         %43 = OpFunctionCall %void %textureLoad_5abbf2
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %45 = OpLabel
+         %46 = OpFunctionCall %void %textureLoad_5abbf2
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/5abbf2.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/5abbf2.wgsl.expected.wgsl
new file mode 100644
index 0000000..8265f3b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/5abbf2.wgsl.expected.wgsl
@@ -0,0 +1,27 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_1d<rg32float, read>;
+
+fn textureLoad_5abbf2() {
+  var arg_1 = 1u;
+  var res : vec4<f32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_5abbf2();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_5abbf2();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_5abbf2();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/5bb7fb.wgsl b/test/tint/builtins/gen/var/textureLoad/5bb7fb.wgsl
new file mode 100644
index 0000000..8f12b83
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/5bb7fb.wgsl
@@ -0,0 +1,49 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_1d<rg32uint, read>;
+
+// fn textureLoad(texture: texture_storage_1d<rg32uint, read>, coords: i32) -> vec4<u32>
+fn textureLoad_5bb7fb() {
+  var arg_1 = 1i;
+  var res: vec4<u32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_5bb7fb();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_5bb7fb();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_5bb7fb();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/5bb7fb.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/5bb7fb.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..c9a5b13d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/5bb7fb.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture1D<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_5bb7fb() {
+  int arg_1 = 1;
+  uint4 res = arg_0.Load(int2(arg_1, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_5bb7fb();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_5bb7fb();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_5bb7fb();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/5bb7fb.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/5bb7fb.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..c9a5b13d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/5bb7fb.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture1D<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_5bb7fb() {
+  int arg_1 = 1;
+  uint4 res = arg_0.Load(int2(arg_1, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_5bb7fb();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_5bb7fb();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_5bb7fb();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/5bb7fb.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/5bb7fb.wgsl.expected.glsl
new file mode 100644
index 0000000..5c7de55
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/5bb7fb.wgsl.expected.glsl
@@ -0,0 +1,93 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rg32ui) uniform highp uimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_5bb7fb() {
+  int arg_1 = 1;
+  uvec4 res = texelFetch(arg_0, ivec2(arg_1, 0));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_5bb7fb();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rg32ui) uniform highp uimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_5bb7fb() {
+  int arg_1 = 1;
+  uvec4 res = texelFetch(arg_0, ivec2(arg_1, 0));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_5bb7fb();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'image load-store format' : not supported with this profile: es
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rg32ui) uniform highp uimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_5bb7fb() {
+  int arg_1 = 1;
+  uvec4 res = texelFetch(arg_0, ivec2(arg_1, 0));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_5bb7fb();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/5bb7fb.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/5bb7fb.wgsl.expected.msl
new file mode 100644
index 0000000..c192e0e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/5bb7fb.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_5bb7fb(texture1d<uint, access::read> tint_symbol_1, device uint4* const tint_symbol_2) {
+  int arg_1 = 1;
+  uint4 res = tint_symbol_1.read(uint(arg_1));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<uint, access::read> tint_symbol_3, device uint4* const tint_symbol_4) {
+  textureLoad_5bb7fb(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<uint, access::read> tint_symbol_5 [[texture(0)]], device uint4* tint_symbol_6 [[buffer(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(texture1d<uint, access::read> tint_symbol_7 [[texture(0)]], device uint4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_5bb7fb(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture1d<uint, access::read> tint_symbol_9 [[texture(0)]], device uint4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_5bb7fb(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/5bb7fb.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/5bb7fb.wgsl.expected.spvasm
new file mode 100644
index 0000000..f3fa41b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/5bb7fb.wgsl.expected.spvasm
@@ -0,0 +1,100 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 50
+; Schema: 0
+               OpCapability Shader
+               OpCapability Image1D
+               OpCapability StorageImageExtendedFormats
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_5bb7fb "textureLoad_5bb7fb"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 1D 0 0 0 2 Rg32ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+     %v4uint = OpTypeVector %uint 4
+%prevent_dce_block = OpTypeStruct %v4uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %int_1 = OpConstant %int 1
+%_ptr_Function_int = OpTypePointer Function %int
+         %25 = OpConstantNull %int
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+         %31 = OpConstantNull %v4uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4uint = OpTypePointer StorageBuffer %v4uint
+         %36 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_5bb7fb = OpFunction %void None %17
+         %20 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_int Function %25
+        %res = OpVariable %_ptr_Function_v4uint Function %31
+               OpStore %arg_1 %int_1
+         %27 = OpLoad %11 %arg_0
+         %28 = OpLoad %int %arg_1
+         %26 = OpImageRead %v4uint %27 %28
+               OpStore %res %26
+         %34 = OpAccessChain %_ptr_StorageBuffer_v4uint %prevent_dce %uint_0
+         %35 = OpLoad %v4uint %res
+               OpStore %34 %35
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %36
+         %38 = OpLabel
+         %39 = OpFunctionCall %void %textureLoad_5bb7fb
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %41 = OpLabel
+         %42 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %42
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %45 = OpLabel
+         %46 = OpFunctionCall %void %textureLoad_5bb7fb
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %48 = OpLabel
+         %49 = OpFunctionCall %void %textureLoad_5bb7fb
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/5bb7fb.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/5bb7fb.wgsl.expected.wgsl
new file mode 100644
index 0000000..d245921
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/5bb7fb.wgsl.expected.wgsl
@@ -0,0 +1,27 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_1d<rg32uint, read>;
+
+fn textureLoad_5bb7fb() {
+  var arg_1 = 1i;
+  var res : vec4<u32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_5bb7fb();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_5bb7fb();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_5bb7fb();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/5cee3b.wgsl b/test/tint/builtins/gen/var/textureLoad/5cee3b.wgsl
new file mode 100644
index 0000000..03efa0c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/5cee3b.wgsl
@@ -0,0 +1,49 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_3d<r32uint, read>;
+
+// fn textureLoad(texture: texture_storage_3d<r32uint, read>, coords: vec3<u32>) -> vec4<u32>
+fn textureLoad_5cee3b() {
+  var arg_1 = vec3<u32>(1u);
+  var res: vec4<u32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_5cee3b();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_5cee3b();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_5cee3b();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/5cee3b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/5cee3b.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..a398266
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/5cee3b.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture3D<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_5cee3b() {
+  uint3 arg_1 = (1u).xxx;
+  uint4 res = arg_0.Load(uint4(arg_1, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_5cee3b();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_5cee3b();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_5cee3b();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/5cee3b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/5cee3b.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..a398266
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/5cee3b.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture3D<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_5cee3b() {
+  uint3 arg_1 = (1u).xxx;
+  uint4 res = arg_0.Load(uint4(arg_1, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_5cee3b();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_5cee3b();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_5cee3b();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/5cee3b.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/5cee3b.wgsl.expected.glsl
new file mode 100644
index 0000000..a08cb66
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/5cee3b.wgsl.expected.glsl
@@ -0,0 +1,96 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(r32ui) uniform highp uimage3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_5cee3b() {
+  uvec3 arg_1 = uvec3(1u);
+  uvec4 res = texelFetch(arg_0, ivec3(arg_1));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_5cee3b();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:10: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:10: '=' :  cannot convert from ' const float' to ' temp highp 4-component vector of uint'
+ERROR: 0:10: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(r32ui) uniform highp uimage3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_5cee3b() {
+  uvec3 arg_1 = uvec3(1u);
+  uvec4 res = texelFetch(arg_0, ivec3(arg_1));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_5cee3b();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:11: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:11: '=' :  cannot convert from ' const float' to ' temp mediump 4-component vector of uint'
+ERROR: 0:11: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(r32ui) uniform highp uimage3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_5cee3b() {
+  uvec3 arg_1 = uvec3(1u);
+  uvec4 res = texelFetch(arg_0, ivec3(arg_1));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_5cee3b();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:10: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:10: '=' :  cannot convert from ' const float' to ' temp highp 4-component vector of uint'
+ERROR: 0:10: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/5cee3b.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/5cee3b.wgsl.expected.msl
new file mode 100644
index 0000000..e07aaec
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/5cee3b.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_5cee3b(texture3d<uint, access::read> tint_symbol_1, device uint4* const tint_symbol_2) {
+  uint3 arg_1 = uint3(1u);
+  uint4 res = tint_symbol_1.read(uint3(arg_1));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<uint, access::read> tint_symbol_3, device uint4* const tint_symbol_4) {
+  textureLoad_5cee3b(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<uint, access::read> tint_symbol_5 [[texture(0)]], device uint4* tint_symbol_6 [[buffer(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<uint, access::read> tint_symbol_7 [[texture(0)]], device uint4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_5cee3b(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture3d<uint, access::read> tint_symbol_9 [[texture(0)]], device uint4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_5cee3b(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/5cee3b.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/5cee3b.wgsl.expected.spvasm
new file mode 100644
index 0000000..0c01505
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/5cee3b.wgsl.expected.spvasm
@@ -0,0 +1,99 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 51
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_5cee3b "textureLoad_5cee3b"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 3D 0 0 0 2 R32ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+     %v4uint = OpTypeVector %uint 4
+%prevent_dce_block = OpTypeStruct %v4uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+     %v3uint = OpTypeVector %uint 3
+     %uint_1 = OpConstant %uint 1
+         %23 = OpConstantComposite %v3uint %uint_1 %uint_1 %uint_1
+%_ptr_Function_v3uint = OpTypePointer Function %v3uint
+         %26 = OpConstantNull %v3uint
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+         %32 = OpConstantNull %v4uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4uint = OpTypePointer StorageBuffer %v4uint
+         %37 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_5cee3b = OpFunction %void None %17
+         %20 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v3uint Function %26
+        %res = OpVariable %_ptr_Function_v4uint Function %32
+               OpStore %arg_1 %23
+         %28 = OpLoad %11 %arg_0
+         %29 = OpLoad %v3uint %arg_1
+         %27 = OpImageRead %v4uint %28 %29
+               OpStore %res %27
+         %35 = OpAccessChain %_ptr_StorageBuffer_v4uint %prevent_dce %uint_0
+         %36 = OpLoad %v4uint %res
+               OpStore %35 %36
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %37
+         %39 = OpLabel
+         %40 = OpFunctionCall %void %textureLoad_5cee3b
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %42 = OpLabel
+         %43 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %43
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %46 = OpLabel
+         %47 = OpFunctionCall %void %textureLoad_5cee3b
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %49 = OpLabel
+         %50 = OpFunctionCall %void %textureLoad_5cee3b
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/5cee3b.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/5cee3b.wgsl.expected.wgsl
new file mode 100644
index 0000000..ba3821b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/5cee3b.wgsl.expected.wgsl
@@ -0,0 +1,27 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_3d<r32uint, read>;
+
+fn textureLoad_5cee3b() {
+  var arg_1 = vec3<u32>(1u);
+  var res : vec4<u32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_5cee3b();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_5cee3b();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_5cee3b();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/5d0a2f.wgsl b/test/tint/builtins/gen/var/textureLoad/5d0a2f.wgsl
new file mode 100644
index 0000000..d9561e9
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/5d0a2f.wgsl
@@ -0,0 +1,50 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<r32uint, read>;
+
+// fn textureLoad(texture: texture_storage_2d_array<r32uint, read>, coords: vec2<i32>, array_index: i32) -> vec4<u32>
+fn textureLoad_5d0a2f() {
+  var arg_1 = vec2<i32>(1i);
+  var arg_2 = 1i;
+  var res: vec4<u32> = textureLoad(arg_0, arg_1, arg_2);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_5d0a2f();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_5d0a2f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_5d0a2f();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/5d0a2f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/5d0a2f.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..2290b27
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/5d0a2f.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_5d0a2f() {
+  int2 arg_1 = (1).xx;
+  int arg_2 = 1;
+  uint4 res = arg_0.Load(int4(int3(arg_1, arg_2), 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_5d0a2f();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_5d0a2f();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_5d0a2f();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/5d0a2f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/5d0a2f.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..2290b27
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/5d0a2f.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_5d0a2f() {
+  int2 arg_1 = (1).xx;
+  int arg_2 = 1;
+  uint4 res = arg_0.Load(int4(int3(arg_1, arg_2), 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_5d0a2f();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_5d0a2f();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_5d0a2f();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/5d0a2f.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/5d0a2f.wgsl.expected.glsl
new file mode 100644
index 0000000..c436e38
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/5d0a2f.wgsl.expected.glsl
@@ -0,0 +1,99 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(r32ui) uniform highp uimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_5d0a2f() {
+  ivec2 arg_1 = ivec2(1);
+  int arg_2 = 1;
+  uvec4 res = texelFetch(arg_0, ivec3(arg_1, arg_2));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_5d0a2f();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:11: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:11: '=' :  cannot convert from ' const float' to ' temp highp 4-component vector of uint'
+ERROR: 0:11: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(r32ui) uniform highp uimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_5d0a2f() {
+  ivec2 arg_1 = ivec2(1);
+  int arg_2 = 1;
+  uvec4 res = texelFetch(arg_0, ivec3(arg_1, arg_2));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_5d0a2f();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:12: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:12: '=' :  cannot convert from ' const float' to ' temp mediump 4-component vector of uint'
+ERROR: 0:12: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(r32ui) uniform highp uimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_5d0a2f() {
+  ivec2 arg_1 = ivec2(1);
+  int arg_2 = 1;
+  uvec4 res = texelFetch(arg_0, ivec3(arg_1, arg_2));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_5d0a2f();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:11: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:11: '=' :  cannot convert from ' const float' to ' temp highp 4-component vector of uint'
+ERROR: 0:11: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/5d0a2f.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/5d0a2f.wgsl.expected.msl
new file mode 100644
index 0000000..4218b97
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/5d0a2f.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_5d0a2f(texture2d_array<uint, access::read> tint_symbol_1, device uint4* const tint_symbol_2) {
+  int2 arg_1 = int2(1);
+  int arg_2 = 1;
+  uint4 res = tint_symbol_1.read(uint2(arg_1), arg_2);
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<uint, access::read> tint_symbol_3, device uint4* const tint_symbol_4) {
+  textureLoad_5d0a2f(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<uint, access::read> tint_symbol_5 [[texture(0)]], device uint4* tint_symbol_6 [[buffer(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<uint, access::read> tint_symbol_7 [[texture(0)]], device uint4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_5d0a2f(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<uint, access::read> tint_symbol_9 [[texture(0)]], device uint4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_5d0a2f(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/5d0a2f.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/5d0a2f.wgsl.expected.spvasm
new file mode 100644
index 0000000..4250193
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/5d0a2f.wgsl.expected.spvasm
@@ -0,0 +1,110 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 60
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_5d0a2f "textureLoad_5d0a2f"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 2D 0 1 0 2 R32ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+     %v4uint = OpTypeVector %uint 4
+%prevent_dce_block = OpTypeStruct %v4uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %v2int = OpTypeVector %int 2
+      %int_1 = OpConstant %int 1
+         %24 = OpConstantComposite %v2int %int_1 %int_1
+%_ptr_Function_v2int = OpTypePointer Function %v2int
+         %27 = OpConstantNull %v2int
+%_ptr_Function_int = OpTypePointer Function %int
+         %30 = OpConstantNull %int
+      %v3int = OpTypeVector %int 3
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+         %41 = OpConstantNull %v4uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4uint = OpTypePointer StorageBuffer %v4uint
+         %46 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_5d0a2f = OpFunction %void None %17
+         %20 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v2int Function %27
+      %arg_2 = OpVariable %_ptr_Function_int Function %30
+        %res = OpVariable %_ptr_Function_v4uint Function %41
+               OpStore %arg_1 %24
+               OpStore %arg_2 %int_1
+         %32 = OpLoad %11 %arg_0
+         %34 = OpLoad %v2int %arg_1
+         %35 = OpCompositeExtract %int %34 0
+         %36 = OpCompositeExtract %int %34 1
+         %37 = OpLoad %int %arg_2
+         %38 = OpCompositeConstruct %v3int %35 %36 %37
+         %31 = OpImageRead %v4uint %32 %38
+               OpStore %res %31
+         %44 = OpAccessChain %_ptr_StorageBuffer_v4uint %prevent_dce %uint_0
+         %45 = OpLoad %v4uint %res
+               OpStore %44 %45
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %46
+         %48 = OpLabel
+         %49 = OpFunctionCall %void %textureLoad_5d0a2f
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %51 = OpLabel
+         %52 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %52
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %55 = OpLabel
+         %56 = OpFunctionCall %void %textureLoad_5d0a2f
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %58 = OpLabel
+         %59 = OpFunctionCall %void %textureLoad_5d0a2f
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/5d0a2f.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/5d0a2f.wgsl.expected.wgsl
new file mode 100644
index 0000000..1440ee4
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/5d0a2f.wgsl.expected.wgsl
@@ -0,0 +1,28 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<r32uint, read>;
+
+fn textureLoad_5d0a2f() {
+  var arg_1 = vec2<i32>(1i);
+  var arg_2 = 1i;
+  var res : vec4<u32> = textureLoad(arg_0, arg_1, arg_2);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_5d0a2f();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_5d0a2f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_5d0a2f();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/5d4042.wgsl b/test/tint/builtins/gen/var/textureLoad/5d4042.wgsl
new file mode 100644
index 0000000..059cd4f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/5d4042.wgsl
@@ -0,0 +1,50 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba32float, read>;
+
+// fn textureLoad(texture: texture_storage_2d_array<rgba32float, read>, coords: vec2<u32>, array_index: i32) -> vec4<f32>
+fn textureLoad_5d4042() {
+  var arg_1 = vec2<u32>(1u);
+  var arg_2 = 1i;
+  var res: vec4<f32> = textureLoad(arg_0, arg_1, arg_2);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_5d4042();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_5d4042();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_5d4042();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/5d4042.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/5d4042.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..8397afe
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/5d4042.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_5d4042() {
+  uint2 arg_1 = (1u).xx;
+  int arg_2 = 1;
+  float4 res = arg_0.Load(uint4(uint3(arg_1, uint(arg_2)), uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_5d4042();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_5d4042();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_5d4042();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/5d4042.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/5d4042.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..8397afe
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/5d4042.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_5d4042() {
+  uint2 arg_1 = (1u).xx;
+  int arg_2 = 1;
+  float4 res = arg_0.Load(uint4(uint3(arg_1, uint(arg_2)), uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_5d4042();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_5d4042();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_5d4042();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/5d4042.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/5d4042.wgsl.expected.glsl
new file mode 100644
index 0000000..9a7bd44
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/5d4042.wgsl.expected.glsl
@@ -0,0 +1,93 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba32f) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_5d4042() {
+  uvec2 arg_1 = uvec2(1u);
+  int arg_2 = 1;
+  vec4 res = texelFetch(arg_0, ivec3(uvec3(arg_1, uint(arg_2))));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_5d4042();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba32f' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba32f) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_5d4042() {
+  uvec2 arg_1 = uvec2(1u);
+  int arg_2 = 1;
+  vec4 res = texelFetch(arg_0, ivec3(uvec3(arg_1, uint(arg_2))));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_5d4042();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba32f' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba32f) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_5d4042() {
+  uvec2 arg_1 = uvec2(1u);
+  int arg_2 = 1;
+  vec4 res = texelFetch(arg_0, ivec3(uvec3(arg_1, uint(arg_2))));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_5d4042();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba32f' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/5d4042.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/5d4042.wgsl.expected.msl
new file mode 100644
index 0000000..a961218
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/5d4042.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_5d4042(texture2d_array<float, access::read> tint_symbol_1, device float4* const tint_symbol_2) {
+  uint2 arg_1 = uint2(1u);
+  int arg_2 = 1;
+  float4 res = tint_symbol_1.read(uint2(arg_1), arg_2);
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<float, access::read> tint_symbol_3, device float4* const tint_symbol_4) {
+  textureLoad_5d4042(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<float, access::read> tint_symbol_5 [[texture(0)]], device float4* tint_symbol_6 [[buffer(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::read> tint_symbol_7 [[texture(0)]], device float4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_5d4042(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<float, access::read> tint_symbol_9 [[texture(0)]], device float4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_5d4042(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/5d4042.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/5d4042.wgsl.expected.spvasm
new file mode 100644
index 0000000..2aa55b2
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/5d4042.wgsl.expected.spvasm
@@ -0,0 +1,110 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 60
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_5d4042 "textureLoad_5d4042"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 1 0 2 Rgba32f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+%prevent_dce_block = OpTypeStruct %v4float
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+     %uint_1 = OpConstant %uint 1
+         %22 = OpConstantComposite %v2uint %uint_1 %uint_1
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %25 = OpConstantNull %v2uint
+        %int = OpTypeInt 32 1
+      %int_1 = OpConstant %int 1
+%_ptr_Function_int = OpTypePointer Function %int
+         %30 = OpConstantNull %int
+     %v3uint = OpTypeVector %uint 3
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
+         %46 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_5d4042 = OpFunction %void None %15
+         %18 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v2uint Function %25
+      %arg_2 = OpVariable %_ptr_Function_int Function %30
+        %res = OpVariable %_ptr_Function_v4float Function %5
+               OpStore %arg_1 %22
+               OpStore %arg_2 %int_1
+         %32 = OpLoad %11 %arg_0
+         %34 = OpLoad %v2uint %arg_1
+         %35 = OpCompositeExtract %uint %34 0
+         %36 = OpCompositeExtract %uint %34 1
+         %38 = OpLoad %int %arg_2
+         %37 = OpBitcast %uint %38
+         %39 = OpCompositeConstruct %v3uint %35 %36 %37
+         %31 = OpImageRead %v4float %32 %39
+               OpStore %res %31
+         %44 = OpAccessChain %_ptr_StorageBuffer_v4float %prevent_dce %uint_0
+         %45 = OpLoad %v4float %res
+               OpStore %44 %45
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %46
+         %48 = OpLabel
+         %49 = OpFunctionCall %void %textureLoad_5d4042
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %51 = OpLabel
+         %52 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %52
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %55 = OpLabel
+         %56 = OpFunctionCall %void %textureLoad_5d4042
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %58 = OpLabel
+         %59 = OpFunctionCall %void %textureLoad_5d4042
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/5d4042.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/5d4042.wgsl.expected.wgsl
new file mode 100644
index 0000000..c822627
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/5d4042.wgsl.expected.wgsl
@@ -0,0 +1,28 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba32float, read>;
+
+fn textureLoad_5d4042() {
+  var arg_1 = vec2<u32>(1u);
+  var arg_2 = 1i;
+  var res : vec4<f32> = textureLoad(arg_0, arg_1, arg_2);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_5d4042();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_5d4042();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_5d4042();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/5e8d3f.wgsl b/test/tint/builtins/gen/var/textureLoad/5e8d3f.wgsl
new file mode 100644
index 0000000..25d89d1
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/5e8d3f.wgsl
@@ -0,0 +1,49 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_3d<r32sint, read>;
+
+// fn textureLoad(texture: texture_storage_3d<r32sint, read>, coords: vec3<u32>) -> vec4<i32>
+fn textureLoad_5e8d3f() {
+  var arg_1 = vec3<u32>(1u);
+  var res: vec4<i32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_5e8d3f();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_5e8d3f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_5e8d3f();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/5e8d3f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/5e8d3f.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..80e9dc8
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/5e8d3f.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture3D<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_5e8d3f() {
+  uint3 arg_1 = (1u).xxx;
+  int4 res = arg_0.Load(uint4(arg_1, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_5e8d3f();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_5e8d3f();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_5e8d3f();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/5e8d3f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/5e8d3f.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..80e9dc8
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/5e8d3f.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture3D<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_5e8d3f() {
+  uint3 arg_1 = (1u).xxx;
+  int4 res = arg_0.Load(uint4(arg_1, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_5e8d3f();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_5e8d3f();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_5e8d3f();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/5e8d3f.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/5e8d3f.wgsl.expected.glsl
new file mode 100644
index 0000000..f8f4e72
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/5e8d3f.wgsl.expected.glsl
@@ -0,0 +1,96 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(r32i) uniform highp iimage3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_5e8d3f() {
+  uvec3 arg_1 = uvec3(1u);
+  ivec4 res = texelFetch(arg_0, ivec3(arg_1));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_5e8d3f();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:10: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:10: '=' :  cannot convert from ' const float' to ' temp highp 4-component vector of int'
+ERROR: 0:10: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(r32i) uniform highp iimage3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_5e8d3f() {
+  uvec3 arg_1 = uvec3(1u);
+  ivec4 res = texelFetch(arg_0, ivec3(arg_1));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_5e8d3f();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:11: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:11: '=' :  cannot convert from ' const float' to ' temp mediump 4-component vector of int'
+ERROR: 0:11: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(r32i) uniform highp iimage3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_5e8d3f() {
+  uvec3 arg_1 = uvec3(1u);
+  ivec4 res = texelFetch(arg_0, ivec3(arg_1));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_5e8d3f();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:10: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:10: '=' :  cannot convert from ' const float' to ' temp highp 4-component vector of int'
+ERROR: 0:10: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/5e8d3f.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/5e8d3f.wgsl.expected.msl
new file mode 100644
index 0000000..a72392d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/5e8d3f.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_5e8d3f(texture3d<int, access::read> tint_symbol_1, device int4* const tint_symbol_2) {
+  uint3 arg_1 = uint3(1u);
+  int4 res = tint_symbol_1.read(uint3(arg_1));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<int, access::read> tint_symbol_3, device int4* const tint_symbol_4) {
+  textureLoad_5e8d3f(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<int, access::read> tint_symbol_5 [[texture(0)]], device int4* tint_symbol_6 [[buffer(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<int, access::read> tint_symbol_7 [[texture(0)]], device int4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_5e8d3f(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture3d<int, access::read> tint_symbol_9 [[texture(0)]], device int4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_5e8d3f(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/5e8d3f.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/5e8d3f.wgsl.expected.spvasm
new file mode 100644
index 0000000..46e98b1
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/5e8d3f.wgsl.expected.spvasm
@@ -0,0 +1,100 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 52
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_5e8d3f "textureLoad_5e8d3f"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 3D 0 0 0 2 R32i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+      %v4int = OpTypeVector %int 4
+%prevent_dce_block = OpTypeStruct %v4int
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v3uint = OpTypeVector %uint 3
+     %uint_1 = OpConstant %uint 1
+         %24 = OpConstantComposite %v3uint %uint_1 %uint_1 %uint_1
+%_ptr_Function_v3uint = OpTypePointer Function %v3uint
+         %27 = OpConstantNull %v3uint
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+         %33 = OpConstantNull %v4int
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4int = OpTypePointer StorageBuffer %v4int
+         %38 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_5e8d3f = OpFunction %void None %17
+         %20 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v3uint Function %27
+        %res = OpVariable %_ptr_Function_v4int Function %33
+               OpStore %arg_1 %24
+         %29 = OpLoad %11 %arg_0
+         %30 = OpLoad %v3uint %arg_1
+         %28 = OpImageRead %v4int %29 %30
+               OpStore %res %28
+         %36 = OpAccessChain %_ptr_StorageBuffer_v4int %prevent_dce %uint_0
+         %37 = OpLoad %v4int %res
+               OpStore %36 %37
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %38
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %textureLoad_5e8d3f
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %43 = OpLabel
+         %44 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %44
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %47 = OpLabel
+         %48 = OpFunctionCall %void %textureLoad_5e8d3f
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %50 = OpLabel
+         %51 = OpFunctionCall %void %textureLoad_5e8d3f
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/5e8d3f.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/5e8d3f.wgsl.expected.wgsl
new file mode 100644
index 0000000..720967f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/5e8d3f.wgsl.expected.wgsl
@@ -0,0 +1,27 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_3d<r32sint, read>;
+
+fn textureLoad_5e8d3f() {
+  var arg_1 = vec3<u32>(1u);
+  var res : vec4<i32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_5e8d3f();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_5e8d3f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_5e8d3f();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/5f4473.wgsl b/test/tint/builtins/gen/var/textureLoad/5f4473.wgsl
new file mode 100644
index 0000000..fd8e1ce
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/5f4473.wgsl
@@ -0,0 +1,49 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_3d<rgba32uint, read>;
+
+// fn textureLoad(texture: texture_storage_3d<rgba32uint, read>, coords: vec3<u32>) -> vec4<u32>
+fn textureLoad_5f4473() {
+  var arg_1 = vec3<u32>(1u);
+  var res: vec4<u32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_5f4473();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_5f4473();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_5f4473();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/5f4473.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/5f4473.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..a0dea73
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/5f4473.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture3D<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_5f4473() {
+  uint3 arg_1 = (1u).xxx;
+  uint4 res = arg_0.Load(uint4(arg_1, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_5f4473();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_5f4473();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_5f4473();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/5f4473.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/5f4473.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..a0dea73
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/5f4473.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture3D<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_5f4473() {
+  uint3 arg_1 = (1u).xxx;
+  uint4 res = arg_0.Load(uint4(arg_1, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_5f4473();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_5f4473();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_5f4473();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/5f4473.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/5f4473.wgsl.expected.glsl
new file mode 100644
index 0000000..a7cf98c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/5f4473.wgsl.expected.glsl
@@ -0,0 +1,90 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba32ui) uniform highp uimage3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_5f4473() {
+  uvec3 arg_1 = uvec3(1u);
+  uvec4 res = texelFetch(arg_0, ivec3(arg_1));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_5f4473();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba32ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba32ui) uniform highp uimage3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_5f4473() {
+  uvec3 arg_1 = uvec3(1u);
+  uvec4 res = texelFetch(arg_0, ivec3(arg_1));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_5f4473();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba32ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba32ui) uniform highp uimage3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_5f4473() {
+  uvec3 arg_1 = uvec3(1u);
+  uvec4 res = texelFetch(arg_0, ivec3(arg_1));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_5f4473();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba32ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/5f4473.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/5f4473.wgsl.expected.msl
new file mode 100644
index 0000000..9b7c4c8
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/5f4473.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_5f4473(texture3d<uint, access::read> tint_symbol_1, device uint4* const tint_symbol_2) {
+  uint3 arg_1 = uint3(1u);
+  uint4 res = tint_symbol_1.read(uint3(arg_1));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<uint, access::read> tint_symbol_3, device uint4* const tint_symbol_4) {
+  textureLoad_5f4473(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<uint, access::read> tint_symbol_5 [[texture(0)]], device uint4* tint_symbol_6 [[buffer(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<uint, access::read> tint_symbol_7 [[texture(0)]], device uint4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_5f4473(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture3d<uint, access::read> tint_symbol_9 [[texture(0)]], device uint4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_5f4473(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/5f4473.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/5f4473.wgsl.expected.spvasm
new file mode 100644
index 0000000..3a641e6
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/5f4473.wgsl.expected.spvasm
@@ -0,0 +1,99 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 51
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_5f4473 "textureLoad_5f4473"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 3D 0 0 0 2 Rgba32ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+     %v4uint = OpTypeVector %uint 4
+%prevent_dce_block = OpTypeStruct %v4uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+     %v3uint = OpTypeVector %uint 3
+     %uint_1 = OpConstant %uint 1
+         %23 = OpConstantComposite %v3uint %uint_1 %uint_1 %uint_1
+%_ptr_Function_v3uint = OpTypePointer Function %v3uint
+         %26 = OpConstantNull %v3uint
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+         %32 = OpConstantNull %v4uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4uint = OpTypePointer StorageBuffer %v4uint
+         %37 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_5f4473 = OpFunction %void None %17
+         %20 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v3uint Function %26
+        %res = OpVariable %_ptr_Function_v4uint Function %32
+               OpStore %arg_1 %23
+         %28 = OpLoad %11 %arg_0
+         %29 = OpLoad %v3uint %arg_1
+         %27 = OpImageRead %v4uint %28 %29
+               OpStore %res %27
+         %35 = OpAccessChain %_ptr_StorageBuffer_v4uint %prevent_dce %uint_0
+         %36 = OpLoad %v4uint %res
+               OpStore %35 %36
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %37
+         %39 = OpLabel
+         %40 = OpFunctionCall %void %textureLoad_5f4473
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %42 = OpLabel
+         %43 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %43
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %46 = OpLabel
+         %47 = OpFunctionCall %void %textureLoad_5f4473
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %49 = OpLabel
+         %50 = OpFunctionCall %void %textureLoad_5f4473
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/5f4473.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/5f4473.wgsl.expected.wgsl
new file mode 100644
index 0000000..fd9c393
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/5f4473.wgsl.expected.wgsl
@@ -0,0 +1,27 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_3d<rgba32uint, read>;
+
+fn textureLoad_5f4473() {
+  var arg_1 = vec3<u32>(1u);
+  var res : vec4<u32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_5f4473();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_5f4473();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_5f4473();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/5feb4d.wgsl b/test/tint/builtins/gen/var/textureLoad/5feb4d.wgsl
new file mode 100644
index 0000000..c2696c6
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/5feb4d.wgsl
@@ -0,0 +1,49 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_1d<r32float, read>;
+
+// fn textureLoad(texture: texture_storage_1d<r32float, read>, coords: u32) -> vec4<f32>
+fn textureLoad_5feb4d() {
+  var arg_1 = 1u;
+  var res: vec4<f32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_5feb4d();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_5feb4d();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_5feb4d();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/5feb4d.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/5feb4d.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..153ae02
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/5feb4d.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture1D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_5feb4d() {
+  uint arg_1 = 1u;
+  float4 res = arg_0.Load(uint2(arg_1, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_5feb4d();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_5feb4d();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_5feb4d();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/5feb4d.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/5feb4d.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..153ae02
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/5feb4d.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture1D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_5feb4d() {
+  uint arg_1 = 1u;
+  float4 res = arg_0.Load(uint2(arg_1, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_5feb4d();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_5feb4d();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_5feb4d();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/5feb4d.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/5feb4d.wgsl.expected.glsl
new file mode 100644
index 0000000..09c104a
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/5feb4d.wgsl.expected.glsl
@@ -0,0 +1,96 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(r32f) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_5feb4d() {
+  uint arg_1 = 1u;
+  vec4 res = texelFetch(arg_0, ivec2(uvec2(arg_1, 0u)));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_5feb4d();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:10: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:10: '=' :  cannot convert from ' const float' to ' temp highp 4-component vector of float'
+ERROR: 0:10: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(r32f) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_5feb4d() {
+  uint arg_1 = 1u;
+  vec4 res = texelFetch(arg_0, ivec2(uvec2(arg_1, 0u)));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_5feb4d();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:11: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:11: '=' :  cannot convert from ' const float' to ' temp highp 4-component vector of float'
+ERROR: 0:11: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(r32f) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_5feb4d() {
+  uint arg_1 = 1u;
+  vec4 res = texelFetch(arg_0, ivec2(uvec2(arg_1, 0u)));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_5feb4d();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:10: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:10: '=' :  cannot convert from ' const float' to ' temp highp 4-component vector of float'
+ERROR: 0:10: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/5feb4d.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/5feb4d.wgsl.expected.msl
new file mode 100644
index 0000000..3926f1c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/5feb4d.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_5feb4d(texture1d<float, access::read> tint_symbol_1, device float4* const tint_symbol_2) {
+  uint arg_1 = 1u;
+  float4 res = tint_symbol_1.read(uint(arg_1));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<float, access::read> tint_symbol_3, device float4* const tint_symbol_4) {
+  textureLoad_5feb4d(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<float, access::read> tint_symbol_5 [[texture(0)]], device float4* tint_symbol_6 [[buffer(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(texture1d<float, access::read> tint_symbol_7 [[texture(0)]], device float4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_5feb4d(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture1d<float, access::read> tint_symbol_9 [[texture(0)]], device float4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_5feb4d(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/5feb4d.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/5feb4d.wgsl.expected.spvasm
new file mode 100644
index 0000000..ecbc235
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/5feb4d.wgsl.expected.spvasm
@@ -0,0 +1,96 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 47
+; Schema: 0
+               OpCapability Shader
+               OpCapability Image1D
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_5feb4d "textureLoad_5feb4d"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 1D 0 0 0 2 R32f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+%prevent_dce_block = OpTypeStruct %v4float
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %23 = OpConstantNull %uint
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
+         %33 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_5feb4d = OpFunction %void None %15
+         %18 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_uint Function %23
+        %res = OpVariable %_ptr_Function_v4float Function %5
+               OpStore %arg_1 %uint_1
+         %25 = OpLoad %11 %arg_0
+         %26 = OpLoad %uint %arg_1
+         %24 = OpImageRead %v4float %25 %26
+               OpStore %res %24
+         %31 = OpAccessChain %_ptr_StorageBuffer_v4float %prevent_dce %uint_0
+         %32 = OpLoad %v4float %res
+               OpStore %31 %32
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %33
+         %35 = OpLabel
+         %36 = OpFunctionCall %void %textureLoad_5feb4d
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %38 = OpLabel
+         %39 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %39
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %42 = OpLabel
+         %43 = OpFunctionCall %void %textureLoad_5feb4d
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %45 = OpLabel
+         %46 = OpFunctionCall %void %textureLoad_5feb4d
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/5feb4d.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/5feb4d.wgsl.expected.wgsl
new file mode 100644
index 0000000..337a4d9
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/5feb4d.wgsl.expected.wgsl
@@ -0,0 +1,27 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_1d<r32float, read>;
+
+fn textureLoad_5feb4d() {
+  var arg_1 = 1u;
+  var res : vec4<f32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_5feb4d();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_5feb4d();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_5feb4d();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/620caa.wgsl b/test/tint/builtins/gen/var/textureLoad/620caa.wgsl
new file mode 100644
index 0000000..ef66207
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/620caa.wgsl
@@ -0,0 +1,49 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d<rg32sint, read>;
+
+// fn textureLoad(texture: texture_storage_2d<rg32sint, read>, coords: vec2<u32>) -> vec4<i32>
+fn textureLoad_620caa() {
+  var arg_1 = vec2<u32>(1u);
+  var res: vec4<i32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_620caa();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_620caa();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_620caa();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/620caa.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/620caa.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..725a010
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/620caa.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture2D<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_620caa() {
+  uint2 arg_1 = (1u).xx;
+  int4 res = arg_0.Load(uint3(arg_1, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_620caa();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_620caa();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_620caa();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/620caa.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/620caa.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..725a010
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/620caa.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture2D<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_620caa() {
+  uint2 arg_1 = (1u).xx;
+  int4 res = arg_0.Load(uint3(arg_1, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_620caa();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_620caa();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_620caa();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/620caa.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/620caa.wgsl.expected.glsl
new file mode 100644
index 0000000..1891efb
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/620caa.wgsl.expected.glsl
@@ -0,0 +1,93 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rg32i) uniform highp iimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_620caa() {
+  uvec2 arg_1 = uvec2(1u);
+  ivec4 res = texelFetch(arg_0, ivec2(arg_1));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_620caa();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rg32i) uniform highp iimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_620caa() {
+  uvec2 arg_1 = uvec2(1u);
+  ivec4 res = texelFetch(arg_0, ivec2(arg_1));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_620caa();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'image load-store format' : not supported with this profile: es
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rg32i) uniform highp iimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_620caa() {
+  uvec2 arg_1 = uvec2(1u);
+  ivec4 res = texelFetch(arg_0, ivec2(arg_1));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_620caa();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/620caa.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/620caa.wgsl.expected.msl
new file mode 100644
index 0000000..7269eef
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/620caa.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_620caa(texture2d<int, access::read> tint_symbol_1, device int4* const tint_symbol_2) {
+  uint2 arg_1 = uint2(1u);
+  int4 res = tint_symbol_1.read(uint2(arg_1));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<int, access::read> tint_symbol_3, device int4* const tint_symbol_4) {
+  textureLoad_620caa(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<int, access::read> tint_symbol_5 [[texture(0)]], device int4* tint_symbol_6 [[buffer(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<int, access::read> tint_symbol_7 [[texture(0)]], device int4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_620caa(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d<int, access::read> tint_symbol_9 [[texture(0)]], device int4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_620caa(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/620caa.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/620caa.wgsl.expected.spvasm
new file mode 100644
index 0000000..95ce1d5
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/620caa.wgsl.expected.spvasm
@@ -0,0 +1,101 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 52
+; Schema: 0
+               OpCapability Shader
+               OpCapability StorageImageExtendedFormats
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_620caa "textureLoad_620caa"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 2D 0 0 0 2 Rg32i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+      %v4int = OpTypeVector %int 4
+%prevent_dce_block = OpTypeStruct %v4int
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+     %uint_1 = OpConstant %uint 1
+         %24 = OpConstantComposite %v2uint %uint_1 %uint_1
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %27 = OpConstantNull %v2uint
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+         %33 = OpConstantNull %v4int
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4int = OpTypePointer StorageBuffer %v4int
+         %38 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_620caa = OpFunction %void None %17
+         %20 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v2uint Function %27
+        %res = OpVariable %_ptr_Function_v4int Function %33
+               OpStore %arg_1 %24
+         %29 = OpLoad %11 %arg_0
+         %30 = OpLoad %v2uint %arg_1
+         %28 = OpImageRead %v4int %29 %30
+               OpStore %res %28
+         %36 = OpAccessChain %_ptr_StorageBuffer_v4int %prevent_dce %uint_0
+         %37 = OpLoad %v4int %res
+               OpStore %36 %37
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %38
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %textureLoad_620caa
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %43 = OpLabel
+         %44 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %44
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %47 = OpLabel
+         %48 = OpFunctionCall %void %textureLoad_620caa
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %50 = OpLabel
+         %51 = OpFunctionCall %void %textureLoad_620caa
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/620caa.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/620caa.wgsl.expected.wgsl
new file mode 100644
index 0000000..4290315
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/620caa.wgsl.expected.wgsl
@@ -0,0 +1,27 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d<rg32sint, read>;
+
+fn textureLoad_620caa() {
+  var arg_1 = vec2<u32>(1u);
+  var res : vec4<i32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_620caa();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_620caa();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_620caa();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/62d125.wgsl b/test/tint/builtins/gen/var/textureLoad/62d125.wgsl
new file mode 100644
index 0000000..c6e98a7
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/62d125.wgsl
@@ -0,0 +1,49 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_3d<rgba8snorm, read>;
+
+// fn textureLoad(texture: texture_storage_3d<rgba8snorm, read>, coords: vec3<i32>) -> vec4<f32>
+fn textureLoad_62d125() {
+  var arg_1 = vec3<i32>(1i);
+  var res: vec4<f32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_62d125();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_62d125();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_62d125();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/62d125.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/62d125.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..e49e50f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/62d125.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture3D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_62d125() {
+  int3 arg_1 = (1).xxx;
+  float4 res = arg_0.Load(int4(arg_1, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_62d125();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_62d125();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_62d125();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/62d125.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/62d125.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..e49e50f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/62d125.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture3D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_62d125() {
+  int3 arg_1 = (1).xxx;
+  float4 res = arg_0.Load(int4(arg_1, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_62d125();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_62d125();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_62d125();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/62d125.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/62d125.wgsl.expected.glsl
new file mode 100644
index 0000000..971f4611
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/62d125.wgsl.expected.glsl
@@ -0,0 +1,90 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba8_snorm) uniform highp image3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_62d125() {
+  ivec3 arg_1 = ivec3(1);
+  vec4 res = texelFetch(arg_0, arg_1);
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_62d125();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8_snorm' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba8_snorm) uniform highp image3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_62d125() {
+  ivec3 arg_1 = ivec3(1);
+  vec4 res = texelFetch(arg_0, arg_1);
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_62d125();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba8_snorm' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba8_snorm) uniform highp image3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_62d125() {
+  ivec3 arg_1 = ivec3(1);
+  vec4 res = texelFetch(arg_0, arg_1);
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_62d125();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8_snorm' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/62d125.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/62d125.wgsl.expected.msl
new file mode 100644
index 0000000..990cf30
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/62d125.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_62d125(texture3d<float, access::read> tint_symbol_1, device float4* const tint_symbol_2) {
+  int3 arg_1 = int3(1);
+  float4 res = tint_symbol_1.read(uint3(arg_1));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<float, access::read> tint_symbol_3, device float4* const tint_symbol_4) {
+  textureLoad_62d125(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<float, access::read> tint_symbol_5 [[texture(0)]], device float4* tint_symbol_6 [[buffer(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::read> tint_symbol_7 [[texture(0)]], device float4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_62d125(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture3d<float, access::read> tint_symbol_9 [[texture(0)]], device float4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_62d125(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/62d125.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/62d125.wgsl.expected.spvasm
new file mode 100644
index 0000000..3ce84ad
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/62d125.wgsl.expected.spvasm
@@ -0,0 +1,98 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 50
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_62d125 "textureLoad_62d125"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 3D 0 0 0 2 Rgba8Snorm
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+%prevent_dce_block = OpTypeStruct %v4float
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %v3int = OpTypeVector %int 3
+      %int_1 = OpConstant %int 1
+         %22 = OpConstantComposite %v3int %int_1 %int_1 %int_1
+%_ptr_Function_v3int = OpTypePointer Function %v3int
+         %25 = OpConstantNull %v3int
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+       %uint = OpTypeInt 32 0
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
+         %36 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_62d125 = OpFunction %void None %15
+         %18 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v3int Function %25
+        %res = OpVariable %_ptr_Function_v4float Function %5
+               OpStore %arg_1 %22
+         %27 = OpLoad %11 %arg_0
+         %28 = OpLoad %v3int %arg_1
+         %26 = OpImageRead %v4float %27 %28
+               OpStore %res %26
+         %34 = OpAccessChain %_ptr_StorageBuffer_v4float %prevent_dce %uint_0
+         %35 = OpLoad %v4float %res
+               OpStore %34 %35
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %36
+         %38 = OpLabel
+         %39 = OpFunctionCall %void %textureLoad_62d125
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %41 = OpLabel
+         %42 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %42
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %45 = OpLabel
+         %46 = OpFunctionCall %void %textureLoad_62d125
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %48 = OpLabel
+         %49 = OpFunctionCall %void %textureLoad_62d125
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/62d125.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/62d125.wgsl.expected.wgsl
new file mode 100644
index 0000000..370edbc
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/62d125.wgsl.expected.wgsl
@@ -0,0 +1,27 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_3d<rgba8snorm, read>;
+
+fn textureLoad_62d125() {
+  var arg_1 = vec3<i32>(1i);
+  var res : vec4<f32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_62d125();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_62d125();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_62d125();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/63be18.wgsl b/test/tint/builtins/gen/var/textureLoad/63be18.wgsl
new file mode 100644
index 0000000..a992c21
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/63be18.wgsl
@@ -0,0 +1,50 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rg32sint, read>;
+
+// fn textureLoad(texture: texture_storage_2d_array<rg32sint, read>, coords: vec2<u32>, array_index: u32) -> vec4<i32>
+fn textureLoad_63be18() {
+  var arg_1 = vec2<u32>(1u);
+  var arg_2 = 1u;
+  var res: vec4<i32> = textureLoad(arg_0, arg_1, arg_2);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_63be18();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_63be18();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_63be18();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/63be18.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/63be18.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..cf17ac4
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/63be18.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_63be18() {
+  uint2 arg_1 = (1u).xx;
+  uint arg_2 = 1u;
+  int4 res = arg_0.Load(uint4(uint3(arg_1, arg_2), uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_63be18();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_63be18();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_63be18();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/63be18.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/63be18.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..cf17ac4
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/63be18.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_63be18() {
+  uint2 arg_1 = (1u).xx;
+  uint arg_2 = 1u;
+  int4 res = arg_0.Load(uint4(uint3(arg_1, arg_2), uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_63be18();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_63be18();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_63be18();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/63be18.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/63be18.wgsl.expected.glsl
new file mode 100644
index 0000000..338bbed
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/63be18.wgsl.expected.glsl
@@ -0,0 +1,96 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rg32i) uniform highp iimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_63be18() {
+  uvec2 arg_1 = uvec2(1u);
+  uint arg_2 = 1u;
+  ivec4 res = texelFetch(arg_0, ivec3(uvec3(arg_1, arg_2)));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_63be18();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rg32i) uniform highp iimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_63be18() {
+  uvec2 arg_1 = uvec2(1u);
+  uint arg_2 = 1u;
+  ivec4 res = texelFetch(arg_0, ivec3(uvec3(arg_1, arg_2)));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_63be18();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'image load-store format' : not supported with this profile: es
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rg32i) uniform highp iimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_63be18() {
+  uvec2 arg_1 = uvec2(1u);
+  uint arg_2 = 1u;
+  ivec4 res = texelFetch(arg_0, ivec3(uvec3(arg_1, arg_2)));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_63be18();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/63be18.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/63be18.wgsl.expected.msl
new file mode 100644
index 0000000..84d0b31
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/63be18.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_63be18(texture2d_array<int, access::read> tint_symbol_1, device int4* const tint_symbol_2) {
+  uint2 arg_1 = uint2(1u);
+  uint arg_2 = 1u;
+  int4 res = tint_symbol_1.read(uint2(arg_1), arg_2);
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<int, access::read> tint_symbol_3, device int4* const tint_symbol_4) {
+  textureLoad_63be18(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<int, access::read> tint_symbol_5 [[texture(0)]], device int4* tint_symbol_6 [[buffer(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<int, access::read> tint_symbol_7 [[texture(0)]], device int4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_63be18(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<int, access::read> tint_symbol_9 [[texture(0)]], device int4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_63be18(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/63be18.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/63be18.wgsl.expected.spvasm
new file mode 100644
index 0000000..831886d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/63be18.wgsl.expected.spvasm
@@ -0,0 +1,111 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 60
+; Schema: 0
+               OpCapability Shader
+               OpCapability StorageImageExtendedFormats
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_63be18 "textureLoad_63be18"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 2D 0 1 0 2 Rg32i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+      %v4int = OpTypeVector %int 4
+%prevent_dce_block = OpTypeStruct %v4int
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+     %uint_1 = OpConstant %uint 1
+         %24 = OpConstantComposite %v2uint %uint_1 %uint_1
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %27 = OpConstantNull %v2uint
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %30 = OpConstantNull %uint
+     %v3uint = OpTypeVector %uint 3
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+         %41 = OpConstantNull %v4int
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4int = OpTypePointer StorageBuffer %v4int
+         %46 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_63be18 = OpFunction %void None %17
+         %20 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v2uint Function %27
+      %arg_2 = OpVariable %_ptr_Function_uint Function %30
+        %res = OpVariable %_ptr_Function_v4int Function %41
+               OpStore %arg_1 %24
+               OpStore %arg_2 %uint_1
+         %32 = OpLoad %11 %arg_0
+         %34 = OpLoad %v2uint %arg_1
+         %35 = OpCompositeExtract %uint %34 0
+         %36 = OpCompositeExtract %uint %34 1
+         %37 = OpLoad %uint %arg_2
+         %38 = OpCompositeConstruct %v3uint %35 %36 %37
+         %31 = OpImageRead %v4int %32 %38
+               OpStore %res %31
+         %44 = OpAccessChain %_ptr_StorageBuffer_v4int %prevent_dce %uint_0
+         %45 = OpLoad %v4int %res
+               OpStore %44 %45
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %46
+         %48 = OpLabel
+         %49 = OpFunctionCall %void %textureLoad_63be18
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %51 = OpLabel
+         %52 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %52
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %55 = OpLabel
+         %56 = OpFunctionCall %void %textureLoad_63be18
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %58 = OpLabel
+         %59 = OpFunctionCall %void %textureLoad_63be18
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/63be18.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/63be18.wgsl.expected.wgsl
new file mode 100644
index 0000000..fbab670
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/63be18.wgsl.expected.wgsl
@@ -0,0 +1,28 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rg32sint, read>;
+
+fn textureLoad_63be18() {
+  var arg_1 = vec2<u32>(1u);
+  var arg_2 = 1u;
+  var res : vec4<i32> = textureLoad(arg_0, arg_1, arg_2);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_63be18();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_63be18();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_63be18();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/65a4d0.wgsl b/test/tint/builtins/gen/var/textureLoad/65a4d0.wgsl
new file mode 100644
index 0000000..3631439
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/65a4d0.wgsl
@@ -0,0 +1,50 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba8unorm, read>;
+
+// fn textureLoad(texture: texture_storage_2d_array<rgba8unorm, read>, coords: vec2<u32>, array_index: i32) -> vec4<f32>
+fn textureLoad_65a4d0() {
+  var arg_1 = vec2<u32>(1u);
+  var arg_2 = 1i;
+  var res: vec4<f32> = textureLoad(arg_0, arg_1, arg_2);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_65a4d0();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_65a4d0();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_65a4d0();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/65a4d0.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/65a4d0.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..5868edb
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/65a4d0.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_65a4d0() {
+  uint2 arg_1 = (1u).xx;
+  int arg_2 = 1;
+  float4 res = arg_0.Load(uint4(uint3(arg_1, uint(arg_2)), uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_65a4d0();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_65a4d0();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_65a4d0();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/65a4d0.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/65a4d0.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..5868edb
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/65a4d0.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_65a4d0() {
+  uint2 arg_1 = (1u).xx;
+  int arg_2 = 1;
+  float4 res = arg_0.Load(uint4(uint3(arg_1, uint(arg_2)), uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_65a4d0();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_65a4d0();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_65a4d0();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/65a4d0.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/65a4d0.wgsl.expected.glsl
new file mode 100644
index 0000000..ded7eb1
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/65a4d0.wgsl.expected.glsl
@@ -0,0 +1,93 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba8) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_65a4d0() {
+  uvec2 arg_1 = uvec2(1u);
+  int arg_2 = 1;
+  vec4 res = texelFetch(arg_0, ivec3(uvec3(arg_1, uint(arg_2))));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_65a4d0();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba8) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_65a4d0() {
+  uvec2 arg_1 = uvec2(1u);
+  int arg_2 = 1;
+  vec4 res = texelFetch(arg_0, ivec3(uvec3(arg_1, uint(arg_2))));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_65a4d0();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba8' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba8) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_65a4d0() {
+  uvec2 arg_1 = uvec2(1u);
+  int arg_2 = 1;
+  vec4 res = texelFetch(arg_0, ivec3(uvec3(arg_1, uint(arg_2))));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_65a4d0();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/65a4d0.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/65a4d0.wgsl.expected.msl
new file mode 100644
index 0000000..ca2d137
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/65a4d0.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_65a4d0(texture2d_array<float, access::read> tint_symbol_1, device float4* const tint_symbol_2) {
+  uint2 arg_1 = uint2(1u);
+  int arg_2 = 1;
+  float4 res = tint_symbol_1.read(uint2(arg_1), arg_2);
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<float, access::read> tint_symbol_3, device float4* const tint_symbol_4) {
+  textureLoad_65a4d0(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<float, access::read> tint_symbol_5 [[texture(0)]], device float4* tint_symbol_6 [[buffer(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::read> tint_symbol_7 [[texture(0)]], device float4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_65a4d0(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<float, access::read> tint_symbol_9 [[texture(0)]], device float4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_65a4d0(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/65a4d0.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/65a4d0.wgsl.expected.spvasm
new file mode 100644
index 0000000..2ad6ef4
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/65a4d0.wgsl.expected.spvasm
@@ -0,0 +1,110 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 60
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_65a4d0 "textureLoad_65a4d0"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 1 0 2 Rgba8
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+%prevent_dce_block = OpTypeStruct %v4float
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+     %uint_1 = OpConstant %uint 1
+         %22 = OpConstantComposite %v2uint %uint_1 %uint_1
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %25 = OpConstantNull %v2uint
+        %int = OpTypeInt 32 1
+      %int_1 = OpConstant %int 1
+%_ptr_Function_int = OpTypePointer Function %int
+         %30 = OpConstantNull %int
+     %v3uint = OpTypeVector %uint 3
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
+         %46 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_65a4d0 = OpFunction %void None %15
+         %18 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v2uint Function %25
+      %arg_2 = OpVariable %_ptr_Function_int Function %30
+        %res = OpVariable %_ptr_Function_v4float Function %5
+               OpStore %arg_1 %22
+               OpStore %arg_2 %int_1
+         %32 = OpLoad %11 %arg_0
+         %34 = OpLoad %v2uint %arg_1
+         %35 = OpCompositeExtract %uint %34 0
+         %36 = OpCompositeExtract %uint %34 1
+         %38 = OpLoad %int %arg_2
+         %37 = OpBitcast %uint %38
+         %39 = OpCompositeConstruct %v3uint %35 %36 %37
+         %31 = OpImageRead %v4float %32 %39
+               OpStore %res %31
+         %44 = OpAccessChain %_ptr_StorageBuffer_v4float %prevent_dce %uint_0
+         %45 = OpLoad %v4float %res
+               OpStore %44 %45
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %46
+         %48 = OpLabel
+         %49 = OpFunctionCall %void %textureLoad_65a4d0
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %51 = OpLabel
+         %52 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %52
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %55 = OpLabel
+         %56 = OpFunctionCall %void %textureLoad_65a4d0
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %58 = OpLabel
+         %59 = OpFunctionCall %void %textureLoad_65a4d0
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/65a4d0.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/65a4d0.wgsl.expected.wgsl
new file mode 100644
index 0000000..773879b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/65a4d0.wgsl.expected.wgsl
@@ -0,0 +1,28 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba8unorm, read>;
+
+fn textureLoad_65a4d0() {
+  var arg_1 = vec2<u32>(1u);
+  var arg_2 = 1i;
+  var res : vec4<f32> = textureLoad(arg_0, arg_1, arg_2);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_65a4d0();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_65a4d0();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_65a4d0();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/6678b6.wgsl b/test/tint/builtins/gen/var/textureLoad/6678b6.wgsl
new file mode 100644
index 0000000..ff530cd
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/6678b6.wgsl
@@ -0,0 +1,49 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_1d<rgba16sint, read>;
+
+// fn textureLoad(texture: texture_storage_1d<rgba16sint, read>, coords: i32) -> vec4<i32>
+fn textureLoad_6678b6() {
+  var arg_1 = 1i;
+  var res: vec4<i32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_6678b6();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_6678b6();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_6678b6();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/6678b6.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/6678b6.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..339cfad
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/6678b6.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture1D<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_6678b6() {
+  int arg_1 = 1;
+  int4 res = arg_0.Load(int2(arg_1, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_6678b6();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_6678b6();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_6678b6();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/6678b6.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/6678b6.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..339cfad
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/6678b6.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture1D<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_6678b6() {
+  int arg_1 = 1;
+  int4 res = arg_0.Load(int2(arg_1, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_6678b6();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_6678b6();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_6678b6();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/6678b6.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/6678b6.wgsl.expected.glsl
new file mode 100644
index 0000000..35c3859
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/6678b6.wgsl.expected.glsl
@@ -0,0 +1,90 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba16i) uniform highp iimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_6678b6() {
+  int arg_1 = 1;
+  ivec4 res = texelFetch(arg_0, ivec2(arg_1, 0));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_6678b6();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba16i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba16i) uniform highp iimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_6678b6() {
+  int arg_1 = 1;
+  ivec4 res = texelFetch(arg_0, ivec2(arg_1, 0));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_6678b6();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba16i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba16i) uniform highp iimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_6678b6() {
+  int arg_1 = 1;
+  ivec4 res = texelFetch(arg_0, ivec2(arg_1, 0));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_6678b6();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba16i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/6678b6.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/6678b6.wgsl.expected.msl
new file mode 100644
index 0000000..e5366d8
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/6678b6.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_6678b6(texture1d<int, access::read> tint_symbol_1, device int4* const tint_symbol_2) {
+  int arg_1 = 1;
+  int4 res = tint_symbol_1.read(uint(arg_1));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<int, access::read> tint_symbol_3, device int4* const tint_symbol_4) {
+  textureLoad_6678b6(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<int, access::read> tint_symbol_5 [[texture(0)]], device int4* tint_symbol_6 [[buffer(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(texture1d<int, access::read> tint_symbol_7 [[texture(0)]], device int4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_6678b6(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture1d<int, access::read> tint_symbol_9 [[texture(0)]], device int4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_6678b6(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/6678b6.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/6678b6.wgsl.expected.spvasm
new file mode 100644
index 0000000..a8deacc
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/6678b6.wgsl.expected.spvasm
@@ -0,0 +1,99 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 50
+; Schema: 0
+               OpCapability Shader
+               OpCapability Image1D
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_6678b6 "textureLoad_6678b6"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 1D 0 0 0 2 Rgba16i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+      %v4int = OpTypeVector %int 4
+%prevent_dce_block = OpTypeStruct %v4int
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+      %int_1 = OpConstant %int 1
+%_ptr_Function_int = OpTypePointer Function %int
+         %24 = OpConstantNull %int
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+         %30 = OpConstantNull %v4int
+       %uint = OpTypeInt 32 0
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4int = OpTypePointer StorageBuffer %v4int
+         %36 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_6678b6 = OpFunction %void None %17
+         %20 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_int Function %24
+        %res = OpVariable %_ptr_Function_v4int Function %30
+               OpStore %arg_1 %int_1
+         %26 = OpLoad %11 %arg_0
+         %27 = OpLoad %int %arg_1
+         %25 = OpImageRead %v4int %26 %27
+               OpStore %res %25
+         %34 = OpAccessChain %_ptr_StorageBuffer_v4int %prevent_dce %uint_0
+         %35 = OpLoad %v4int %res
+               OpStore %34 %35
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %36
+         %38 = OpLabel
+         %39 = OpFunctionCall %void %textureLoad_6678b6
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %41 = OpLabel
+         %42 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %42
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %45 = OpLabel
+         %46 = OpFunctionCall %void %textureLoad_6678b6
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %48 = OpLabel
+         %49 = OpFunctionCall %void %textureLoad_6678b6
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/6678b6.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/6678b6.wgsl.expected.wgsl
new file mode 100644
index 0000000..54736cf
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/6678b6.wgsl.expected.wgsl
@@ -0,0 +1,27 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_1d<rgba16sint, read>;
+
+fn textureLoad_6678b6() {
+  var arg_1 = 1i;
+  var res : vec4<i32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_6678b6();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_6678b6();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_6678b6();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/67edca.wgsl b/test/tint/builtins/gen/var/textureLoad/67edca.wgsl
new file mode 100644
index 0000000..6d832ab
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/67edca.wgsl
@@ -0,0 +1,49 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_3d<rgba32uint, read>;
+
+// fn textureLoad(texture: texture_storage_3d<rgba32uint, read>, coords: vec3<i32>) -> vec4<u32>
+fn textureLoad_67edca() {
+  var arg_1 = vec3<i32>(1i);
+  var res: vec4<u32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_67edca();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_67edca();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_67edca();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/67edca.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/67edca.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..c41e655
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/67edca.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture3D<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_67edca() {
+  int3 arg_1 = (1).xxx;
+  uint4 res = arg_0.Load(int4(arg_1, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_67edca();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_67edca();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_67edca();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/67edca.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/67edca.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..c41e655
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/67edca.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture3D<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_67edca() {
+  int3 arg_1 = (1).xxx;
+  uint4 res = arg_0.Load(int4(arg_1, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_67edca();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_67edca();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_67edca();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/67edca.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/67edca.wgsl.expected.glsl
new file mode 100644
index 0000000..2f8bd29
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/67edca.wgsl.expected.glsl
@@ -0,0 +1,90 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba32ui) uniform highp uimage3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_67edca() {
+  ivec3 arg_1 = ivec3(1);
+  uvec4 res = texelFetch(arg_0, arg_1);
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_67edca();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba32ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba32ui) uniform highp uimage3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_67edca() {
+  ivec3 arg_1 = ivec3(1);
+  uvec4 res = texelFetch(arg_0, arg_1);
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_67edca();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba32ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba32ui) uniform highp uimage3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_67edca() {
+  ivec3 arg_1 = ivec3(1);
+  uvec4 res = texelFetch(arg_0, arg_1);
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_67edca();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba32ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/67edca.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/67edca.wgsl.expected.msl
new file mode 100644
index 0000000..0f8669a
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/67edca.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_67edca(texture3d<uint, access::read> tint_symbol_1, device uint4* const tint_symbol_2) {
+  int3 arg_1 = int3(1);
+  uint4 res = tint_symbol_1.read(uint3(arg_1));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<uint, access::read> tint_symbol_3, device uint4* const tint_symbol_4) {
+  textureLoad_67edca(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<uint, access::read> tint_symbol_5 [[texture(0)]], device uint4* tint_symbol_6 [[buffer(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<uint, access::read> tint_symbol_7 [[texture(0)]], device uint4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_67edca(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture3d<uint, access::read> tint_symbol_9 [[texture(0)]], device uint4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_67edca(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/67edca.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/67edca.wgsl.expected.spvasm
new file mode 100644
index 0000000..bac2f4a
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/67edca.wgsl.expected.spvasm
@@ -0,0 +1,100 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 52
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_67edca "textureLoad_67edca"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 3D 0 0 0 2 Rgba32ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+     %v4uint = OpTypeVector %uint 4
+%prevent_dce_block = OpTypeStruct %v4uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %v3int = OpTypeVector %int 3
+      %int_1 = OpConstant %int 1
+         %24 = OpConstantComposite %v3int %int_1 %int_1 %int_1
+%_ptr_Function_v3int = OpTypePointer Function %v3int
+         %27 = OpConstantNull %v3int
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+         %33 = OpConstantNull %v4uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4uint = OpTypePointer StorageBuffer %v4uint
+         %38 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_67edca = OpFunction %void None %17
+         %20 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v3int Function %27
+        %res = OpVariable %_ptr_Function_v4uint Function %33
+               OpStore %arg_1 %24
+         %29 = OpLoad %11 %arg_0
+         %30 = OpLoad %v3int %arg_1
+         %28 = OpImageRead %v4uint %29 %30
+               OpStore %res %28
+         %36 = OpAccessChain %_ptr_StorageBuffer_v4uint %prevent_dce %uint_0
+         %37 = OpLoad %v4uint %res
+               OpStore %36 %37
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %38
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %textureLoad_67edca
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %43 = OpLabel
+         %44 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %44
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %47 = OpLabel
+         %48 = OpFunctionCall %void %textureLoad_67edca
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %50 = OpLabel
+         %51 = OpFunctionCall %void %textureLoad_67edca
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/67edca.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/67edca.wgsl.expected.wgsl
new file mode 100644
index 0000000..2638375
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/67edca.wgsl.expected.wgsl
@@ -0,0 +1,27 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_3d<rgba32uint, read>;
+
+fn textureLoad_67edca() {
+  var arg_1 = vec3<i32>(1i);
+  var res : vec4<u32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_67edca();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_67edca();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_67edca();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/6f1750.wgsl b/test/tint/builtins/gen/var/textureLoad/6f1750.wgsl
new file mode 100644
index 0000000..10384cf
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/6f1750.wgsl
@@ -0,0 +1,50 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<r32float, read>;
+
+// fn textureLoad(texture: texture_storage_2d_array<r32float, read>, coords: vec2<u32>, array_index: u32) -> vec4<f32>
+fn textureLoad_6f1750() {
+  var arg_1 = vec2<u32>(1u);
+  var arg_2 = 1u;
+  var res: vec4<f32> = textureLoad(arg_0, arg_1, arg_2);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_6f1750();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_6f1750();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_6f1750();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/6f1750.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/6f1750.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..82e3830
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/6f1750.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_6f1750() {
+  uint2 arg_1 = (1u).xx;
+  uint arg_2 = 1u;
+  float4 res = arg_0.Load(uint4(uint3(arg_1, arg_2), uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_6f1750();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_6f1750();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_6f1750();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/6f1750.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/6f1750.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..82e3830
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/6f1750.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_6f1750() {
+  uint2 arg_1 = (1u).xx;
+  uint arg_2 = 1u;
+  float4 res = arg_0.Load(uint4(uint3(arg_1, arg_2), uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_6f1750();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_6f1750();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_6f1750();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/6f1750.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/6f1750.wgsl.expected.glsl
new file mode 100644
index 0000000..0b8ed33
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/6f1750.wgsl.expected.glsl
@@ -0,0 +1,99 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(r32f) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_6f1750() {
+  uvec2 arg_1 = uvec2(1u);
+  uint arg_2 = 1u;
+  vec4 res = texelFetch(arg_0, ivec3(uvec3(arg_1, arg_2)));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_6f1750();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:11: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:11: '=' :  cannot convert from ' const float' to ' temp highp 4-component vector of float'
+ERROR: 0:11: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(r32f) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_6f1750() {
+  uvec2 arg_1 = uvec2(1u);
+  uint arg_2 = 1u;
+  vec4 res = texelFetch(arg_0, ivec3(uvec3(arg_1, arg_2)));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_6f1750();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:12: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:12: '=' :  cannot convert from ' const float' to ' temp highp 4-component vector of float'
+ERROR: 0:12: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(r32f) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_6f1750() {
+  uvec2 arg_1 = uvec2(1u);
+  uint arg_2 = 1u;
+  vec4 res = texelFetch(arg_0, ivec3(uvec3(arg_1, arg_2)));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_6f1750();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:11: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:11: '=' :  cannot convert from ' const float' to ' temp highp 4-component vector of float'
+ERROR: 0:11: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/6f1750.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/6f1750.wgsl.expected.msl
new file mode 100644
index 0000000..2c39336
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/6f1750.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_6f1750(texture2d_array<float, access::read> tint_symbol_1, device float4* const tint_symbol_2) {
+  uint2 arg_1 = uint2(1u);
+  uint arg_2 = 1u;
+  float4 res = tint_symbol_1.read(uint2(arg_1), arg_2);
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<float, access::read> tint_symbol_3, device float4* const tint_symbol_4) {
+  textureLoad_6f1750(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<float, access::read> tint_symbol_5 [[texture(0)]], device float4* tint_symbol_6 [[buffer(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::read> tint_symbol_7 [[texture(0)]], device float4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_6f1750(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<float, access::read> tint_symbol_9 [[texture(0)]], device float4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_6f1750(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/6f1750.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/6f1750.wgsl.expected.spvasm
new file mode 100644
index 0000000..75f78fa
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/6f1750.wgsl.expected.spvasm
@@ -0,0 +1,107 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 57
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_6f1750 "textureLoad_6f1750"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 1 0 2 R32f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+%prevent_dce_block = OpTypeStruct %v4float
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+     %uint_1 = OpConstant %uint 1
+         %22 = OpConstantComposite %v2uint %uint_1 %uint_1
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %25 = OpConstantNull %v2uint
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %28 = OpConstantNull %uint
+     %v3uint = OpTypeVector %uint 3
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
+         %43 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_6f1750 = OpFunction %void None %15
+         %18 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v2uint Function %25
+      %arg_2 = OpVariable %_ptr_Function_uint Function %28
+        %res = OpVariable %_ptr_Function_v4float Function %5
+               OpStore %arg_1 %22
+               OpStore %arg_2 %uint_1
+         %30 = OpLoad %11 %arg_0
+         %32 = OpLoad %v2uint %arg_1
+         %33 = OpCompositeExtract %uint %32 0
+         %34 = OpCompositeExtract %uint %32 1
+         %35 = OpLoad %uint %arg_2
+         %36 = OpCompositeConstruct %v3uint %33 %34 %35
+         %29 = OpImageRead %v4float %30 %36
+               OpStore %res %29
+         %41 = OpAccessChain %_ptr_StorageBuffer_v4float %prevent_dce %uint_0
+         %42 = OpLoad %v4float %res
+               OpStore %41 %42
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %43
+         %45 = OpLabel
+         %46 = OpFunctionCall %void %textureLoad_6f1750
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %48 = OpLabel
+         %49 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %49
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %52 = OpLabel
+         %53 = OpFunctionCall %void %textureLoad_6f1750
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %55 = OpLabel
+         %56 = OpFunctionCall %void %textureLoad_6f1750
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/6f1750.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/6f1750.wgsl.expected.wgsl
new file mode 100644
index 0000000..dd9603b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/6f1750.wgsl.expected.wgsl
@@ -0,0 +1,28 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<r32float, read>;
+
+fn textureLoad_6f1750() {
+  var arg_1 = vec2<u32>(1u);
+  var arg_2 = 1u;
+  var res : vec4<f32> = textureLoad(arg_0, arg_1, arg_2);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_6f1750();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_6f1750();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_6f1750();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/72bb3c.wgsl b/test/tint/builtins/gen/var/textureLoad/72bb3c.wgsl
new file mode 100644
index 0000000..680ea34
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/72bb3c.wgsl
@@ -0,0 +1,50 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba8snorm, read>;
+
+// fn textureLoad(texture: texture_storage_2d_array<rgba8snorm, read>, coords: vec2<u32>, array_index: i32) -> vec4<f32>
+fn textureLoad_72bb3c() {
+  var arg_1 = vec2<u32>(1u);
+  var arg_2 = 1i;
+  var res: vec4<f32> = textureLoad(arg_0, arg_1, arg_2);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_72bb3c();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_72bb3c();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_72bb3c();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/72bb3c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/72bb3c.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..576c97d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/72bb3c.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_72bb3c() {
+  uint2 arg_1 = (1u).xx;
+  int arg_2 = 1;
+  float4 res = arg_0.Load(uint4(uint3(arg_1, uint(arg_2)), uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_72bb3c();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_72bb3c();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_72bb3c();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/72bb3c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/72bb3c.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..576c97d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/72bb3c.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_72bb3c() {
+  uint2 arg_1 = (1u).xx;
+  int arg_2 = 1;
+  float4 res = arg_0.Load(uint4(uint3(arg_1, uint(arg_2)), uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_72bb3c();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_72bb3c();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_72bb3c();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/72bb3c.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/72bb3c.wgsl.expected.glsl
new file mode 100644
index 0000000..c3b2333
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/72bb3c.wgsl.expected.glsl
@@ -0,0 +1,93 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba8_snorm) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_72bb3c() {
+  uvec2 arg_1 = uvec2(1u);
+  int arg_2 = 1;
+  vec4 res = texelFetch(arg_0, ivec3(uvec3(arg_1, uint(arg_2))));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_72bb3c();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8_snorm' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba8_snorm) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_72bb3c() {
+  uvec2 arg_1 = uvec2(1u);
+  int arg_2 = 1;
+  vec4 res = texelFetch(arg_0, ivec3(uvec3(arg_1, uint(arg_2))));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_72bb3c();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba8_snorm' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba8_snorm) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_72bb3c() {
+  uvec2 arg_1 = uvec2(1u);
+  int arg_2 = 1;
+  vec4 res = texelFetch(arg_0, ivec3(uvec3(arg_1, uint(arg_2))));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_72bb3c();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8_snorm' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/72bb3c.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/72bb3c.wgsl.expected.msl
new file mode 100644
index 0000000..a2fe6a4
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/72bb3c.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_72bb3c(texture2d_array<float, access::read> tint_symbol_1, device float4* const tint_symbol_2) {
+  uint2 arg_1 = uint2(1u);
+  int arg_2 = 1;
+  float4 res = tint_symbol_1.read(uint2(arg_1), arg_2);
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<float, access::read> tint_symbol_3, device float4* const tint_symbol_4) {
+  textureLoad_72bb3c(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<float, access::read> tint_symbol_5 [[texture(0)]], device float4* tint_symbol_6 [[buffer(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::read> tint_symbol_7 [[texture(0)]], device float4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_72bb3c(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<float, access::read> tint_symbol_9 [[texture(0)]], device float4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_72bb3c(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/72bb3c.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/72bb3c.wgsl.expected.spvasm
new file mode 100644
index 0000000..f8d6491
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/72bb3c.wgsl.expected.spvasm
@@ -0,0 +1,110 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 60
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_72bb3c "textureLoad_72bb3c"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 1 0 2 Rgba8Snorm
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+%prevent_dce_block = OpTypeStruct %v4float
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+     %uint_1 = OpConstant %uint 1
+         %22 = OpConstantComposite %v2uint %uint_1 %uint_1
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %25 = OpConstantNull %v2uint
+        %int = OpTypeInt 32 1
+      %int_1 = OpConstant %int 1
+%_ptr_Function_int = OpTypePointer Function %int
+         %30 = OpConstantNull %int
+     %v3uint = OpTypeVector %uint 3
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
+         %46 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_72bb3c = OpFunction %void None %15
+         %18 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v2uint Function %25
+      %arg_2 = OpVariable %_ptr_Function_int Function %30
+        %res = OpVariable %_ptr_Function_v4float Function %5
+               OpStore %arg_1 %22
+               OpStore %arg_2 %int_1
+         %32 = OpLoad %11 %arg_0
+         %34 = OpLoad %v2uint %arg_1
+         %35 = OpCompositeExtract %uint %34 0
+         %36 = OpCompositeExtract %uint %34 1
+         %38 = OpLoad %int %arg_2
+         %37 = OpBitcast %uint %38
+         %39 = OpCompositeConstruct %v3uint %35 %36 %37
+         %31 = OpImageRead %v4float %32 %39
+               OpStore %res %31
+         %44 = OpAccessChain %_ptr_StorageBuffer_v4float %prevent_dce %uint_0
+         %45 = OpLoad %v4float %res
+               OpStore %44 %45
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %46
+         %48 = OpLabel
+         %49 = OpFunctionCall %void %textureLoad_72bb3c
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %51 = OpLabel
+         %52 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %52
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %55 = OpLabel
+         %56 = OpFunctionCall %void %textureLoad_72bb3c
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %58 = OpLabel
+         %59 = OpFunctionCall %void %textureLoad_72bb3c
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/72bb3c.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/72bb3c.wgsl.expected.wgsl
new file mode 100644
index 0000000..324dfea
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/72bb3c.wgsl.expected.wgsl
@@ -0,0 +1,28 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba8snorm, read>;
+
+fn textureLoad_72bb3c() {
+  var arg_1 = vec2<u32>(1u);
+  var arg_2 = 1i;
+  var res : vec4<f32> = textureLoad(arg_0, arg_1, arg_2);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_72bb3c();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_72bb3c();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_72bb3c();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/749704.wgsl b/test/tint/builtins/gen/var/textureLoad/749704.wgsl
new file mode 100644
index 0000000..d062494
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/749704.wgsl
@@ -0,0 +1,49 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d<r32uint, read>;
+
+// fn textureLoad(texture: texture_storage_2d<r32uint, read>, coords: vec2<i32>) -> vec4<u32>
+fn textureLoad_749704() {
+  var arg_1 = vec2<i32>(1i);
+  var res: vec4<u32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_749704();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_749704();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_749704();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/749704.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/749704.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..610ddfc
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/749704.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture2D<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_749704() {
+  int2 arg_1 = (1).xx;
+  uint4 res = arg_0.Load(int3(arg_1, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_749704();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_749704();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_749704();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/749704.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/749704.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..610ddfc
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/749704.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture2D<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_749704() {
+  int2 arg_1 = (1).xx;
+  uint4 res = arg_0.Load(int3(arg_1, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_749704();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_749704();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_749704();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/749704.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/749704.wgsl.expected.glsl
new file mode 100644
index 0000000..cfeb145
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/749704.wgsl.expected.glsl
@@ -0,0 +1,96 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(r32ui) uniform highp uimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_749704() {
+  ivec2 arg_1 = ivec2(1);
+  uvec4 res = texelFetch(arg_0, arg_1);
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_749704();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:10: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:10: '=' :  cannot convert from ' const float' to ' temp highp 4-component vector of uint'
+ERROR: 0:10: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(r32ui) uniform highp uimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_749704() {
+  ivec2 arg_1 = ivec2(1);
+  uvec4 res = texelFetch(arg_0, arg_1);
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_749704();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:11: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:11: '=' :  cannot convert from ' const float' to ' temp mediump 4-component vector of uint'
+ERROR: 0:11: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(r32ui) uniform highp uimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_749704() {
+  ivec2 arg_1 = ivec2(1);
+  uvec4 res = texelFetch(arg_0, arg_1);
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_749704();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:10: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:10: '=' :  cannot convert from ' const float' to ' temp highp 4-component vector of uint'
+ERROR: 0:10: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/749704.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/749704.wgsl.expected.msl
new file mode 100644
index 0000000..3ae901b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/749704.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_749704(texture2d<uint, access::read> tint_symbol_1, device uint4* const tint_symbol_2) {
+  int2 arg_1 = int2(1);
+  uint4 res = tint_symbol_1.read(uint2(arg_1));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<uint, access::read> tint_symbol_3, device uint4* const tint_symbol_4) {
+  textureLoad_749704(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<uint, access::read> tint_symbol_5 [[texture(0)]], device uint4* tint_symbol_6 [[buffer(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<uint, access::read> tint_symbol_7 [[texture(0)]], device uint4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_749704(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d<uint, access::read> tint_symbol_9 [[texture(0)]], device uint4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_749704(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/749704.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/749704.wgsl.expected.spvasm
new file mode 100644
index 0000000..1fb8e74
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/749704.wgsl.expected.spvasm
@@ -0,0 +1,100 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 52
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_749704 "textureLoad_749704"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 2D 0 0 0 2 R32ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+     %v4uint = OpTypeVector %uint 4
+%prevent_dce_block = OpTypeStruct %v4uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %v2int = OpTypeVector %int 2
+      %int_1 = OpConstant %int 1
+         %24 = OpConstantComposite %v2int %int_1 %int_1
+%_ptr_Function_v2int = OpTypePointer Function %v2int
+         %27 = OpConstantNull %v2int
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+         %33 = OpConstantNull %v4uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4uint = OpTypePointer StorageBuffer %v4uint
+         %38 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_749704 = OpFunction %void None %17
+         %20 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v2int Function %27
+        %res = OpVariable %_ptr_Function_v4uint Function %33
+               OpStore %arg_1 %24
+         %29 = OpLoad %11 %arg_0
+         %30 = OpLoad %v2int %arg_1
+         %28 = OpImageRead %v4uint %29 %30
+               OpStore %res %28
+         %36 = OpAccessChain %_ptr_StorageBuffer_v4uint %prevent_dce %uint_0
+         %37 = OpLoad %v4uint %res
+               OpStore %36 %37
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %38
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %textureLoad_749704
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %43 = OpLabel
+         %44 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %44
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %47 = OpLabel
+         %48 = OpFunctionCall %void %textureLoad_749704
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %50 = OpLabel
+         %51 = OpFunctionCall %void %textureLoad_749704
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/749704.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/749704.wgsl.expected.wgsl
new file mode 100644
index 0000000..b308ef7
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/749704.wgsl.expected.wgsl
@@ -0,0 +1,27 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d<r32uint, read>;
+
+fn textureLoad_749704() {
+  var arg_1 = vec2<i32>(1i);
+  var res : vec4<u32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_749704();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_749704();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_749704();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/773c46.wgsl b/test/tint/builtins/gen/var/textureLoad/773c46.wgsl
new file mode 100644
index 0000000..17b6ebc
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/773c46.wgsl
@@ -0,0 +1,49 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d<rg32uint, read>;
+
+// fn textureLoad(texture: texture_storage_2d<rg32uint, read>, coords: vec2<u32>) -> vec4<u32>
+fn textureLoad_773c46() {
+  var arg_1 = vec2<u32>(1u);
+  var res: vec4<u32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_773c46();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_773c46();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_773c46();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/773c46.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/773c46.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..beabb57
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/773c46.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture2D<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_773c46() {
+  uint2 arg_1 = (1u).xx;
+  uint4 res = arg_0.Load(uint3(arg_1, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_773c46();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_773c46();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_773c46();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/773c46.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/773c46.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..beabb57
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/773c46.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture2D<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_773c46() {
+  uint2 arg_1 = (1u).xx;
+  uint4 res = arg_0.Load(uint3(arg_1, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_773c46();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_773c46();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_773c46();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/773c46.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/773c46.wgsl.expected.glsl
new file mode 100644
index 0000000..e0013db
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/773c46.wgsl.expected.glsl
@@ -0,0 +1,93 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rg32ui) uniform highp uimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_773c46() {
+  uvec2 arg_1 = uvec2(1u);
+  uvec4 res = texelFetch(arg_0, ivec2(arg_1));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_773c46();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rg32ui) uniform highp uimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_773c46() {
+  uvec2 arg_1 = uvec2(1u);
+  uvec4 res = texelFetch(arg_0, ivec2(arg_1));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_773c46();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'image load-store format' : not supported with this profile: es
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rg32ui) uniform highp uimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_773c46() {
+  uvec2 arg_1 = uvec2(1u);
+  uvec4 res = texelFetch(arg_0, ivec2(arg_1));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_773c46();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/773c46.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/773c46.wgsl.expected.msl
new file mode 100644
index 0000000..4bdcaef
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/773c46.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_773c46(texture2d<uint, access::read> tint_symbol_1, device uint4* const tint_symbol_2) {
+  uint2 arg_1 = uint2(1u);
+  uint4 res = tint_symbol_1.read(uint2(arg_1));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<uint, access::read> tint_symbol_3, device uint4* const tint_symbol_4) {
+  textureLoad_773c46(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<uint, access::read> tint_symbol_5 [[texture(0)]], device uint4* tint_symbol_6 [[buffer(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<uint, access::read> tint_symbol_7 [[texture(0)]], device uint4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_773c46(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d<uint, access::read> tint_symbol_9 [[texture(0)]], device uint4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_773c46(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/773c46.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/773c46.wgsl.expected.spvasm
new file mode 100644
index 0000000..7256c0e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/773c46.wgsl.expected.spvasm
@@ -0,0 +1,100 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 51
+; Schema: 0
+               OpCapability Shader
+               OpCapability StorageImageExtendedFormats
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_773c46 "textureLoad_773c46"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 2D 0 0 0 2 Rg32ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+     %v4uint = OpTypeVector %uint 4
+%prevent_dce_block = OpTypeStruct %v4uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+     %v2uint = OpTypeVector %uint 2
+     %uint_1 = OpConstant %uint 1
+         %23 = OpConstantComposite %v2uint %uint_1 %uint_1
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %26 = OpConstantNull %v2uint
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+         %32 = OpConstantNull %v4uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4uint = OpTypePointer StorageBuffer %v4uint
+         %37 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_773c46 = OpFunction %void None %17
+         %20 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v2uint Function %26
+        %res = OpVariable %_ptr_Function_v4uint Function %32
+               OpStore %arg_1 %23
+         %28 = OpLoad %11 %arg_0
+         %29 = OpLoad %v2uint %arg_1
+         %27 = OpImageRead %v4uint %28 %29
+               OpStore %res %27
+         %35 = OpAccessChain %_ptr_StorageBuffer_v4uint %prevent_dce %uint_0
+         %36 = OpLoad %v4uint %res
+               OpStore %35 %36
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %37
+         %39 = OpLabel
+         %40 = OpFunctionCall %void %textureLoad_773c46
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %42 = OpLabel
+         %43 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %43
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %46 = OpLabel
+         %47 = OpFunctionCall %void %textureLoad_773c46
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %49 = OpLabel
+         %50 = OpFunctionCall %void %textureLoad_773c46
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/773c46.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/773c46.wgsl.expected.wgsl
new file mode 100644
index 0000000..b56ec32
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/773c46.wgsl.expected.wgsl
@@ -0,0 +1,27 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d<rg32uint, read>;
+
+fn textureLoad_773c46() {
+  var arg_1 = vec2<u32>(1u);
+  var res : vec4<u32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_773c46();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_773c46();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_773c46();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/7dab57.wgsl b/test/tint/builtins/gen/var/textureLoad/7dab57.wgsl
new file mode 100644
index 0000000..4ab6e13
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/7dab57.wgsl
@@ -0,0 +1,50 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rg32sint, read>;
+
+// fn textureLoad(texture: texture_storage_2d_array<rg32sint, read>, coords: vec2<u32>, array_index: i32) -> vec4<i32>
+fn textureLoad_7dab57() {
+  var arg_1 = vec2<u32>(1u);
+  var arg_2 = 1i;
+  var res: vec4<i32> = textureLoad(arg_0, arg_1, arg_2);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_7dab57();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_7dab57();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_7dab57();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/7dab57.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/7dab57.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..42798d8
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/7dab57.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_7dab57() {
+  uint2 arg_1 = (1u).xx;
+  int arg_2 = 1;
+  int4 res = arg_0.Load(uint4(uint3(arg_1, uint(arg_2)), uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_7dab57();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_7dab57();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_7dab57();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/7dab57.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/7dab57.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..42798d8
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/7dab57.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_7dab57() {
+  uint2 arg_1 = (1u).xx;
+  int arg_2 = 1;
+  int4 res = arg_0.Load(uint4(uint3(arg_1, uint(arg_2)), uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_7dab57();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_7dab57();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_7dab57();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/7dab57.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/7dab57.wgsl.expected.glsl
new file mode 100644
index 0000000..42e34e5
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/7dab57.wgsl.expected.glsl
@@ -0,0 +1,96 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rg32i) uniform highp iimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_7dab57() {
+  uvec2 arg_1 = uvec2(1u);
+  int arg_2 = 1;
+  ivec4 res = texelFetch(arg_0, ivec3(uvec3(arg_1, uint(arg_2))));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_7dab57();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rg32i) uniform highp iimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_7dab57() {
+  uvec2 arg_1 = uvec2(1u);
+  int arg_2 = 1;
+  ivec4 res = texelFetch(arg_0, ivec3(uvec3(arg_1, uint(arg_2))));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_7dab57();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'image load-store format' : not supported with this profile: es
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rg32i) uniform highp iimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_7dab57() {
+  uvec2 arg_1 = uvec2(1u);
+  int arg_2 = 1;
+  ivec4 res = texelFetch(arg_0, ivec3(uvec3(arg_1, uint(arg_2))));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_7dab57();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/7dab57.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/7dab57.wgsl.expected.msl
new file mode 100644
index 0000000..db30bb0
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/7dab57.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_7dab57(texture2d_array<int, access::read> tint_symbol_1, device int4* const tint_symbol_2) {
+  uint2 arg_1 = uint2(1u);
+  int arg_2 = 1;
+  int4 res = tint_symbol_1.read(uint2(arg_1), arg_2);
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<int, access::read> tint_symbol_3, device int4* const tint_symbol_4) {
+  textureLoad_7dab57(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<int, access::read> tint_symbol_5 [[texture(0)]], device int4* tint_symbol_6 [[buffer(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<int, access::read> tint_symbol_7 [[texture(0)]], device int4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_7dab57(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<int, access::read> tint_symbol_9 [[texture(0)]], device int4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_7dab57(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/7dab57.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/7dab57.wgsl.expected.spvasm
new file mode 100644
index 0000000..dc5d027
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/7dab57.wgsl.expected.spvasm
@@ -0,0 +1,113 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 62
+; Schema: 0
+               OpCapability Shader
+               OpCapability StorageImageExtendedFormats
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_7dab57 "textureLoad_7dab57"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 2D 0 1 0 2 Rg32i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+      %v4int = OpTypeVector %int 4
+%prevent_dce_block = OpTypeStruct %v4int
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+     %uint_1 = OpConstant %uint 1
+         %24 = OpConstantComposite %v2uint %uint_1 %uint_1
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %27 = OpConstantNull %v2uint
+      %int_1 = OpConstant %int 1
+%_ptr_Function_int = OpTypePointer Function %int
+         %31 = OpConstantNull %int
+     %v3uint = OpTypeVector %uint 3
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+         %43 = OpConstantNull %v4int
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4int = OpTypePointer StorageBuffer %v4int
+         %48 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_7dab57 = OpFunction %void None %17
+         %20 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v2uint Function %27
+      %arg_2 = OpVariable %_ptr_Function_int Function %31
+        %res = OpVariable %_ptr_Function_v4int Function %43
+               OpStore %arg_1 %24
+               OpStore %arg_2 %int_1
+         %33 = OpLoad %11 %arg_0
+         %35 = OpLoad %v2uint %arg_1
+         %36 = OpCompositeExtract %uint %35 0
+         %37 = OpCompositeExtract %uint %35 1
+         %39 = OpLoad %int %arg_2
+         %38 = OpBitcast %uint %39
+         %40 = OpCompositeConstruct %v3uint %36 %37 %38
+         %32 = OpImageRead %v4int %33 %40
+               OpStore %res %32
+         %46 = OpAccessChain %_ptr_StorageBuffer_v4int %prevent_dce %uint_0
+         %47 = OpLoad %v4int %res
+               OpStore %46 %47
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %48
+         %50 = OpLabel
+         %51 = OpFunctionCall %void %textureLoad_7dab57
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %53 = OpLabel
+         %54 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %54
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %57 = OpLabel
+         %58 = OpFunctionCall %void %textureLoad_7dab57
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %60 = OpLabel
+         %61 = OpFunctionCall %void %textureLoad_7dab57
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/7dab57.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/7dab57.wgsl.expected.wgsl
new file mode 100644
index 0000000..1d9ffb8
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/7dab57.wgsl.expected.wgsl
@@ -0,0 +1,28 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rg32sint, read>;
+
+fn textureLoad_7dab57() {
+  var arg_1 = vec2<u32>(1u);
+  var arg_2 = 1i;
+  var res : vec4<i32> = textureLoad(arg_0, arg_1, arg_2);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_7dab57();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_7dab57();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_7dab57();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/83162f.wgsl b/test/tint/builtins/gen/var/textureLoad/83162f.wgsl
new file mode 100644
index 0000000..1348320
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/83162f.wgsl
@@ -0,0 +1,49 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_3d<rg32float, read>;
+
+// fn textureLoad(texture: texture_storage_3d<rg32float, read>, coords: vec3<u32>) -> vec4<f32>
+fn textureLoad_83162f() {
+  var arg_1 = vec3<u32>(1u);
+  var res: vec4<f32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_83162f();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_83162f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_83162f();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/83162f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/83162f.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..fe2cec7
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/83162f.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture3D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_83162f() {
+  uint3 arg_1 = (1u).xxx;
+  float4 res = arg_0.Load(uint4(arg_1, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_83162f();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_83162f();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_83162f();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/83162f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/83162f.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..fe2cec7
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/83162f.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture3D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_83162f() {
+  uint3 arg_1 = (1u).xxx;
+  float4 res = arg_0.Load(uint4(arg_1, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_83162f();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_83162f();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_83162f();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/83162f.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/83162f.wgsl.expected.glsl
new file mode 100644
index 0000000..81daad6
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/83162f.wgsl.expected.glsl
@@ -0,0 +1,93 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rg32f) uniform highp image3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_83162f() {
+  uvec3 arg_1 = uvec3(1u);
+  vec4 res = texelFetch(arg_0, ivec3(arg_1));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_83162f();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rg32f) uniform highp image3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_83162f() {
+  uvec3 arg_1 = uvec3(1u);
+  vec4 res = texelFetch(arg_0, ivec3(arg_1));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_83162f();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'image load-store format' : not supported with this profile: es
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rg32f) uniform highp image3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_83162f() {
+  uvec3 arg_1 = uvec3(1u);
+  vec4 res = texelFetch(arg_0, ivec3(arg_1));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_83162f();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/83162f.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/83162f.wgsl.expected.msl
new file mode 100644
index 0000000..d76ec32
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/83162f.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_83162f(texture3d<float, access::read> tint_symbol_1, device float4* const tint_symbol_2) {
+  uint3 arg_1 = uint3(1u);
+  float4 res = tint_symbol_1.read(uint3(arg_1));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<float, access::read> tint_symbol_3, device float4* const tint_symbol_4) {
+  textureLoad_83162f(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<float, access::read> tint_symbol_5 [[texture(0)]], device float4* tint_symbol_6 [[buffer(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::read> tint_symbol_7 [[texture(0)]], device float4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_83162f(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture3d<float, access::read> tint_symbol_9 [[texture(0)]], device float4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_83162f(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/83162f.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/83162f.wgsl.expected.spvasm
new file mode 100644
index 0000000..0bbb8d5
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/83162f.wgsl.expected.spvasm
@@ -0,0 +1,98 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 49
+; Schema: 0
+               OpCapability Shader
+               OpCapability StorageImageExtendedFormats
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_83162f "textureLoad_83162f"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 3D 0 0 0 2 Rg32f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+%prevent_dce_block = OpTypeStruct %v4float
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v3uint = OpTypeVector %uint 3
+     %uint_1 = OpConstant %uint 1
+         %22 = OpConstantComposite %v3uint %uint_1 %uint_1 %uint_1
+%_ptr_Function_v3uint = OpTypePointer Function %v3uint
+         %25 = OpConstantNull %v3uint
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
+         %35 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_83162f = OpFunction %void None %15
+         %18 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v3uint Function %25
+        %res = OpVariable %_ptr_Function_v4float Function %5
+               OpStore %arg_1 %22
+         %27 = OpLoad %11 %arg_0
+         %28 = OpLoad %v3uint %arg_1
+         %26 = OpImageRead %v4float %27 %28
+               OpStore %res %26
+         %33 = OpAccessChain %_ptr_StorageBuffer_v4float %prevent_dce %uint_0
+         %34 = OpLoad %v4float %res
+               OpStore %33 %34
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %35
+         %37 = OpLabel
+         %38 = OpFunctionCall %void %textureLoad_83162f
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %40 = OpLabel
+         %41 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %41
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %44 = OpLabel
+         %45 = OpFunctionCall %void %textureLoad_83162f
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %47 = OpLabel
+         %48 = OpFunctionCall %void %textureLoad_83162f
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/83162f.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/83162f.wgsl.expected.wgsl
new file mode 100644
index 0000000..de819aa
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/83162f.wgsl.expected.wgsl
@@ -0,0 +1,27 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_3d<rg32float, read>;
+
+fn textureLoad_83162f() {
+  var arg_1 = vec3<u32>(1u);
+  var res : vec4<f32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_83162f();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_83162f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_83162f();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/83cea4.wgsl b/test/tint/builtins/gen/var/textureLoad/83cea4.wgsl
new file mode 100644
index 0000000..285c964
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/83cea4.wgsl
@@ -0,0 +1,49 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_1d<rgba16uint, read>;
+
+// fn textureLoad(texture: texture_storage_1d<rgba16uint, read>, coords: i32) -> vec4<u32>
+fn textureLoad_83cea4() {
+  var arg_1 = 1i;
+  var res: vec4<u32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_83cea4();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_83cea4();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_83cea4();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/83cea4.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/83cea4.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..40ba767
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/83cea4.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture1D<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_83cea4() {
+  int arg_1 = 1;
+  uint4 res = arg_0.Load(int2(arg_1, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_83cea4();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_83cea4();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_83cea4();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/83cea4.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/83cea4.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..40ba767
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/83cea4.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture1D<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_83cea4() {
+  int arg_1 = 1;
+  uint4 res = arg_0.Load(int2(arg_1, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_83cea4();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_83cea4();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_83cea4();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/83cea4.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/83cea4.wgsl.expected.glsl
new file mode 100644
index 0000000..4649642
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/83cea4.wgsl.expected.glsl
@@ -0,0 +1,90 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba16ui) uniform highp uimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_83cea4() {
+  int arg_1 = 1;
+  uvec4 res = texelFetch(arg_0, ivec2(arg_1, 0));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_83cea4();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba16ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba16ui) uniform highp uimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_83cea4() {
+  int arg_1 = 1;
+  uvec4 res = texelFetch(arg_0, ivec2(arg_1, 0));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_83cea4();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba16ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba16ui) uniform highp uimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_83cea4() {
+  int arg_1 = 1;
+  uvec4 res = texelFetch(arg_0, ivec2(arg_1, 0));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_83cea4();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba16ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/83cea4.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/83cea4.wgsl.expected.msl
new file mode 100644
index 0000000..e8e7e14
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/83cea4.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_83cea4(texture1d<uint, access::read> tint_symbol_1, device uint4* const tint_symbol_2) {
+  int arg_1 = 1;
+  uint4 res = tint_symbol_1.read(uint(arg_1));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<uint, access::read> tint_symbol_3, device uint4* const tint_symbol_4) {
+  textureLoad_83cea4(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<uint, access::read> tint_symbol_5 [[texture(0)]], device uint4* tint_symbol_6 [[buffer(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(texture1d<uint, access::read> tint_symbol_7 [[texture(0)]], device uint4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_83cea4(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture1d<uint, access::read> tint_symbol_9 [[texture(0)]], device uint4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_83cea4(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/83cea4.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/83cea4.wgsl.expected.spvasm
new file mode 100644
index 0000000..6bf2c8a
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/83cea4.wgsl.expected.spvasm
@@ -0,0 +1,99 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 50
+; Schema: 0
+               OpCapability Shader
+               OpCapability Image1D
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_83cea4 "textureLoad_83cea4"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 1D 0 0 0 2 Rgba16ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+     %v4uint = OpTypeVector %uint 4
+%prevent_dce_block = OpTypeStruct %v4uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %int_1 = OpConstant %int 1
+%_ptr_Function_int = OpTypePointer Function %int
+         %25 = OpConstantNull %int
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+         %31 = OpConstantNull %v4uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4uint = OpTypePointer StorageBuffer %v4uint
+         %36 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_83cea4 = OpFunction %void None %17
+         %20 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_int Function %25
+        %res = OpVariable %_ptr_Function_v4uint Function %31
+               OpStore %arg_1 %int_1
+         %27 = OpLoad %11 %arg_0
+         %28 = OpLoad %int %arg_1
+         %26 = OpImageRead %v4uint %27 %28
+               OpStore %res %26
+         %34 = OpAccessChain %_ptr_StorageBuffer_v4uint %prevent_dce %uint_0
+         %35 = OpLoad %v4uint %res
+               OpStore %34 %35
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %36
+         %38 = OpLabel
+         %39 = OpFunctionCall %void %textureLoad_83cea4
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %41 = OpLabel
+         %42 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %42
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %45 = OpLabel
+         %46 = OpFunctionCall %void %textureLoad_83cea4
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %48 = OpLabel
+         %49 = OpFunctionCall %void %textureLoad_83cea4
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/83cea4.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/83cea4.wgsl.expected.wgsl
new file mode 100644
index 0000000..9a53b4a
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/83cea4.wgsl.expected.wgsl
@@ -0,0 +1,27 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_1d<rgba16uint, read>;
+
+fn textureLoad_83cea4() {
+  var arg_1 = 1i;
+  var res : vec4<u32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_83cea4();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_83cea4();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_83cea4();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/84c728.wgsl b/test/tint/builtins/gen/var/textureLoad/84c728.wgsl
new file mode 100644
index 0000000..5052e60
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/84c728.wgsl
@@ -0,0 +1,49 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_1d<rgba32float, read>;
+
+// fn textureLoad(texture: texture_storage_1d<rgba32float, read>, coords: u32) -> vec4<f32>
+fn textureLoad_84c728() {
+  var arg_1 = 1u;
+  var res: vec4<f32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_84c728();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_84c728();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_84c728();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/84c728.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/84c728.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..cd04fd7
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/84c728.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture1D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_84c728() {
+  uint arg_1 = 1u;
+  float4 res = arg_0.Load(uint2(arg_1, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_84c728();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_84c728();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_84c728();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/84c728.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/84c728.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..cd04fd7
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/84c728.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture1D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_84c728() {
+  uint arg_1 = 1u;
+  float4 res = arg_0.Load(uint2(arg_1, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_84c728();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_84c728();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_84c728();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/84c728.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/84c728.wgsl.expected.glsl
new file mode 100644
index 0000000..187e13b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/84c728.wgsl.expected.glsl
@@ -0,0 +1,90 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba32f) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_84c728() {
+  uint arg_1 = 1u;
+  vec4 res = texelFetch(arg_0, ivec2(uvec2(arg_1, 0u)));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_84c728();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba32f' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba32f) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_84c728() {
+  uint arg_1 = 1u;
+  vec4 res = texelFetch(arg_0, ivec2(uvec2(arg_1, 0u)));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_84c728();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba32f' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba32f) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_84c728() {
+  uint arg_1 = 1u;
+  vec4 res = texelFetch(arg_0, ivec2(uvec2(arg_1, 0u)));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_84c728();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba32f' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/84c728.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/84c728.wgsl.expected.msl
new file mode 100644
index 0000000..9187f5f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/84c728.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_84c728(texture1d<float, access::read> tint_symbol_1, device float4* const tint_symbol_2) {
+  uint arg_1 = 1u;
+  float4 res = tint_symbol_1.read(uint(arg_1));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<float, access::read> tint_symbol_3, device float4* const tint_symbol_4) {
+  textureLoad_84c728(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<float, access::read> tint_symbol_5 [[texture(0)]], device float4* tint_symbol_6 [[buffer(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(texture1d<float, access::read> tint_symbol_7 [[texture(0)]], device float4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_84c728(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture1d<float, access::read> tint_symbol_9 [[texture(0)]], device float4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_84c728(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/84c728.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/84c728.wgsl.expected.spvasm
new file mode 100644
index 0000000..94508a8
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/84c728.wgsl.expected.spvasm
@@ -0,0 +1,96 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 47
+; Schema: 0
+               OpCapability Shader
+               OpCapability Image1D
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_84c728 "textureLoad_84c728"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 1D 0 0 0 2 Rgba32f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+%prevent_dce_block = OpTypeStruct %v4float
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %23 = OpConstantNull %uint
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
+         %33 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_84c728 = OpFunction %void None %15
+         %18 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_uint Function %23
+        %res = OpVariable %_ptr_Function_v4float Function %5
+               OpStore %arg_1 %uint_1
+         %25 = OpLoad %11 %arg_0
+         %26 = OpLoad %uint %arg_1
+         %24 = OpImageRead %v4float %25 %26
+               OpStore %res %24
+         %31 = OpAccessChain %_ptr_StorageBuffer_v4float %prevent_dce %uint_0
+         %32 = OpLoad %v4float %res
+               OpStore %31 %32
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %33
+         %35 = OpLabel
+         %36 = OpFunctionCall %void %textureLoad_84c728
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %38 = OpLabel
+         %39 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %39
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %42 = OpLabel
+         %43 = OpFunctionCall %void %textureLoad_84c728
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %45 = OpLabel
+         %46 = OpFunctionCall %void %textureLoad_84c728
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/84c728.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/84c728.wgsl.expected.wgsl
new file mode 100644
index 0000000..0cac383
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/84c728.wgsl.expected.wgsl
@@ -0,0 +1,27 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_1d<rgba32float, read>;
+
+fn textureLoad_84c728() {
+  var arg_1 = 1u;
+  var res : vec4<f32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_84c728();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_84c728();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_84c728();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/862833.wgsl b/test/tint/builtins/gen/var/textureLoad/862833.wgsl
new file mode 100644
index 0000000..7595eb0
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/862833.wgsl
@@ -0,0 +1,50 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba32float, read>;
+
+// fn textureLoad(texture: texture_storage_2d_array<rgba32float, read>, coords: vec2<i32>, array_index: u32) -> vec4<f32>
+fn textureLoad_862833() {
+  var arg_1 = vec2<i32>(1i);
+  var arg_2 = 1u;
+  var res: vec4<f32> = textureLoad(arg_0, arg_1, arg_2);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_862833();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_862833();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_862833();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/862833.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/862833.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..e47afee
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/862833.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_862833() {
+  int2 arg_1 = (1).xx;
+  uint arg_2 = 1u;
+  float4 res = arg_0.Load(int4(int3(arg_1, int(arg_2)), 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_862833();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_862833();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_862833();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/862833.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/862833.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..e47afee
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/862833.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_862833() {
+  int2 arg_1 = (1).xx;
+  uint arg_2 = 1u;
+  float4 res = arg_0.Load(int4(int3(arg_1, int(arg_2)), 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_862833();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_862833();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_862833();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/862833.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/862833.wgsl.expected.glsl
new file mode 100644
index 0000000..da87e87
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/862833.wgsl.expected.glsl
@@ -0,0 +1,93 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba32f) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_862833() {
+  ivec2 arg_1 = ivec2(1);
+  uint arg_2 = 1u;
+  vec4 res = texelFetch(arg_0, ivec3(arg_1, int(arg_2)));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_862833();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba32f' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba32f) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_862833() {
+  ivec2 arg_1 = ivec2(1);
+  uint arg_2 = 1u;
+  vec4 res = texelFetch(arg_0, ivec3(arg_1, int(arg_2)));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_862833();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba32f' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba32f) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_862833() {
+  ivec2 arg_1 = ivec2(1);
+  uint arg_2 = 1u;
+  vec4 res = texelFetch(arg_0, ivec3(arg_1, int(arg_2)));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_862833();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba32f' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/862833.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/862833.wgsl.expected.msl
new file mode 100644
index 0000000..fdd8241
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/862833.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_862833(texture2d_array<float, access::read> tint_symbol_1, device float4* const tint_symbol_2) {
+  int2 arg_1 = int2(1);
+  uint arg_2 = 1u;
+  float4 res = tint_symbol_1.read(uint2(arg_1), arg_2);
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<float, access::read> tint_symbol_3, device float4* const tint_symbol_4) {
+  textureLoad_862833(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<float, access::read> tint_symbol_5 [[texture(0)]], device float4* tint_symbol_6 [[buffer(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::read> tint_symbol_7 [[texture(0)]], device float4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_862833(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<float, access::read> tint_symbol_9 [[texture(0)]], device float4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_862833(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/862833.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/862833.wgsl.expected.spvasm
new file mode 100644
index 0000000..bb7d38a
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/862833.wgsl.expected.spvasm
@@ -0,0 +1,110 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 60
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_862833 "textureLoad_862833"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 1 0 2 Rgba32f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+%prevent_dce_block = OpTypeStruct %v4float
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %v2int = OpTypeVector %int 2
+      %int_1 = OpConstant %int 1
+         %22 = OpConstantComposite %v2int %int_1 %int_1
+%_ptr_Function_v2int = OpTypePointer Function %v2int
+         %25 = OpConstantNull %v2int
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %30 = OpConstantNull %uint
+      %v3int = OpTypeVector %int 3
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
+         %46 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_862833 = OpFunction %void None %15
+         %18 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v2int Function %25
+      %arg_2 = OpVariable %_ptr_Function_uint Function %30
+        %res = OpVariable %_ptr_Function_v4float Function %5
+               OpStore %arg_1 %22
+               OpStore %arg_2 %uint_1
+         %32 = OpLoad %11 %arg_0
+         %34 = OpLoad %v2int %arg_1
+         %35 = OpCompositeExtract %int %34 0
+         %36 = OpCompositeExtract %int %34 1
+         %38 = OpLoad %uint %arg_2
+         %37 = OpBitcast %int %38
+         %39 = OpCompositeConstruct %v3int %35 %36 %37
+         %31 = OpImageRead %v4float %32 %39
+               OpStore %res %31
+         %44 = OpAccessChain %_ptr_StorageBuffer_v4float %prevent_dce %uint_0
+         %45 = OpLoad %v4float %res
+               OpStore %44 %45
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %46
+         %48 = OpLabel
+         %49 = OpFunctionCall %void %textureLoad_862833
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %51 = OpLabel
+         %52 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %52
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %55 = OpLabel
+         %56 = OpFunctionCall %void %textureLoad_862833
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %58 = OpLabel
+         %59 = OpFunctionCall %void %textureLoad_862833
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/862833.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/862833.wgsl.expected.wgsl
new file mode 100644
index 0000000..c567b7c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/862833.wgsl.expected.wgsl
@@ -0,0 +1,28 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba32float, read>;
+
+fn textureLoad_862833() {
+  var arg_1 = vec2<i32>(1i);
+  var arg_2 = 1u;
+  var res : vec4<f32> = textureLoad(arg_0, arg_1, arg_2);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_862833();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_862833();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_862833();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/89620b.wgsl b/test/tint/builtins/gen/var/textureLoad/89620b.wgsl
new file mode 100644
index 0000000..85111aa
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/89620b.wgsl
@@ -0,0 +1,50 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<bgra8unorm, read>;
+
+// fn textureLoad(texture: texture_storage_2d_array<bgra8unorm, read>, coords: vec2<i32>, array_index: i32) -> vec4<f32>
+fn textureLoad_89620b() {
+  var arg_1 = vec2<i32>(1i);
+  var arg_2 = 1i;
+  var res: vec4<f32> = textureLoad(arg_0, arg_1, arg_2);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_89620b();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_89620b();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_89620b();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/89620b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/89620b.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..9a82cf3
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/89620b.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_89620b() {
+  int2 arg_1 = (1).xx;
+  int arg_2 = 1;
+  float4 res = arg_0.Load(int4(int3(arg_1, arg_2), 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_89620b();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_89620b();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_89620b();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/89620b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/89620b.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..9a82cf3
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/89620b.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_89620b() {
+  int2 arg_1 = (1).xx;
+  int arg_2 = 1;
+  float4 res = arg_0.Load(int4(int3(arg_1, arg_2), 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_89620b();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_89620b();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_89620b();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/89620b.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/89620b.wgsl.expected.glsl
new file mode 100644
index 0000000..38a0925
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/89620b.wgsl.expected.glsl
@@ -0,0 +1,93 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba8) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_89620b() {
+  ivec2 arg_1 = ivec2(1);
+  int arg_2 = 1;
+  vec4 res = texelFetch(arg_0, ivec3(arg_1, arg_2));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_89620b();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba8) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_89620b() {
+  ivec2 arg_1 = ivec2(1);
+  int arg_2 = 1;
+  vec4 res = texelFetch(arg_0, ivec3(arg_1, arg_2));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_89620b();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba8' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba8) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_89620b() {
+  ivec2 arg_1 = ivec2(1);
+  int arg_2 = 1;
+  vec4 res = texelFetch(arg_0, ivec3(arg_1, arg_2));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_89620b();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/89620b.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/89620b.wgsl.expected.msl
new file mode 100644
index 0000000..370b15b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/89620b.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_89620b(texture2d_array<float, access::read> tint_symbol_1, device float4* const tint_symbol_2) {
+  int2 arg_1 = int2(1);
+  int arg_2 = 1;
+  float4 res = tint_symbol_1.read(uint2(arg_1), arg_2);
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<float, access::read> tint_symbol_3, device float4* const tint_symbol_4) {
+  textureLoad_89620b(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<float, access::read> tint_symbol_5 [[texture(0)]], device float4* tint_symbol_6 [[buffer(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::read> tint_symbol_7 [[texture(0)]], device float4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_89620b(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<float, access::read> tint_symbol_9 [[texture(0)]], device float4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_89620b(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/89620b.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/89620b.wgsl.expected.spvasm
new file mode 100644
index 0000000..13f8aa6
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/89620b.wgsl.expected.spvasm
@@ -0,0 +1,108 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 58
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_89620b "textureLoad_89620b"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 1 0 2 Rgba8
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+%prevent_dce_block = OpTypeStruct %v4float
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %v2int = OpTypeVector %int 2
+      %int_1 = OpConstant %int 1
+         %22 = OpConstantComposite %v2int %int_1 %int_1
+%_ptr_Function_v2int = OpTypePointer Function %v2int
+         %25 = OpConstantNull %v2int
+%_ptr_Function_int = OpTypePointer Function %int
+         %28 = OpConstantNull %int
+      %v3int = OpTypeVector %int 3
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+       %uint = OpTypeInt 32 0
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
+         %44 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_89620b = OpFunction %void None %15
+         %18 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v2int Function %25
+      %arg_2 = OpVariable %_ptr_Function_int Function %28
+        %res = OpVariable %_ptr_Function_v4float Function %5
+               OpStore %arg_1 %22
+               OpStore %arg_2 %int_1
+         %30 = OpLoad %11 %arg_0
+         %32 = OpLoad %v2int %arg_1
+         %33 = OpCompositeExtract %int %32 0
+         %34 = OpCompositeExtract %int %32 1
+         %35 = OpLoad %int %arg_2
+         %36 = OpCompositeConstruct %v3int %33 %34 %35
+         %29 = OpImageRead %v4float %30 %36
+               OpStore %res %29
+         %42 = OpAccessChain %_ptr_StorageBuffer_v4float %prevent_dce %uint_0
+         %43 = OpLoad %v4float %res
+               OpStore %42 %43
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %44
+         %46 = OpLabel
+         %47 = OpFunctionCall %void %textureLoad_89620b
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %49 = OpLabel
+         %50 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %50
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %53 = OpLabel
+         %54 = OpFunctionCall %void %textureLoad_89620b
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %56 = OpLabel
+         %57 = OpFunctionCall %void %textureLoad_89620b
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/89620b.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/89620b.wgsl.expected.wgsl
new file mode 100644
index 0000000..1d1b5d4
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/89620b.wgsl.expected.wgsl
@@ -0,0 +1,28 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<bgra8unorm, read>;
+
+fn textureLoad_89620b() {
+  var arg_1 = vec2<i32>(1i);
+  var arg_2 = 1i;
+  var res : vec4<f32> = textureLoad(arg_0, arg_1, arg_2);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_89620b();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_89620b();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_89620b();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/8a291b.wgsl b/test/tint/builtins/gen/var/textureLoad/8a291b.wgsl
new file mode 100644
index 0000000..74be11b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/8a291b.wgsl
@@ -0,0 +1,50 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<bgra8unorm, read>;
+
+// fn textureLoad(texture: texture_storage_2d_array<bgra8unorm, read>, coords: vec2<i32>, array_index: u32) -> vec4<f32>
+fn textureLoad_8a291b() {
+  var arg_1 = vec2<i32>(1i);
+  var arg_2 = 1u;
+  var res: vec4<f32> = textureLoad(arg_0, arg_1, arg_2);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_8a291b();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_8a291b();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_8a291b();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/8a291b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/8a291b.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..009d3f5
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/8a291b.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_8a291b() {
+  int2 arg_1 = (1).xx;
+  uint arg_2 = 1u;
+  float4 res = arg_0.Load(int4(int3(arg_1, int(arg_2)), 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_8a291b();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_8a291b();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_8a291b();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/8a291b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/8a291b.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..009d3f5
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/8a291b.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_8a291b() {
+  int2 arg_1 = (1).xx;
+  uint arg_2 = 1u;
+  float4 res = arg_0.Load(int4(int3(arg_1, int(arg_2)), 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_8a291b();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_8a291b();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_8a291b();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/8a291b.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/8a291b.wgsl.expected.glsl
new file mode 100644
index 0000000..68f5301
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/8a291b.wgsl.expected.glsl
@@ -0,0 +1,93 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba8) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_8a291b() {
+  ivec2 arg_1 = ivec2(1);
+  uint arg_2 = 1u;
+  vec4 res = texelFetch(arg_0, ivec3(arg_1, int(arg_2)));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_8a291b();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba8) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_8a291b() {
+  ivec2 arg_1 = ivec2(1);
+  uint arg_2 = 1u;
+  vec4 res = texelFetch(arg_0, ivec3(arg_1, int(arg_2)));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_8a291b();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba8' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba8) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_8a291b() {
+  ivec2 arg_1 = ivec2(1);
+  uint arg_2 = 1u;
+  vec4 res = texelFetch(arg_0, ivec3(arg_1, int(arg_2)));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_8a291b();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/8a291b.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/8a291b.wgsl.expected.msl
new file mode 100644
index 0000000..c4b7a01
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/8a291b.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_8a291b(texture2d_array<float, access::read> tint_symbol_1, device float4* const tint_symbol_2) {
+  int2 arg_1 = int2(1);
+  uint arg_2 = 1u;
+  float4 res = tint_symbol_1.read(uint2(arg_1), arg_2);
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<float, access::read> tint_symbol_3, device float4* const tint_symbol_4) {
+  textureLoad_8a291b(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<float, access::read> tint_symbol_5 [[texture(0)]], device float4* tint_symbol_6 [[buffer(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::read> tint_symbol_7 [[texture(0)]], device float4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_8a291b(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<float, access::read> tint_symbol_9 [[texture(0)]], device float4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_8a291b(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/8a291b.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/8a291b.wgsl.expected.spvasm
new file mode 100644
index 0000000..188253f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/8a291b.wgsl.expected.spvasm
@@ -0,0 +1,110 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 60
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_8a291b "textureLoad_8a291b"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 1 0 2 Rgba8
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+%prevent_dce_block = OpTypeStruct %v4float
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %v2int = OpTypeVector %int 2
+      %int_1 = OpConstant %int 1
+         %22 = OpConstantComposite %v2int %int_1 %int_1
+%_ptr_Function_v2int = OpTypePointer Function %v2int
+         %25 = OpConstantNull %v2int
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %30 = OpConstantNull %uint
+      %v3int = OpTypeVector %int 3
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
+         %46 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_8a291b = OpFunction %void None %15
+         %18 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v2int Function %25
+      %arg_2 = OpVariable %_ptr_Function_uint Function %30
+        %res = OpVariable %_ptr_Function_v4float Function %5
+               OpStore %arg_1 %22
+               OpStore %arg_2 %uint_1
+         %32 = OpLoad %11 %arg_0
+         %34 = OpLoad %v2int %arg_1
+         %35 = OpCompositeExtract %int %34 0
+         %36 = OpCompositeExtract %int %34 1
+         %38 = OpLoad %uint %arg_2
+         %37 = OpBitcast %int %38
+         %39 = OpCompositeConstruct %v3int %35 %36 %37
+         %31 = OpImageRead %v4float %32 %39
+               OpStore %res %31
+         %44 = OpAccessChain %_ptr_StorageBuffer_v4float %prevent_dce %uint_0
+         %45 = OpLoad %v4float %res
+               OpStore %44 %45
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %46
+         %48 = OpLabel
+         %49 = OpFunctionCall %void %textureLoad_8a291b
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %51 = OpLabel
+         %52 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %52
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %55 = OpLabel
+         %56 = OpFunctionCall %void %textureLoad_8a291b
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %58 = OpLabel
+         %59 = OpFunctionCall %void %textureLoad_8a291b
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/8a291b.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/8a291b.wgsl.expected.wgsl
new file mode 100644
index 0000000..a3268ee
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/8a291b.wgsl.expected.wgsl
@@ -0,0 +1,28 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<bgra8unorm, read>;
+
+fn textureLoad_8a291b() {
+  var arg_1 = vec2<i32>(1i);
+  var arg_2 = 1u;
+  var res : vec4<f32> = textureLoad(arg_0, arg_1, arg_2);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_8a291b();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_8a291b();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_8a291b();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/8a9988.wgsl b/test/tint/builtins/gen/var/textureLoad/8a9988.wgsl
new file mode 100644
index 0000000..69f4c74
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/8a9988.wgsl
@@ -0,0 +1,49 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_3d<rg32sint, read>;
+
+// fn textureLoad(texture: texture_storage_3d<rg32sint, read>, coords: vec3<u32>) -> vec4<i32>
+fn textureLoad_8a9988() {
+  var arg_1 = vec3<u32>(1u);
+  var res: vec4<i32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_8a9988();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_8a9988();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_8a9988();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/8a9988.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/8a9988.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..7f356f0
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/8a9988.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture3D<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_8a9988() {
+  uint3 arg_1 = (1u).xxx;
+  int4 res = arg_0.Load(uint4(arg_1, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_8a9988();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_8a9988();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_8a9988();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/8a9988.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/8a9988.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..7f356f0
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/8a9988.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture3D<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_8a9988() {
+  uint3 arg_1 = (1u).xxx;
+  int4 res = arg_0.Load(uint4(arg_1, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_8a9988();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_8a9988();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_8a9988();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/8a9988.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/8a9988.wgsl.expected.glsl
new file mode 100644
index 0000000..a95a4e6
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/8a9988.wgsl.expected.glsl
@@ -0,0 +1,93 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rg32i) uniform highp iimage3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_8a9988() {
+  uvec3 arg_1 = uvec3(1u);
+  ivec4 res = texelFetch(arg_0, ivec3(arg_1));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_8a9988();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rg32i) uniform highp iimage3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_8a9988() {
+  uvec3 arg_1 = uvec3(1u);
+  ivec4 res = texelFetch(arg_0, ivec3(arg_1));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_8a9988();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'image load-store format' : not supported with this profile: es
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rg32i) uniform highp iimage3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_8a9988() {
+  uvec3 arg_1 = uvec3(1u);
+  ivec4 res = texelFetch(arg_0, ivec3(arg_1));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_8a9988();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/8a9988.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/8a9988.wgsl.expected.msl
new file mode 100644
index 0000000..6b12b3e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/8a9988.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_8a9988(texture3d<int, access::read> tint_symbol_1, device int4* const tint_symbol_2) {
+  uint3 arg_1 = uint3(1u);
+  int4 res = tint_symbol_1.read(uint3(arg_1));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<int, access::read> tint_symbol_3, device int4* const tint_symbol_4) {
+  textureLoad_8a9988(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<int, access::read> tint_symbol_5 [[texture(0)]], device int4* tint_symbol_6 [[buffer(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<int, access::read> tint_symbol_7 [[texture(0)]], device int4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_8a9988(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture3d<int, access::read> tint_symbol_9 [[texture(0)]], device int4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_8a9988(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/8a9988.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/8a9988.wgsl.expected.spvasm
new file mode 100644
index 0000000..d7566a0
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/8a9988.wgsl.expected.spvasm
@@ -0,0 +1,101 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 52
+; Schema: 0
+               OpCapability Shader
+               OpCapability StorageImageExtendedFormats
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_8a9988 "textureLoad_8a9988"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 3D 0 0 0 2 Rg32i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+      %v4int = OpTypeVector %int 4
+%prevent_dce_block = OpTypeStruct %v4int
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v3uint = OpTypeVector %uint 3
+     %uint_1 = OpConstant %uint 1
+         %24 = OpConstantComposite %v3uint %uint_1 %uint_1 %uint_1
+%_ptr_Function_v3uint = OpTypePointer Function %v3uint
+         %27 = OpConstantNull %v3uint
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+         %33 = OpConstantNull %v4int
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4int = OpTypePointer StorageBuffer %v4int
+         %38 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_8a9988 = OpFunction %void None %17
+         %20 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v3uint Function %27
+        %res = OpVariable %_ptr_Function_v4int Function %33
+               OpStore %arg_1 %24
+         %29 = OpLoad %11 %arg_0
+         %30 = OpLoad %v3uint %arg_1
+         %28 = OpImageRead %v4int %29 %30
+               OpStore %res %28
+         %36 = OpAccessChain %_ptr_StorageBuffer_v4int %prevent_dce %uint_0
+         %37 = OpLoad %v4int %res
+               OpStore %36 %37
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %38
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %textureLoad_8a9988
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %43 = OpLabel
+         %44 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %44
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %47 = OpLabel
+         %48 = OpFunctionCall %void %textureLoad_8a9988
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %50 = OpLabel
+         %51 = OpFunctionCall %void %textureLoad_8a9988
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/8a9988.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/8a9988.wgsl.expected.wgsl
new file mode 100644
index 0000000..f6947c5
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/8a9988.wgsl.expected.wgsl
@@ -0,0 +1,27 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_3d<rg32sint, read>;
+
+fn textureLoad_8a9988() {
+  var arg_1 = vec3<u32>(1u);
+  var res : vec4<i32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_8a9988();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_8a9988();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_8a9988();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/8db0ce.wgsl b/test/tint/builtins/gen/var/textureLoad/8db0ce.wgsl
new file mode 100644
index 0000000..617427d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/8db0ce.wgsl
@@ -0,0 +1,50 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<r32sint, read>;
+
+// fn textureLoad(texture: texture_storage_2d_array<r32sint, read>, coords: vec2<u32>, array_index: u32) -> vec4<i32>
+fn textureLoad_8db0ce() {
+  var arg_1 = vec2<u32>(1u);
+  var arg_2 = 1u;
+  var res: vec4<i32> = textureLoad(arg_0, arg_1, arg_2);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_8db0ce();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_8db0ce();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_8db0ce();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/8db0ce.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/8db0ce.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..97fd390
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/8db0ce.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_8db0ce() {
+  uint2 arg_1 = (1u).xx;
+  uint arg_2 = 1u;
+  int4 res = arg_0.Load(uint4(uint3(arg_1, arg_2), uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_8db0ce();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_8db0ce();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_8db0ce();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/8db0ce.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/8db0ce.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..97fd390
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/8db0ce.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_8db0ce() {
+  uint2 arg_1 = (1u).xx;
+  uint arg_2 = 1u;
+  int4 res = arg_0.Load(uint4(uint3(arg_1, arg_2), uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_8db0ce();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_8db0ce();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_8db0ce();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/8db0ce.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/8db0ce.wgsl.expected.glsl
new file mode 100644
index 0000000..527c269
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/8db0ce.wgsl.expected.glsl
@@ -0,0 +1,99 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(r32i) uniform highp iimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_8db0ce() {
+  uvec2 arg_1 = uvec2(1u);
+  uint arg_2 = 1u;
+  ivec4 res = texelFetch(arg_0, ivec3(uvec3(arg_1, arg_2)));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_8db0ce();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:11: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:11: '=' :  cannot convert from ' const float' to ' temp highp 4-component vector of int'
+ERROR: 0:11: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(r32i) uniform highp iimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_8db0ce() {
+  uvec2 arg_1 = uvec2(1u);
+  uint arg_2 = 1u;
+  ivec4 res = texelFetch(arg_0, ivec3(uvec3(arg_1, arg_2)));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_8db0ce();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:12: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:12: '=' :  cannot convert from ' const float' to ' temp mediump 4-component vector of int'
+ERROR: 0:12: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(r32i) uniform highp iimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_8db0ce() {
+  uvec2 arg_1 = uvec2(1u);
+  uint arg_2 = 1u;
+  ivec4 res = texelFetch(arg_0, ivec3(uvec3(arg_1, arg_2)));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_8db0ce();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:11: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:11: '=' :  cannot convert from ' const float' to ' temp highp 4-component vector of int'
+ERROR: 0:11: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/8db0ce.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/8db0ce.wgsl.expected.msl
new file mode 100644
index 0000000..d8c14cd
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/8db0ce.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_8db0ce(texture2d_array<int, access::read> tint_symbol_1, device int4* const tint_symbol_2) {
+  uint2 arg_1 = uint2(1u);
+  uint arg_2 = 1u;
+  int4 res = tint_symbol_1.read(uint2(arg_1), arg_2);
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<int, access::read> tint_symbol_3, device int4* const tint_symbol_4) {
+  textureLoad_8db0ce(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<int, access::read> tint_symbol_5 [[texture(0)]], device int4* tint_symbol_6 [[buffer(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<int, access::read> tint_symbol_7 [[texture(0)]], device int4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_8db0ce(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<int, access::read> tint_symbol_9 [[texture(0)]], device int4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_8db0ce(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/8db0ce.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/8db0ce.wgsl.expected.spvasm
new file mode 100644
index 0000000..e319401
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/8db0ce.wgsl.expected.spvasm
@@ -0,0 +1,110 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 60
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_8db0ce "textureLoad_8db0ce"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 2D 0 1 0 2 R32i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+      %v4int = OpTypeVector %int 4
+%prevent_dce_block = OpTypeStruct %v4int
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+     %uint_1 = OpConstant %uint 1
+         %24 = OpConstantComposite %v2uint %uint_1 %uint_1
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %27 = OpConstantNull %v2uint
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %30 = OpConstantNull %uint
+     %v3uint = OpTypeVector %uint 3
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+         %41 = OpConstantNull %v4int
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4int = OpTypePointer StorageBuffer %v4int
+         %46 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_8db0ce = OpFunction %void None %17
+         %20 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v2uint Function %27
+      %arg_2 = OpVariable %_ptr_Function_uint Function %30
+        %res = OpVariable %_ptr_Function_v4int Function %41
+               OpStore %arg_1 %24
+               OpStore %arg_2 %uint_1
+         %32 = OpLoad %11 %arg_0
+         %34 = OpLoad %v2uint %arg_1
+         %35 = OpCompositeExtract %uint %34 0
+         %36 = OpCompositeExtract %uint %34 1
+         %37 = OpLoad %uint %arg_2
+         %38 = OpCompositeConstruct %v3uint %35 %36 %37
+         %31 = OpImageRead %v4int %32 %38
+               OpStore %res %31
+         %44 = OpAccessChain %_ptr_StorageBuffer_v4int %prevent_dce %uint_0
+         %45 = OpLoad %v4int %res
+               OpStore %44 %45
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %46
+         %48 = OpLabel
+         %49 = OpFunctionCall %void %textureLoad_8db0ce
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %51 = OpLabel
+         %52 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %52
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %55 = OpLabel
+         %56 = OpFunctionCall %void %textureLoad_8db0ce
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %58 = OpLabel
+         %59 = OpFunctionCall %void %textureLoad_8db0ce
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/8db0ce.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/8db0ce.wgsl.expected.wgsl
new file mode 100644
index 0000000..1bfa68b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/8db0ce.wgsl.expected.wgsl
@@ -0,0 +1,28 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<r32sint, read>;
+
+fn textureLoad_8db0ce() {
+  var arg_1 = vec2<u32>(1u);
+  var arg_2 = 1u;
+  var res : vec4<i32> = textureLoad(arg_0, arg_1, arg_2);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_8db0ce();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_8db0ce();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_8db0ce();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/8e5032.wgsl b/test/tint/builtins/gen/var/textureLoad/8e5032.wgsl
new file mode 100644
index 0000000..7ecb7de
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/8e5032.wgsl
@@ -0,0 +1,50 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rg32uint, read>;
+
+// fn textureLoad(texture: texture_storage_2d_array<rg32uint, read>, coords: vec2<i32>, array_index: i32) -> vec4<u32>
+fn textureLoad_8e5032() {
+  var arg_1 = vec2<i32>(1i);
+  var arg_2 = 1i;
+  var res: vec4<u32> = textureLoad(arg_0, arg_1, arg_2);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_8e5032();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_8e5032();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_8e5032();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/8e5032.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/8e5032.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..a596fc1
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/8e5032.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_8e5032() {
+  int2 arg_1 = (1).xx;
+  int arg_2 = 1;
+  uint4 res = arg_0.Load(int4(int3(arg_1, arg_2), 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_8e5032();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_8e5032();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_8e5032();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/8e5032.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/8e5032.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..a596fc1
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/8e5032.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_8e5032() {
+  int2 arg_1 = (1).xx;
+  int arg_2 = 1;
+  uint4 res = arg_0.Load(int4(int3(arg_1, arg_2), 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_8e5032();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_8e5032();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_8e5032();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/8e5032.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/8e5032.wgsl.expected.glsl
new file mode 100644
index 0000000..b2eb97d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/8e5032.wgsl.expected.glsl
@@ -0,0 +1,96 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rg32ui) uniform highp uimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_8e5032() {
+  ivec2 arg_1 = ivec2(1);
+  int arg_2 = 1;
+  uvec4 res = texelFetch(arg_0, ivec3(arg_1, arg_2));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_8e5032();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rg32ui) uniform highp uimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_8e5032() {
+  ivec2 arg_1 = ivec2(1);
+  int arg_2 = 1;
+  uvec4 res = texelFetch(arg_0, ivec3(arg_1, arg_2));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_8e5032();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'image load-store format' : not supported with this profile: es
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rg32ui) uniform highp uimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_8e5032() {
+  ivec2 arg_1 = ivec2(1);
+  int arg_2 = 1;
+  uvec4 res = texelFetch(arg_0, ivec3(arg_1, arg_2));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_8e5032();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/8e5032.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/8e5032.wgsl.expected.msl
new file mode 100644
index 0000000..8e2f618
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/8e5032.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_8e5032(texture2d_array<uint, access::read> tint_symbol_1, device uint4* const tint_symbol_2) {
+  int2 arg_1 = int2(1);
+  int arg_2 = 1;
+  uint4 res = tint_symbol_1.read(uint2(arg_1), arg_2);
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<uint, access::read> tint_symbol_3, device uint4* const tint_symbol_4) {
+  textureLoad_8e5032(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<uint, access::read> tint_symbol_5 [[texture(0)]], device uint4* tint_symbol_6 [[buffer(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<uint, access::read> tint_symbol_7 [[texture(0)]], device uint4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_8e5032(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<uint, access::read> tint_symbol_9 [[texture(0)]], device uint4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_8e5032(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/8e5032.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/8e5032.wgsl.expected.spvasm
new file mode 100644
index 0000000..3459c78
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/8e5032.wgsl.expected.spvasm
@@ -0,0 +1,111 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 60
+; Schema: 0
+               OpCapability Shader
+               OpCapability StorageImageExtendedFormats
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_8e5032 "textureLoad_8e5032"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 2D 0 1 0 2 Rg32ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+     %v4uint = OpTypeVector %uint 4
+%prevent_dce_block = OpTypeStruct %v4uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %v2int = OpTypeVector %int 2
+      %int_1 = OpConstant %int 1
+         %24 = OpConstantComposite %v2int %int_1 %int_1
+%_ptr_Function_v2int = OpTypePointer Function %v2int
+         %27 = OpConstantNull %v2int
+%_ptr_Function_int = OpTypePointer Function %int
+         %30 = OpConstantNull %int
+      %v3int = OpTypeVector %int 3
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+         %41 = OpConstantNull %v4uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4uint = OpTypePointer StorageBuffer %v4uint
+         %46 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_8e5032 = OpFunction %void None %17
+         %20 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v2int Function %27
+      %arg_2 = OpVariable %_ptr_Function_int Function %30
+        %res = OpVariable %_ptr_Function_v4uint Function %41
+               OpStore %arg_1 %24
+               OpStore %arg_2 %int_1
+         %32 = OpLoad %11 %arg_0
+         %34 = OpLoad %v2int %arg_1
+         %35 = OpCompositeExtract %int %34 0
+         %36 = OpCompositeExtract %int %34 1
+         %37 = OpLoad %int %arg_2
+         %38 = OpCompositeConstruct %v3int %35 %36 %37
+         %31 = OpImageRead %v4uint %32 %38
+               OpStore %res %31
+         %44 = OpAccessChain %_ptr_StorageBuffer_v4uint %prevent_dce %uint_0
+         %45 = OpLoad %v4uint %res
+               OpStore %44 %45
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %46
+         %48 = OpLabel
+         %49 = OpFunctionCall %void %textureLoad_8e5032
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %51 = OpLabel
+         %52 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %52
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %55 = OpLabel
+         %56 = OpFunctionCall %void %textureLoad_8e5032
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %58 = OpLabel
+         %59 = OpFunctionCall %void %textureLoad_8e5032
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/8e5032.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/8e5032.wgsl.expected.wgsl
new file mode 100644
index 0000000..4d5bbb9
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/8e5032.wgsl.expected.wgsl
@@ -0,0 +1,28 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rg32uint, read>;
+
+fn textureLoad_8e5032() {
+  var arg_1 = vec2<i32>(1i);
+  var arg_2 = 1i;
+  var res : vec4<u32> = textureLoad(arg_0, arg_1, arg_2);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_8e5032();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_8e5032();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_8e5032();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/8ff033.wgsl b/test/tint/builtins/gen/var/textureLoad/8ff033.wgsl
new file mode 100644
index 0000000..f2e0dd9
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/8ff033.wgsl
@@ -0,0 +1,49 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d<rgba8snorm, read>;
+
+// fn textureLoad(texture: texture_storage_2d<rgba8snorm, read>, coords: vec2<u32>) -> vec4<f32>
+fn textureLoad_8ff033() {
+  var arg_1 = vec2<u32>(1u);
+  var res: vec4<f32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_8ff033();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_8ff033();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_8ff033();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/8ff033.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/8ff033.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..576b795
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/8ff033.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture2D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_8ff033() {
+  uint2 arg_1 = (1u).xx;
+  float4 res = arg_0.Load(uint3(arg_1, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_8ff033();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_8ff033();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_8ff033();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/8ff033.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/8ff033.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..576b795
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/8ff033.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture2D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_8ff033() {
+  uint2 arg_1 = (1u).xx;
+  float4 res = arg_0.Load(uint3(arg_1, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_8ff033();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_8ff033();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_8ff033();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/8ff033.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/8ff033.wgsl.expected.glsl
new file mode 100644
index 0000000..7a78a7e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/8ff033.wgsl.expected.glsl
@@ -0,0 +1,90 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba8_snorm) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_8ff033() {
+  uvec2 arg_1 = uvec2(1u);
+  vec4 res = texelFetch(arg_0, ivec2(arg_1));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_8ff033();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8_snorm' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba8_snorm) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_8ff033() {
+  uvec2 arg_1 = uvec2(1u);
+  vec4 res = texelFetch(arg_0, ivec2(arg_1));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_8ff033();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba8_snorm' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba8_snorm) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_8ff033() {
+  uvec2 arg_1 = uvec2(1u);
+  vec4 res = texelFetch(arg_0, ivec2(arg_1));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_8ff033();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8_snorm' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/8ff033.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/8ff033.wgsl.expected.msl
new file mode 100644
index 0000000..7d56980
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/8ff033.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_8ff033(texture2d<float, access::read> tint_symbol_1, device float4* const tint_symbol_2) {
+  uint2 arg_1 = uint2(1u);
+  float4 res = tint_symbol_1.read(uint2(arg_1));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<float, access::read> tint_symbol_3, device float4* const tint_symbol_4) {
+  textureLoad_8ff033(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<float, access::read> tint_symbol_5 [[texture(0)]], device float4* tint_symbol_6 [[buffer(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::read> tint_symbol_7 [[texture(0)]], device float4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_8ff033(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d<float, access::read> tint_symbol_9 [[texture(0)]], device float4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_8ff033(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/8ff033.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/8ff033.wgsl.expected.spvasm
new file mode 100644
index 0000000..0160e75
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/8ff033.wgsl.expected.spvasm
@@ -0,0 +1,97 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 49
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_8ff033 "textureLoad_8ff033"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 0 0 2 Rgba8Snorm
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+%prevent_dce_block = OpTypeStruct %v4float
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+     %uint_1 = OpConstant %uint 1
+         %22 = OpConstantComposite %v2uint %uint_1 %uint_1
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %25 = OpConstantNull %v2uint
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
+         %35 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_8ff033 = OpFunction %void None %15
+         %18 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v2uint Function %25
+        %res = OpVariable %_ptr_Function_v4float Function %5
+               OpStore %arg_1 %22
+         %27 = OpLoad %11 %arg_0
+         %28 = OpLoad %v2uint %arg_1
+         %26 = OpImageRead %v4float %27 %28
+               OpStore %res %26
+         %33 = OpAccessChain %_ptr_StorageBuffer_v4float %prevent_dce %uint_0
+         %34 = OpLoad %v4float %res
+               OpStore %33 %34
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %35
+         %37 = OpLabel
+         %38 = OpFunctionCall %void %textureLoad_8ff033
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %40 = OpLabel
+         %41 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %41
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %44 = OpLabel
+         %45 = OpFunctionCall %void %textureLoad_8ff033
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %47 = OpLabel
+         %48 = OpFunctionCall %void %textureLoad_8ff033
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/8ff033.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/8ff033.wgsl.expected.wgsl
new file mode 100644
index 0000000..1431c8b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/8ff033.wgsl.expected.wgsl
@@ -0,0 +1,27 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d<rgba8snorm, read>;
+
+fn textureLoad_8ff033() {
+  var arg_1 = vec2<u32>(1u);
+  var res : vec4<f32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_8ff033();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_8ff033();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_8ff033();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/936952.wgsl b/test/tint/builtins/gen/var/textureLoad/936952.wgsl
new file mode 100644
index 0000000..a00469b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/936952.wgsl
@@ -0,0 +1,50 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba32float, read>;
+
+// fn textureLoad(texture: texture_storage_2d_array<rgba32float, read>, coords: vec2<i32>, array_index: i32) -> vec4<f32>
+fn textureLoad_936952() {
+  var arg_1 = vec2<i32>(1i);
+  var arg_2 = 1i;
+  var res: vec4<f32> = textureLoad(arg_0, arg_1, arg_2);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_936952();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_936952();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_936952();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/936952.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/936952.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..f003e14
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/936952.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_936952() {
+  int2 arg_1 = (1).xx;
+  int arg_2 = 1;
+  float4 res = arg_0.Load(int4(int3(arg_1, arg_2), 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_936952();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_936952();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_936952();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/936952.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/936952.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..f003e14
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/936952.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_936952() {
+  int2 arg_1 = (1).xx;
+  int arg_2 = 1;
+  float4 res = arg_0.Load(int4(int3(arg_1, arg_2), 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_936952();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_936952();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_936952();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/936952.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/936952.wgsl.expected.glsl
new file mode 100644
index 0000000..261938d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/936952.wgsl.expected.glsl
@@ -0,0 +1,93 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba32f) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_936952() {
+  ivec2 arg_1 = ivec2(1);
+  int arg_2 = 1;
+  vec4 res = texelFetch(arg_0, ivec3(arg_1, arg_2));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_936952();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba32f' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba32f) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_936952() {
+  ivec2 arg_1 = ivec2(1);
+  int arg_2 = 1;
+  vec4 res = texelFetch(arg_0, ivec3(arg_1, arg_2));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_936952();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba32f' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba32f) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_936952() {
+  ivec2 arg_1 = ivec2(1);
+  int arg_2 = 1;
+  vec4 res = texelFetch(arg_0, ivec3(arg_1, arg_2));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_936952();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba32f' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/936952.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/936952.wgsl.expected.msl
new file mode 100644
index 0000000..332be6a
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/936952.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_936952(texture2d_array<float, access::read> tint_symbol_1, device float4* const tint_symbol_2) {
+  int2 arg_1 = int2(1);
+  int arg_2 = 1;
+  float4 res = tint_symbol_1.read(uint2(arg_1), arg_2);
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<float, access::read> tint_symbol_3, device float4* const tint_symbol_4) {
+  textureLoad_936952(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<float, access::read> tint_symbol_5 [[texture(0)]], device float4* tint_symbol_6 [[buffer(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::read> tint_symbol_7 [[texture(0)]], device float4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_936952(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<float, access::read> tint_symbol_9 [[texture(0)]], device float4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_936952(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/936952.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/936952.wgsl.expected.spvasm
new file mode 100644
index 0000000..53aee68
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/936952.wgsl.expected.spvasm
@@ -0,0 +1,108 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 58
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_936952 "textureLoad_936952"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 1 0 2 Rgba32f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+%prevent_dce_block = OpTypeStruct %v4float
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %v2int = OpTypeVector %int 2
+      %int_1 = OpConstant %int 1
+         %22 = OpConstantComposite %v2int %int_1 %int_1
+%_ptr_Function_v2int = OpTypePointer Function %v2int
+         %25 = OpConstantNull %v2int
+%_ptr_Function_int = OpTypePointer Function %int
+         %28 = OpConstantNull %int
+      %v3int = OpTypeVector %int 3
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+       %uint = OpTypeInt 32 0
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
+         %44 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_936952 = OpFunction %void None %15
+         %18 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v2int Function %25
+      %arg_2 = OpVariable %_ptr_Function_int Function %28
+        %res = OpVariable %_ptr_Function_v4float Function %5
+               OpStore %arg_1 %22
+               OpStore %arg_2 %int_1
+         %30 = OpLoad %11 %arg_0
+         %32 = OpLoad %v2int %arg_1
+         %33 = OpCompositeExtract %int %32 0
+         %34 = OpCompositeExtract %int %32 1
+         %35 = OpLoad %int %arg_2
+         %36 = OpCompositeConstruct %v3int %33 %34 %35
+         %29 = OpImageRead %v4float %30 %36
+               OpStore %res %29
+         %42 = OpAccessChain %_ptr_StorageBuffer_v4float %prevent_dce %uint_0
+         %43 = OpLoad %v4float %res
+               OpStore %42 %43
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %44
+         %46 = OpLabel
+         %47 = OpFunctionCall %void %textureLoad_936952
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %49 = OpLabel
+         %50 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %50
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %53 = OpLabel
+         %54 = OpFunctionCall %void %textureLoad_936952
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %56 = OpLabel
+         %57 = OpFunctionCall %void %textureLoad_936952
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/936952.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/936952.wgsl.expected.wgsl
new file mode 100644
index 0000000..fb4fa5f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/936952.wgsl.expected.wgsl
@@ -0,0 +1,28 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba32float, read>;
+
+fn textureLoad_936952() {
+  var arg_1 = vec2<i32>(1i);
+  var arg_2 = 1i;
+  var res : vec4<f32> = textureLoad(arg_0, arg_1, arg_2);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_936952();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_936952();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_936952();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/970308.wgsl b/test/tint/builtins/gen/var/textureLoad/970308.wgsl
new file mode 100644
index 0000000..40081e0
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/970308.wgsl
@@ -0,0 +1,50 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<r32uint, read>;
+
+// fn textureLoad(texture: texture_storage_2d_array<r32uint, read>, coords: vec2<i32>, array_index: u32) -> vec4<u32>
+fn textureLoad_970308() {
+  var arg_1 = vec2<i32>(1i);
+  var arg_2 = 1u;
+  var res: vec4<u32> = textureLoad(arg_0, arg_1, arg_2);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_970308();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_970308();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_970308();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/970308.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/970308.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..e9926e6
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/970308.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_970308() {
+  int2 arg_1 = (1).xx;
+  uint arg_2 = 1u;
+  uint4 res = arg_0.Load(int4(int3(arg_1, int(arg_2)), 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_970308();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_970308();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_970308();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/970308.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/970308.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..e9926e6
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/970308.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_970308() {
+  int2 arg_1 = (1).xx;
+  uint arg_2 = 1u;
+  uint4 res = arg_0.Load(int4(int3(arg_1, int(arg_2)), 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_970308();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_970308();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_970308();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/970308.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/970308.wgsl.expected.glsl
new file mode 100644
index 0000000..1f3f76b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/970308.wgsl.expected.glsl
@@ -0,0 +1,99 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(r32ui) uniform highp uimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_970308() {
+  ivec2 arg_1 = ivec2(1);
+  uint arg_2 = 1u;
+  uvec4 res = texelFetch(arg_0, ivec3(arg_1, int(arg_2)));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_970308();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:11: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:11: '=' :  cannot convert from ' const float' to ' temp highp 4-component vector of uint'
+ERROR: 0:11: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(r32ui) uniform highp uimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_970308() {
+  ivec2 arg_1 = ivec2(1);
+  uint arg_2 = 1u;
+  uvec4 res = texelFetch(arg_0, ivec3(arg_1, int(arg_2)));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_970308();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:12: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:12: '=' :  cannot convert from ' const float' to ' temp mediump 4-component vector of uint'
+ERROR: 0:12: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(r32ui) uniform highp uimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_970308() {
+  ivec2 arg_1 = ivec2(1);
+  uint arg_2 = 1u;
+  uvec4 res = texelFetch(arg_0, ivec3(arg_1, int(arg_2)));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_970308();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:11: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:11: '=' :  cannot convert from ' const float' to ' temp highp 4-component vector of uint'
+ERROR: 0:11: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/970308.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/970308.wgsl.expected.msl
new file mode 100644
index 0000000..4741151
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/970308.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_970308(texture2d_array<uint, access::read> tint_symbol_1, device uint4* const tint_symbol_2) {
+  int2 arg_1 = int2(1);
+  uint arg_2 = 1u;
+  uint4 res = tint_symbol_1.read(uint2(arg_1), arg_2);
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<uint, access::read> tint_symbol_3, device uint4* const tint_symbol_4) {
+  textureLoad_970308(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<uint, access::read> tint_symbol_5 [[texture(0)]], device uint4* tint_symbol_6 [[buffer(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<uint, access::read> tint_symbol_7 [[texture(0)]], device uint4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_970308(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<uint, access::read> tint_symbol_9 [[texture(0)]], device uint4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_970308(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/970308.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/970308.wgsl.expected.spvasm
new file mode 100644
index 0000000..0919a5a
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/970308.wgsl.expected.spvasm
@@ -0,0 +1,112 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 62
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_970308 "textureLoad_970308"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 2D 0 1 0 2 R32ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+     %v4uint = OpTypeVector %uint 4
+%prevent_dce_block = OpTypeStruct %v4uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %v2int = OpTypeVector %int 2
+      %int_1 = OpConstant %int 1
+         %24 = OpConstantComposite %v2int %int_1 %int_1
+%_ptr_Function_v2int = OpTypePointer Function %v2int
+         %27 = OpConstantNull %v2int
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %31 = OpConstantNull %uint
+      %v3int = OpTypeVector %int 3
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+         %43 = OpConstantNull %v4uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4uint = OpTypePointer StorageBuffer %v4uint
+         %48 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_970308 = OpFunction %void None %17
+         %20 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v2int Function %27
+      %arg_2 = OpVariable %_ptr_Function_uint Function %31
+        %res = OpVariable %_ptr_Function_v4uint Function %43
+               OpStore %arg_1 %24
+               OpStore %arg_2 %uint_1
+         %33 = OpLoad %11 %arg_0
+         %35 = OpLoad %v2int %arg_1
+         %36 = OpCompositeExtract %int %35 0
+         %37 = OpCompositeExtract %int %35 1
+         %39 = OpLoad %uint %arg_2
+         %38 = OpBitcast %int %39
+         %40 = OpCompositeConstruct %v3int %36 %37 %38
+         %32 = OpImageRead %v4uint %33 %40
+               OpStore %res %32
+         %46 = OpAccessChain %_ptr_StorageBuffer_v4uint %prevent_dce %uint_0
+         %47 = OpLoad %v4uint %res
+               OpStore %46 %47
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %48
+         %50 = OpLabel
+         %51 = OpFunctionCall %void %textureLoad_970308
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %53 = OpLabel
+         %54 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %54
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %57 = OpLabel
+         %58 = OpFunctionCall %void %textureLoad_970308
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %60 = OpLabel
+         %61 = OpFunctionCall %void %textureLoad_970308
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/970308.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/970308.wgsl.expected.wgsl
new file mode 100644
index 0000000..a6ddb55
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/970308.wgsl.expected.wgsl
@@ -0,0 +1,28 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<r32uint, read>;
+
+fn textureLoad_970308() {
+  var arg_1 = vec2<i32>(1i);
+  var arg_2 = 1u;
+  var res : vec4<u32> = textureLoad(arg_0, arg_1, arg_2);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_970308();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_970308();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_970308();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/9a7c90.wgsl b/test/tint/builtins/gen/var/textureLoad/9a7c90.wgsl
new file mode 100644
index 0000000..b8f7f9b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/9a7c90.wgsl
@@ -0,0 +1,49 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_3d<rgba8uint, read>;
+
+// fn textureLoad(texture: texture_storage_3d<rgba8uint, read>, coords: vec3<i32>) -> vec4<u32>
+fn textureLoad_9a7c90() {
+  var arg_1 = vec3<i32>(1i);
+  var res: vec4<u32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_9a7c90();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_9a7c90();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_9a7c90();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/9a7c90.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/9a7c90.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..dfd0323
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/9a7c90.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture3D<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_9a7c90() {
+  int3 arg_1 = (1).xxx;
+  uint4 res = arg_0.Load(int4(arg_1, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_9a7c90();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_9a7c90();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_9a7c90();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/9a7c90.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/9a7c90.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..dfd0323
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/9a7c90.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture3D<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_9a7c90() {
+  int3 arg_1 = (1).xxx;
+  uint4 res = arg_0.Load(int4(arg_1, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_9a7c90();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_9a7c90();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_9a7c90();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/9a7c90.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/9a7c90.wgsl.expected.glsl
new file mode 100644
index 0000000..1a10407
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/9a7c90.wgsl.expected.glsl
@@ -0,0 +1,90 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba8ui) uniform highp uimage3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_9a7c90() {
+  ivec3 arg_1 = ivec3(1);
+  uvec4 res = texelFetch(arg_0, arg_1);
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_9a7c90();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba8ui) uniform highp uimage3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_9a7c90() {
+  ivec3 arg_1 = ivec3(1);
+  uvec4 res = texelFetch(arg_0, arg_1);
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_9a7c90();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba8ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba8ui) uniform highp uimage3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_9a7c90() {
+  ivec3 arg_1 = ivec3(1);
+  uvec4 res = texelFetch(arg_0, arg_1);
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_9a7c90();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/9a7c90.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/9a7c90.wgsl.expected.msl
new file mode 100644
index 0000000..5cb41e1
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/9a7c90.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_9a7c90(texture3d<uint, access::read> tint_symbol_1, device uint4* const tint_symbol_2) {
+  int3 arg_1 = int3(1);
+  uint4 res = tint_symbol_1.read(uint3(arg_1));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<uint, access::read> tint_symbol_3, device uint4* const tint_symbol_4) {
+  textureLoad_9a7c90(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<uint, access::read> tint_symbol_5 [[texture(0)]], device uint4* tint_symbol_6 [[buffer(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<uint, access::read> tint_symbol_7 [[texture(0)]], device uint4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_9a7c90(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture3d<uint, access::read> tint_symbol_9 [[texture(0)]], device uint4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_9a7c90(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/9a7c90.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/9a7c90.wgsl.expected.spvasm
new file mode 100644
index 0000000..502d5ca
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/9a7c90.wgsl.expected.spvasm
@@ -0,0 +1,100 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 52
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_9a7c90 "textureLoad_9a7c90"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 3D 0 0 0 2 Rgba8ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+     %v4uint = OpTypeVector %uint 4
+%prevent_dce_block = OpTypeStruct %v4uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %v3int = OpTypeVector %int 3
+      %int_1 = OpConstant %int 1
+         %24 = OpConstantComposite %v3int %int_1 %int_1 %int_1
+%_ptr_Function_v3int = OpTypePointer Function %v3int
+         %27 = OpConstantNull %v3int
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+         %33 = OpConstantNull %v4uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4uint = OpTypePointer StorageBuffer %v4uint
+         %38 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_9a7c90 = OpFunction %void None %17
+         %20 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v3int Function %27
+        %res = OpVariable %_ptr_Function_v4uint Function %33
+               OpStore %arg_1 %24
+         %29 = OpLoad %11 %arg_0
+         %30 = OpLoad %v3int %arg_1
+         %28 = OpImageRead %v4uint %29 %30
+               OpStore %res %28
+         %36 = OpAccessChain %_ptr_StorageBuffer_v4uint %prevent_dce %uint_0
+         %37 = OpLoad %v4uint %res
+               OpStore %36 %37
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %38
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %textureLoad_9a7c90
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %43 = OpLabel
+         %44 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %44
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %47 = OpLabel
+         %48 = OpFunctionCall %void %textureLoad_9a7c90
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %50 = OpLabel
+         %51 = OpFunctionCall %void %textureLoad_9a7c90
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/9a7c90.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/9a7c90.wgsl.expected.wgsl
new file mode 100644
index 0000000..8787ae9
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/9a7c90.wgsl.expected.wgsl
@@ -0,0 +1,27 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_3d<rgba8uint, read>;
+
+fn textureLoad_9a7c90() {
+  var arg_1 = vec3<i32>(1i);
+  var res : vec4<u32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_9a7c90();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_9a7c90();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_9a7c90();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/9a8c1e.wgsl b/test/tint/builtins/gen/var/textureLoad/9a8c1e.wgsl
new file mode 100644
index 0000000..81753c7
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/9a8c1e.wgsl
@@ -0,0 +1,50 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba8sint, read>;
+
+// fn textureLoad(texture: texture_storage_2d_array<rgba8sint, read>, coords: vec2<u32>, array_index: i32) -> vec4<i32>
+fn textureLoad_9a8c1e() {
+  var arg_1 = vec2<u32>(1u);
+  var arg_2 = 1i;
+  var res: vec4<i32> = textureLoad(arg_0, arg_1, arg_2);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_9a8c1e();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_9a8c1e();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_9a8c1e();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/9a8c1e.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/9a8c1e.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..3f99d92
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/9a8c1e.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_9a8c1e() {
+  uint2 arg_1 = (1u).xx;
+  int arg_2 = 1;
+  int4 res = arg_0.Load(uint4(uint3(arg_1, uint(arg_2)), uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_9a8c1e();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_9a8c1e();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_9a8c1e();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/9a8c1e.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/9a8c1e.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..3f99d92
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/9a8c1e.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_9a8c1e() {
+  uint2 arg_1 = (1u).xx;
+  int arg_2 = 1;
+  int4 res = arg_0.Load(uint4(uint3(arg_1, uint(arg_2)), uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_9a8c1e();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_9a8c1e();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_9a8c1e();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/9a8c1e.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/9a8c1e.wgsl.expected.glsl
new file mode 100644
index 0000000..a2457d0
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/9a8c1e.wgsl.expected.glsl
@@ -0,0 +1,93 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba8i) uniform highp iimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_9a8c1e() {
+  uvec2 arg_1 = uvec2(1u);
+  int arg_2 = 1;
+  ivec4 res = texelFetch(arg_0, ivec3(uvec3(arg_1, uint(arg_2))));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_9a8c1e();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba8i) uniform highp iimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_9a8c1e() {
+  uvec2 arg_1 = uvec2(1u);
+  int arg_2 = 1;
+  ivec4 res = texelFetch(arg_0, ivec3(uvec3(arg_1, uint(arg_2))));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_9a8c1e();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba8i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba8i) uniform highp iimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_9a8c1e() {
+  uvec2 arg_1 = uvec2(1u);
+  int arg_2 = 1;
+  ivec4 res = texelFetch(arg_0, ivec3(uvec3(arg_1, uint(arg_2))));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_9a8c1e();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/9a8c1e.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/9a8c1e.wgsl.expected.msl
new file mode 100644
index 0000000..de55d5c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/9a8c1e.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_9a8c1e(texture2d_array<int, access::read> tint_symbol_1, device int4* const tint_symbol_2) {
+  uint2 arg_1 = uint2(1u);
+  int arg_2 = 1;
+  int4 res = tint_symbol_1.read(uint2(arg_1), arg_2);
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<int, access::read> tint_symbol_3, device int4* const tint_symbol_4) {
+  textureLoad_9a8c1e(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<int, access::read> tint_symbol_5 [[texture(0)]], device int4* tint_symbol_6 [[buffer(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<int, access::read> tint_symbol_7 [[texture(0)]], device int4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_9a8c1e(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<int, access::read> tint_symbol_9 [[texture(0)]], device int4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_9a8c1e(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/9a8c1e.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/9a8c1e.wgsl.expected.spvasm
new file mode 100644
index 0000000..117902e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/9a8c1e.wgsl.expected.spvasm
@@ -0,0 +1,112 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 62
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_9a8c1e "textureLoad_9a8c1e"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 2D 0 1 0 2 Rgba8i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+      %v4int = OpTypeVector %int 4
+%prevent_dce_block = OpTypeStruct %v4int
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+     %uint_1 = OpConstant %uint 1
+         %24 = OpConstantComposite %v2uint %uint_1 %uint_1
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %27 = OpConstantNull %v2uint
+      %int_1 = OpConstant %int 1
+%_ptr_Function_int = OpTypePointer Function %int
+         %31 = OpConstantNull %int
+     %v3uint = OpTypeVector %uint 3
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+         %43 = OpConstantNull %v4int
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4int = OpTypePointer StorageBuffer %v4int
+         %48 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_9a8c1e = OpFunction %void None %17
+         %20 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v2uint Function %27
+      %arg_2 = OpVariable %_ptr_Function_int Function %31
+        %res = OpVariable %_ptr_Function_v4int Function %43
+               OpStore %arg_1 %24
+               OpStore %arg_2 %int_1
+         %33 = OpLoad %11 %arg_0
+         %35 = OpLoad %v2uint %arg_1
+         %36 = OpCompositeExtract %uint %35 0
+         %37 = OpCompositeExtract %uint %35 1
+         %39 = OpLoad %int %arg_2
+         %38 = OpBitcast %uint %39
+         %40 = OpCompositeConstruct %v3uint %36 %37 %38
+         %32 = OpImageRead %v4int %33 %40
+               OpStore %res %32
+         %46 = OpAccessChain %_ptr_StorageBuffer_v4int %prevent_dce %uint_0
+         %47 = OpLoad %v4int %res
+               OpStore %46 %47
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %48
+         %50 = OpLabel
+         %51 = OpFunctionCall %void %textureLoad_9a8c1e
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %53 = OpLabel
+         %54 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %54
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %57 = OpLabel
+         %58 = OpFunctionCall %void %textureLoad_9a8c1e
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %60 = OpLabel
+         %61 = OpFunctionCall %void %textureLoad_9a8c1e
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/9a8c1e.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/9a8c1e.wgsl.expected.wgsl
new file mode 100644
index 0000000..4adc1c5
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/9a8c1e.wgsl.expected.wgsl
@@ -0,0 +1,28 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba8sint, read>;
+
+fn textureLoad_9a8c1e() {
+  var arg_1 = vec2<u32>(1u);
+  var arg_2 = 1i;
+  var res : vec4<i32> = textureLoad(arg_0, arg_1, arg_2);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_9a8c1e();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_9a8c1e();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_9a8c1e();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/9b5343.wgsl b/test/tint/builtins/gen/var/textureLoad/9b5343.wgsl
new file mode 100644
index 0000000..88d2833
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/9b5343.wgsl
@@ -0,0 +1,50 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba16uint, read>;
+
+// fn textureLoad(texture: texture_storage_2d_array<rgba16uint, read>, coords: vec2<u32>, array_index: i32) -> vec4<u32>
+fn textureLoad_9b5343() {
+  var arg_1 = vec2<u32>(1u);
+  var arg_2 = 1i;
+  var res: vec4<u32> = textureLoad(arg_0, arg_1, arg_2);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_9b5343();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_9b5343();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_9b5343();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/9b5343.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/9b5343.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..43ec0bd
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/9b5343.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_9b5343() {
+  uint2 arg_1 = (1u).xx;
+  int arg_2 = 1;
+  uint4 res = arg_0.Load(uint4(uint3(arg_1, uint(arg_2)), uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_9b5343();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_9b5343();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_9b5343();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/9b5343.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/9b5343.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..43ec0bd
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/9b5343.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_9b5343() {
+  uint2 arg_1 = (1u).xx;
+  int arg_2 = 1;
+  uint4 res = arg_0.Load(uint4(uint3(arg_1, uint(arg_2)), uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_9b5343();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_9b5343();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_9b5343();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/9b5343.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/9b5343.wgsl.expected.glsl
new file mode 100644
index 0000000..c9576a2
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/9b5343.wgsl.expected.glsl
@@ -0,0 +1,93 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba16ui) uniform highp uimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_9b5343() {
+  uvec2 arg_1 = uvec2(1u);
+  int arg_2 = 1;
+  uvec4 res = texelFetch(arg_0, ivec3(uvec3(arg_1, uint(arg_2))));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_9b5343();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba16ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba16ui) uniform highp uimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_9b5343() {
+  uvec2 arg_1 = uvec2(1u);
+  int arg_2 = 1;
+  uvec4 res = texelFetch(arg_0, ivec3(uvec3(arg_1, uint(arg_2))));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_9b5343();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba16ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba16ui) uniform highp uimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_9b5343() {
+  uvec2 arg_1 = uvec2(1u);
+  int arg_2 = 1;
+  uvec4 res = texelFetch(arg_0, ivec3(uvec3(arg_1, uint(arg_2))));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_9b5343();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba16ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/9b5343.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/9b5343.wgsl.expected.msl
new file mode 100644
index 0000000..7b64a17
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/9b5343.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_9b5343(texture2d_array<uint, access::read> tint_symbol_1, device uint4* const tint_symbol_2) {
+  uint2 arg_1 = uint2(1u);
+  int arg_2 = 1;
+  uint4 res = tint_symbol_1.read(uint2(arg_1), arg_2);
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<uint, access::read> tint_symbol_3, device uint4* const tint_symbol_4) {
+  textureLoad_9b5343(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<uint, access::read> tint_symbol_5 [[texture(0)]], device uint4* tint_symbol_6 [[buffer(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<uint, access::read> tint_symbol_7 [[texture(0)]], device uint4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_9b5343(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<uint, access::read> tint_symbol_9 [[texture(0)]], device uint4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_9b5343(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/9b5343.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/9b5343.wgsl.expected.spvasm
new file mode 100644
index 0000000..76e4a48
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/9b5343.wgsl.expected.spvasm
@@ -0,0 +1,112 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 62
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_9b5343 "textureLoad_9b5343"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 2D 0 1 0 2 Rgba16ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+     %v4uint = OpTypeVector %uint 4
+%prevent_dce_block = OpTypeStruct %v4uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+     %v2uint = OpTypeVector %uint 2
+     %uint_1 = OpConstant %uint 1
+         %23 = OpConstantComposite %v2uint %uint_1 %uint_1
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %26 = OpConstantNull %v2uint
+        %int = OpTypeInt 32 1
+      %int_1 = OpConstant %int 1
+%_ptr_Function_int = OpTypePointer Function %int
+         %31 = OpConstantNull %int
+     %v3uint = OpTypeVector %uint 3
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+         %43 = OpConstantNull %v4uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4uint = OpTypePointer StorageBuffer %v4uint
+         %48 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_9b5343 = OpFunction %void None %17
+         %20 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v2uint Function %26
+      %arg_2 = OpVariable %_ptr_Function_int Function %31
+        %res = OpVariable %_ptr_Function_v4uint Function %43
+               OpStore %arg_1 %23
+               OpStore %arg_2 %int_1
+         %33 = OpLoad %11 %arg_0
+         %35 = OpLoad %v2uint %arg_1
+         %36 = OpCompositeExtract %uint %35 0
+         %37 = OpCompositeExtract %uint %35 1
+         %39 = OpLoad %int %arg_2
+         %38 = OpBitcast %uint %39
+         %40 = OpCompositeConstruct %v3uint %36 %37 %38
+         %32 = OpImageRead %v4uint %33 %40
+               OpStore %res %32
+         %46 = OpAccessChain %_ptr_StorageBuffer_v4uint %prevent_dce %uint_0
+         %47 = OpLoad %v4uint %res
+               OpStore %46 %47
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %48
+         %50 = OpLabel
+         %51 = OpFunctionCall %void %textureLoad_9b5343
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %53 = OpLabel
+         %54 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %54
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %57 = OpLabel
+         %58 = OpFunctionCall %void %textureLoad_9b5343
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %60 = OpLabel
+         %61 = OpFunctionCall %void %textureLoad_9b5343
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/9b5343.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/9b5343.wgsl.expected.wgsl
new file mode 100644
index 0000000..c1201a5
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/9b5343.wgsl.expected.wgsl
@@ -0,0 +1,28 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba16uint, read>;
+
+fn textureLoad_9b5343() {
+  var arg_1 = vec2<u32>(1u);
+  var arg_2 = 1i;
+  var res : vec4<u32> = textureLoad(arg_0, arg_1, arg_2);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_9b5343();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_9b5343();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_9b5343();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/9c2376.wgsl b/test/tint/builtins/gen/var/textureLoad/9c2376.wgsl
new file mode 100644
index 0000000..bb986e4
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/9c2376.wgsl
@@ -0,0 +1,50 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<r32float, read>;
+
+// fn textureLoad(texture: texture_storage_2d_array<r32float, read>, coords: vec2<i32>, array_index: u32) -> vec4<f32>
+fn textureLoad_9c2376() {
+  var arg_1 = vec2<i32>(1i);
+  var arg_2 = 1u;
+  var res: vec4<f32> = textureLoad(arg_0, arg_1, arg_2);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_9c2376();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_9c2376();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_9c2376();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/9c2376.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/9c2376.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..618e3a5
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/9c2376.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_9c2376() {
+  int2 arg_1 = (1).xx;
+  uint arg_2 = 1u;
+  float4 res = arg_0.Load(int4(int3(arg_1, int(arg_2)), 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_9c2376();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_9c2376();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_9c2376();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/9c2376.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/9c2376.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..618e3a5
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/9c2376.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_9c2376() {
+  int2 arg_1 = (1).xx;
+  uint arg_2 = 1u;
+  float4 res = arg_0.Load(int4(int3(arg_1, int(arg_2)), 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_9c2376();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_9c2376();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_9c2376();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/9c2376.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/9c2376.wgsl.expected.glsl
new file mode 100644
index 0000000..7bb112b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/9c2376.wgsl.expected.glsl
@@ -0,0 +1,99 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(r32f) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_9c2376() {
+  ivec2 arg_1 = ivec2(1);
+  uint arg_2 = 1u;
+  vec4 res = texelFetch(arg_0, ivec3(arg_1, int(arg_2)));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_9c2376();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:11: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:11: '=' :  cannot convert from ' const float' to ' temp highp 4-component vector of float'
+ERROR: 0:11: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(r32f) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_9c2376() {
+  ivec2 arg_1 = ivec2(1);
+  uint arg_2 = 1u;
+  vec4 res = texelFetch(arg_0, ivec3(arg_1, int(arg_2)));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_9c2376();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:12: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:12: '=' :  cannot convert from ' const float' to ' temp highp 4-component vector of float'
+ERROR: 0:12: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(r32f) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_9c2376() {
+  ivec2 arg_1 = ivec2(1);
+  uint arg_2 = 1u;
+  vec4 res = texelFetch(arg_0, ivec3(arg_1, int(arg_2)));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_9c2376();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:11: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:11: '=' :  cannot convert from ' const float' to ' temp highp 4-component vector of float'
+ERROR: 0:11: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/9c2376.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/9c2376.wgsl.expected.msl
new file mode 100644
index 0000000..255fa56
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/9c2376.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_9c2376(texture2d_array<float, access::read> tint_symbol_1, device float4* const tint_symbol_2) {
+  int2 arg_1 = int2(1);
+  uint arg_2 = 1u;
+  float4 res = tint_symbol_1.read(uint2(arg_1), arg_2);
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<float, access::read> tint_symbol_3, device float4* const tint_symbol_4) {
+  textureLoad_9c2376(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<float, access::read> tint_symbol_5 [[texture(0)]], device float4* tint_symbol_6 [[buffer(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::read> tint_symbol_7 [[texture(0)]], device float4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_9c2376(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<float, access::read> tint_symbol_9 [[texture(0)]], device float4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_9c2376(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/9c2376.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/9c2376.wgsl.expected.spvasm
new file mode 100644
index 0000000..840d4a7
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/9c2376.wgsl.expected.spvasm
@@ -0,0 +1,110 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 60
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_9c2376 "textureLoad_9c2376"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 1 0 2 R32f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+%prevent_dce_block = OpTypeStruct %v4float
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %v2int = OpTypeVector %int 2
+      %int_1 = OpConstant %int 1
+         %22 = OpConstantComposite %v2int %int_1 %int_1
+%_ptr_Function_v2int = OpTypePointer Function %v2int
+         %25 = OpConstantNull %v2int
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %30 = OpConstantNull %uint
+      %v3int = OpTypeVector %int 3
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
+         %46 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_9c2376 = OpFunction %void None %15
+         %18 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v2int Function %25
+      %arg_2 = OpVariable %_ptr_Function_uint Function %30
+        %res = OpVariable %_ptr_Function_v4float Function %5
+               OpStore %arg_1 %22
+               OpStore %arg_2 %uint_1
+         %32 = OpLoad %11 %arg_0
+         %34 = OpLoad %v2int %arg_1
+         %35 = OpCompositeExtract %int %34 0
+         %36 = OpCompositeExtract %int %34 1
+         %38 = OpLoad %uint %arg_2
+         %37 = OpBitcast %int %38
+         %39 = OpCompositeConstruct %v3int %35 %36 %37
+         %31 = OpImageRead %v4float %32 %39
+               OpStore %res %31
+         %44 = OpAccessChain %_ptr_StorageBuffer_v4float %prevent_dce %uint_0
+         %45 = OpLoad %v4float %res
+               OpStore %44 %45
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %46
+         %48 = OpLabel
+         %49 = OpFunctionCall %void %textureLoad_9c2376
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %51 = OpLabel
+         %52 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %52
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %55 = OpLabel
+         %56 = OpFunctionCall %void %textureLoad_9c2376
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %58 = OpLabel
+         %59 = OpFunctionCall %void %textureLoad_9c2376
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/9c2376.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/9c2376.wgsl.expected.wgsl
new file mode 100644
index 0000000..66fb107
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/9c2376.wgsl.expected.wgsl
@@ -0,0 +1,28 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<r32float, read>;
+
+fn textureLoad_9c2376() {
+  var arg_1 = vec2<i32>(1i);
+  var arg_2 = 1u;
+  var res : vec4<f32> = textureLoad(arg_0, arg_1, arg_2);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_9c2376();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_9c2376();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_9c2376();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/9c2a14.wgsl b/test/tint/builtins/gen/var/textureLoad/9c2a14.wgsl
new file mode 100644
index 0000000..58f2f41
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/9c2a14.wgsl
@@ -0,0 +1,49 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d<rg32float, read>;
+
+// fn textureLoad(texture: texture_storage_2d<rg32float, read>, coords: vec2<i32>) -> vec4<f32>
+fn textureLoad_9c2a14() {
+  var arg_1 = vec2<i32>(1i);
+  var res: vec4<f32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_9c2a14();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_9c2a14();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_9c2a14();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/9c2a14.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/9c2a14.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..0ec4ba3
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/9c2a14.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture2D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_9c2a14() {
+  int2 arg_1 = (1).xx;
+  float4 res = arg_0.Load(int3(arg_1, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_9c2a14();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_9c2a14();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_9c2a14();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/9c2a14.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/9c2a14.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..0ec4ba3
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/9c2a14.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture2D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_9c2a14() {
+  int2 arg_1 = (1).xx;
+  float4 res = arg_0.Load(int3(arg_1, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_9c2a14();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_9c2a14();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_9c2a14();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/9c2a14.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/9c2a14.wgsl.expected.glsl
new file mode 100644
index 0000000..4480d4d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/9c2a14.wgsl.expected.glsl
@@ -0,0 +1,93 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rg32f) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_9c2a14() {
+  ivec2 arg_1 = ivec2(1);
+  vec4 res = texelFetch(arg_0, arg_1);
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_9c2a14();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rg32f) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_9c2a14() {
+  ivec2 arg_1 = ivec2(1);
+  vec4 res = texelFetch(arg_0, arg_1);
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_9c2a14();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'image load-store format' : not supported with this profile: es
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rg32f) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_9c2a14() {
+  ivec2 arg_1 = ivec2(1);
+  vec4 res = texelFetch(arg_0, arg_1);
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_9c2a14();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/9c2a14.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/9c2a14.wgsl.expected.msl
new file mode 100644
index 0000000..0de45ce
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/9c2a14.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_9c2a14(texture2d<float, access::read> tint_symbol_1, device float4* const tint_symbol_2) {
+  int2 arg_1 = int2(1);
+  float4 res = tint_symbol_1.read(uint2(arg_1));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<float, access::read> tint_symbol_3, device float4* const tint_symbol_4) {
+  textureLoad_9c2a14(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<float, access::read> tint_symbol_5 [[texture(0)]], device float4* tint_symbol_6 [[buffer(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::read> tint_symbol_7 [[texture(0)]], device float4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_9c2a14(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d<float, access::read> tint_symbol_9 [[texture(0)]], device float4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_9c2a14(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/9c2a14.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/9c2a14.wgsl.expected.spvasm
new file mode 100644
index 0000000..10c0ea9
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/9c2a14.wgsl.expected.spvasm
@@ -0,0 +1,99 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 50
+; Schema: 0
+               OpCapability Shader
+               OpCapability StorageImageExtendedFormats
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_9c2a14 "textureLoad_9c2a14"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 0 0 2 Rg32f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+%prevent_dce_block = OpTypeStruct %v4float
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %v2int = OpTypeVector %int 2
+      %int_1 = OpConstant %int 1
+         %22 = OpConstantComposite %v2int %int_1 %int_1
+%_ptr_Function_v2int = OpTypePointer Function %v2int
+         %25 = OpConstantNull %v2int
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+       %uint = OpTypeInt 32 0
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
+         %36 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_9c2a14 = OpFunction %void None %15
+         %18 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v2int Function %25
+        %res = OpVariable %_ptr_Function_v4float Function %5
+               OpStore %arg_1 %22
+         %27 = OpLoad %11 %arg_0
+         %28 = OpLoad %v2int %arg_1
+         %26 = OpImageRead %v4float %27 %28
+               OpStore %res %26
+         %34 = OpAccessChain %_ptr_StorageBuffer_v4float %prevent_dce %uint_0
+         %35 = OpLoad %v4float %res
+               OpStore %34 %35
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %36
+         %38 = OpLabel
+         %39 = OpFunctionCall %void %textureLoad_9c2a14
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %41 = OpLabel
+         %42 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %42
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %45 = OpLabel
+         %46 = OpFunctionCall %void %textureLoad_9c2a14
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %48 = OpLabel
+         %49 = OpFunctionCall %void %textureLoad_9c2a14
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/9c2a14.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/9c2a14.wgsl.expected.wgsl
new file mode 100644
index 0000000..a53d75b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/9c2a14.wgsl.expected.wgsl
@@ -0,0 +1,27 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d<rg32float, read>;
+
+fn textureLoad_9c2a14() {
+  var arg_1 = vec2<i32>(1i);
+  var res : vec4<f32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_9c2a14();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_9c2a14();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_9c2a14();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/9cf7df.wgsl b/test/tint/builtins/gen/var/textureLoad/9cf7df.wgsl
new file mode 100644
index 0000000..5266238
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/9cf7df.wgsl
@@ -0,0 +1,50 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rg32sint, read>;
+
+// fn textureLoad(texture: texture_storage_2d_array<rg32sint, read>, coords: vec2<i32>, array_index: u32) -> vec4<i32>
+fn textureLoad_9cf7df() {
+  var arg_1 = vec2<i32>(1i);
+  var arg_2 = 1u;
+  var res: vec4<i32> = textureLoad(arg_0, arg_1, arg_2);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_9cf7df();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_9cf7df();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_9cf7df();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/9cf7df.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/9cf7df.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..1eb0b76
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/9cf7df.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_9cf7df() {
+  int2 arg_1 = (1).xx;
+  uint arg_2 = 1u;
+  int4 res = arg_0.Load(int4(int3(arg_1, int(arg_2)), 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_9cf7df();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_9cf7df();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_9cf7df();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/9cf7df.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/9cf7df.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..1eb0b76
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/9cf7df.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_9cf7df() {
+  int2 arg_1 = (1).xx;
+  uint arg_2 = 1u;
+  int4 res = arg_0.Load(int4(int3(arg_1, int(arg_2)), 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_9cf7df();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_9cf7df();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_9cf7df();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/9cf7df.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/9cf7df.wgsl.expected.glsl
new file mode 100644
index 0000000..3b0cd17
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/9cf7df.wgsl.expected.glsl
@@ -0,0 +1,96 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rg32i) uniform highp iimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_9cf7df() {
+  ivec2 arg_1 = ivec2(1);
+  uint arg_2 = 1u;
+  ivec4 res = texelFetch(arg_0, ivec3(arg_1, int(arg_2)));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_9cf7df();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rg32i) uniform highp iimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_9cf7df() {
+  ivec2 arg_1 = ivec2(1);
+  uint arg_2 = 1u;
+  ivec4 res = texelFetch(arg_0, ivec3(arg_1, int(arg_2)));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_9cf7df();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'image load-store format' : not supported with this profile: es
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rg32i) uniform highp iimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_9cf7df() {
+  ivec2 arg_1 = ivec2(1);
+  uint arg_2 = 1u;
+  ivec4 res = texelFetch(arg_0, ivec3(arg_1, int(arg_2)));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_9cf7df();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/9cf7df.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/9cf7df.wgsl.expected.msl
new file mode 100644
index 0000000..4fd55a4
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/9cf7df.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_9cf7df(texture2d_array<int, access::read> tint_symbol_1, device int4* const tint_symbol_2) {
+  int2 arg_1 = int2(1);
+  uint arg_2 = 1u;
+  int4 res = tint_symbol_1.read(uint2(arg_1), arg_2);
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<int, access::read> tint_symbol_3, device int4* const tint_symbol_4) {
+  textureLoad_9cf7df(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<int, access::read> tint_symbol_5 [[texture(0)]], device int4* tint_symbol_6 [[buffer(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<int, access::read> tint_symbol_7 [[texture(0)]], device int4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_9cf7df(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<int, access::read> tint_symbol_9 [[texture(0)]], device int4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_9cf7df(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/9cf7df.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/9cf7df.wgsl.expected.spvasm
new file mode 100644
index 0000000..b18a7a9
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/9cf7df.wgsl.expected.spvasm
@@ -0,0 +1,113 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 62
+; Schema: 0
+               OpCapability Shader
+               OpCapability StorageImageExtendedFormats
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_9cf7df "textureLoad_9cf7df"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 2D 0 1 0 2 Rg32i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+      %v4int = OpTypeVector %int 4
+%prevent_dce_block = OpTypeStruct %v4int
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+      %v2int = OpTypeVector %int 2
+      %int_1 = OpConstant %int 1
+         %23 = OpConstantComposite %v2int %int_1 %int_1
+%_ptr_Function_v2int = OpTypePointer Function %v2int
+         %26 = OpConstantNull %v2int
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %31 = OpConstantNull %uint
+      %v3int = OpTypeVector %int 3
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+         %43 = OpConstantNull %v4int
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4int = OpTypePointer StorageBuffer %v4int
+         %48 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_9cf7df = OpFunction %void None %17
+         %20 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v2int Function %26
+      %arg_2 = OpVariable %_ptr_Function_uint Function %31
+        %res = OpVariable %_ptr_Function_v4int Function %43
+               OpStore %arg_1 %23
+               OpStore %arg_2 %uint_1
+         %33 = OpLoad %11 %arg_0
+         %35 = OpLoad %v2int %arg_1
+         %36 = OpCompositeExtract %int %35 0
+         %37 = OpCompositeExtract %int %35 1
+         %39 = OpLoad %uint %arg_2
+         %38 = OpBitcast %int %39
+         %40 = OpCompositeConstruct %v3int %36 %37 %38
+         %32 = OpImageRead %v4int %33 %40
+               OpStore %res %32
+         %46 = OpAccessChain %_ptr_StorageBuffer_v4int %prevent_dce %uint_0
+         %47 = OpLoad %v4int %res
+               OpStore %46 %47
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %48
+         %50 = OpLabel
+         %51 = OpFunctionCall %void %textureLoad_9cf7df
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %53 = OpLabel
+         %54 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %54
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %57 = OpLabel
+         %58 = OpFunctionCall %void %textureLoad_9cf7df
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %60 = OpLabel
+         %61 = OpFunctionCall %void %textureLoad_9cf7df
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/9cf7df.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/9cf7df.wgsl.expected.wgsl
new file mode 100644
index 0000000..26cfc1e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/9cf7df.wgsl.expected.wgsl
@@ -0,0 +1,28 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rg32sint, read>;
+
+fn textureLoad_9cf7df() {
+  var arg_1 = vec2<i32>(1i);
+  var arg_2 = 1u;
+  var res : vec4<i32> = textureLoad(arg_0, arg_1, arg_2);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_9cf7df();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_9cf7df();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_9cf7df();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/9de6f5.wgsl b/test/tint/builtins/gen/var/textureLoad/9de6f5.wgsl
new file mode 100644
index 0000000..4d51600
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/9de6f5.wgsl
@@ -0,0 +1,50 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba8snorm, read>;
+
+// fn textureLoad(texture: texture_storage_2d_array<rgba8snorm, read>, coords: vec2<i32>, array_index: u32) -> vec4<f32>
+fn textureLoad_9de6f5() {
+  var arg_1 = vec2<i32>(1i);
+  var arg_2 = 1u;
+  var res: vec4<f32> = textureLoad(arg_0, arg_1, arg_2);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_9de6f5();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_9de6f5();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_9de6f5();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/9de6f5.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/9de6f5.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..3b7a8f9
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/9de6f5.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_9de6f5() {
+  int2 arg_1 = (1).xx;
+  uint arg_2 = 1u;
+  float4 res = arg_0.Load(int4(int3(arg_1, int(arg_2)), 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_9de6f5();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_9de6f5();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_9de6f5();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/9de6f5.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/9de6f5.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..3b7a8f9
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/9de6f5.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_9de6f5() {
+  int2 arg_1 = (1).xx;
+  uint arg_2 = 1u;
+  float4 res = arg_0.Load(int4(int3(arg_1, int(arg_2)), 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_9de6f5();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_9de6f5();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_9de6f5();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/9de6f5.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/9de6f5.wgsl.expected.glsl
new file mode 100644
index 0000000..5515262
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/9de6f5.wgsl.expected.glsl
@@ -0,0 +1,93 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba8_snorm) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_9de6f5() {
+  ivec2 arg_1 = ivec2(1);
+  uint arg_2 = 1u;
+  vec4 res = texelFetch(arg_0, ivec3(arg_1, int(arg_2)));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_9de6f5();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8_snorm' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba8_snorm) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_9de6f5() {
+  ivec2 arg_1 = ivec2(1);
+  uint arg_2 = 1u;
+  vec4 res = texelFetch(arg_0, ivec3(arg_1, int(arg_2)));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_9de6f5();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba8_snorm' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba8_snorm) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_9de6f5() {
+  ivec2 arg_1 = ivec2(1);
+  uint arg_2 = 1u;
+  vec4 res = texelFetch(arg_0, ivec3(arg_1, int(arg_2)));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_9de6f5();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8_snorm' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/9de6f5.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/9de6f5.wgsl.expected.msl
new file mode 100644
index 0000000..6a056ee
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/9de6f5.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_9de6f5(texture2d_array<float, access::read> tint_symbol_1, device float4* const tint_symbol_2) {
+  int2 arg_1 = int2(1);
+  uint arg_2 = 1u;
+  float4 res = tint_symbol_1.read(uint2(arg_1), arg_2);
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<float, access::read> tint_symbol_3, device float4* const tint_symbol_4) {
+  textureLoad_9de6f5(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<float, access::read> tint_symbol_5 [[texture(0)]], device float4* tint_symbol_6 [[buffer(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::read> tint_symbol_7 [[texture(0)]], device float4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_9de6f5(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<float, access::read> tint_symbol_9 [[texture(0)]], device float4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_9de6f5(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/9de6f5.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/9de6f5.wgsl.expected.spvasm
new file mode 100644
index 0000000..f72519b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/9de6f5.wgsl.expected.spvasm
@@ -0,0 +1,110 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 60
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_9de6f5 "textureLoad_9de6f5"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 1 0 2 Rgba8Snorm
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+%prevent_dce_block = OpTypeStruct %v4float
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %v2int = OpTypeVector %int 2
+      %int_1 = OpConstant %int 1
+         %22 = OpConstantComposite %v2int %int_1 %int_1
+%_ptr_Function_v2int = OpTypePointer Function %v2int
+         %25 = OpConstantNull %v2int
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %30 = OpConstantNull %uint
+      %v3int = OpTypeVector %int 3
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
+         %46 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_9de6f5 = OpFunction %void None %15
+         %18 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v2int Function %25
+      %arg_2 = OpVariable %_ptr_Function_uint Function %30
+        %res = OpVariable %_ptr_Function_v4float Function %5
+               OpStore %arg_1 %22
+               OpStore %arg_2 %uint_1
+         %32 = OpLoad %11 %arg_0
+         %34 = OpLoad %v2int %arg_1
+         %35 = OpCompositeExtract %int %34 0
+         %36 = OpCompositeExtract %int %34 1
+         %38 = OpLoad %uint %arg_2
+         %37 = OpBitcast %int %38
+         %39 = OpCompositeConstruct %v3int %35 %36 %37
+         %31 = OpImageRead %v4float %32 %39
+               OpStore %res %31
+         %44 = OpAccessChain %_ptr_StorageBuffer_v4float %prevent_dce %uint_0
+         %45 = OpLoad %v4float %res
+               OpStore %44 %45
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %46
+         %48 = OpLabel
+         %49 = OpFunctionCall %void %textureLoad_9de6f5
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %51 = OpLabel
+         %52 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %52
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %55 = OpLabel
+         %56 = OpFunctionCall %void %textureLoad_9de6f5
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %58 = OpLabel
+         %59 = OpFunctionCall %void %textureLoad_9de6f5
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/9de6f5.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/9de6f5.wgsl.expected.wgsl
new file mode 100644
index 0000000..bc74b68
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/9de6f5.wgsl.expected.wgsl
@@ -0,0 +1,28 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba8snorm, read>;
+
+fn textureLoad_9de6f5() {
+  var arg_1 = vec2<i32>(1i);
+  var arg_2 = 1u;
+  var res : vec4<f32> = textureLoad(arg_0, arg_1, arg_2);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_9de6f5();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_9de6f5();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_9de6f5();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/a03af1.wgsl b/test/tint/builtins/gen/var/textureLoad/a03af1.wgsl
new file mode 100644
index 0000000..73103c1
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/a03af1.wgsl
@@ -0,0 +1,50 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba8unorm, read>;
+
+// fn textureLoad(texture: texture_storage_2d_array<rgba8unorm, read>, coords: vec2<i32>, array_index: u32) -> vec4<f32>
+fn textureLoad_a03af1() {
+  var arg_1 = vec2<i32>(1i);
+  var arg_2 = 1u;
+  var res: vec4<f32> = textureLoad(arg_0, arg_1, arg_2);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_a03af1();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_a03af1();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_a03af1();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/a03af1.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/a03af1.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..5372bb9
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/a03af1.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_a03af1() {
+  int2 arg_1 = (1).xx;
+  uint arg_2 = 1u;
+  float4 res = arg_0.Load(int4(int3(arg_1, int(arg_2)), 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_a03af1();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_a03af1();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_a03af1();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/a03af1.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/a03af1.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..5372bb9
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/a03af1.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_a03af1() {
+  int2 arg_1 = (1).xx;
+  uint arg_2 = 1u;
+  float4 res = arg_0.Load(int4(int3(arg_1, int(arg_2)), 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_a03af1();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_a03af1();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_a03af1();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/a03af1.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/a03af1.wgsl.expected.glsl
new file mode 100644
index 0000000..78a17b1
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/a03af1.wgsl.expected.glsl
@@ -0,0 +1,93 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba8) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_a03af1() {
+  ivec2 arg_1 = ivec2(1);
+  uint arg_2 = 1u;
+  vec4 res = texelFetch(arg_0, ivec3(arg_1, int(arg_2)));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_a03af1();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba8) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_a03af1() {
+  ivec2 arg_1 = ivec2(1);
+  uint arg_2 = 1u;
+  vec4 res = texelFetch(arg_0, ivec3(arg_1, int(arg_2)));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_a03af1();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba8' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba8) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_a03af1() {
+  ivec2 arg_1 = ivec2(1);
+  uint arg_2 = 1u;
+  vec4 res = texelFetch(arg_0, ivec3(arg_1, int(arg_2)));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_a03af1();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/a03af1.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/a03af1.wgsl.expected.msl
new file mode 100644
index 0000000..71bb11b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/a03af1.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_a03af1(texture2d_array<float, access::read> tint_symbol_1, device float4* const tint_symbol_2) {
+  int2 arg_1 = int2(1);
+  uint arg_2 = 1u;
+  float4 res = tint_symbol_1.read(uint2(arg_1), arg_2);
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<float, access::read> tint_symbol_3, device float4* const tint_symbol_4) {
+  textureLoad_a03af1(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<float, access::read> tint_symbol_5 [[texture(0)]], device float4* tint_symbol_6 [[buffer(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::read> tint_symbol_7 [[texture(0)]], device float4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_a03af1(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<float, access::read> tint_symbol_9 [[texture(0)]], device float4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_a03af1(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/a03af1.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/a03af1.wgsl.expected.spvasm
new file mode 100644
index 0000000..83160dc
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/a03af1.wgsl.expected.spvasm
@@ -0,0 +1,110 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 60
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_a03af1 "textureLoad_a03af1"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 1 0 2 Rgba8
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+%prevent_dce_block = OpTypeStruct %v4float
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %v2int = OpTypeVector %int 2
+      %int_1 = OpConstant %int 1
+         %22 = OpConstantComposite %v2int %int_1 %int_1
+%_ptr_Function_v2int = OpTypePointer Function %v2int
+         %25 = OpConstantNull %v2int
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %30 = OpConstantNull %uint
+      %v3int = OpTypeVector %int 3
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
+         %46 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_a03af1 = OpFunction %void None %15
+         %18 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v2int Function %25
+      %arg_2 = OpVariable %_ptr_Function_uint Function %30
+        %res = OpVariable %_ptr_Function_v4float Function %5
+               OpStore %arg_1 %22
+               OpStore %arg_2 %uint_1
+         %32 = OpLoad %11 %arg_0
+         %34 = OpLoad %v2int %arg_1
+         %35 = OpCompositeExtract %int %34 0
+         %36 = OpCompositeExtract %int %34 1
+         %38 = OpLoad %uint %arg_2
+         %37 = OpBitcast %int %38
+         %39 = OpCompositeConstruct %v3int %35 %36 %37
+         %31 = OpImageRead %v4float %32 %39
+               OpStore %res %31
+         %44 = OpAccessChain %_ptr_StorageBuffer_v4float %prevent_dce %uint_0
+         %45 = OpLoad %v4float %res
+               OpStore %44 %45
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %46
+         %48 = OpLabel
+         %49 = OpFunctionCall %void %textureLoad_a03af1
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %51 = OpLabel
+         %52 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %52
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %55 = OpLabel
+         %56 = OpFunctionCall %void %textureLoad_a03af1
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %58 = OpLabel
+         %59 = OpFunctionCall %void %textureLoad_a03af1
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/a03af1.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/a03af1.wgsl.expected.wgsl
new file mode 100644
index 0000000..875c6f9
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/a03af1.wgsl.expected.wgsl
@@ -0,0 +1,28 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba8unorm, read>;
+
+fn textureLoad_a03af1() {
+  var arg_1 = vec2<i32>(1i);
+  var arg_2 = 1u;
+  var res : vec4<f32> = textureLoad(arg_0, arg_1, arg_2);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_a03af1();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_a03af1();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_a03af1();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/a6a85a.wgsl b/test/tint/builtins/gen/var/textureLoad/a6a85a.wgsl
new file mode 100644
index 0000000..a3ceb3a
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/a6a85a.wgsl
@@ -0,0 +1,49 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_3d<rgba8unorm, read>;
+
+// fn textureLoad(texture: texture_storage_3d<rgba8unorm, read>, coords: vec3<i32>) -> vec4<f32>
+fn textureLoad_a6a85a() {
+  var arg_1 = vec3<i32>(1i);
+  var res: vec4<f32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_a6a85a();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_a6a85a();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_a6a85a();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/a6a85a.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/a6a85a.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..e1e03fc
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/a6a85a.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture3D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_a6a85a() {
+  int3 arg_1 = (1).xxx;
+  float4 res = arg_0.Load(int4(arg_1, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_a6a85a();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_a6a85a();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_a6a85a();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/a6a85a.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/a6a85a.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..e1e03fc
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/a6a85a.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture3D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_a6a85a() {
+  int3 arg_1 = (1).xxx;
+  float4 res = arg_0.Load(int4(arg_1, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_a6a85a();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_a6a85a();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_a6a85a();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/a6a85a.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/a6a85a.wgsl.expected.glsl
new file mode 100644
index 0000000..580297d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/a6a85a.wgsl.expected.glsl
@@ -0,0 +1,90 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba8) uniform highp image3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_a6a85a() {
+  ivec3 arg_1 = ivec3(1);
+  vec4 res = texelFetch(arg_0, arg_1);
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_a6a85a();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba8) uniform highp image3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_a6a85a() {
+  ivec3 arg_1 = ivec3(1);
+  vec4 res = texelFetch(arg_0, arg_1);
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_a6a85a();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba8' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba8) uniform highp image3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_a6a85a() {
+  ivec3 arg_1 = ivec3(1);
+  vec4 res = texelFetch(arg_0, arg_1);
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_a6a85a();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/a6a85a.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/a6a85a.wgsl.expected.msl
new file mode 100644
index 0000000..0fb0ebc
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/a6a85a.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_a6a85a(texture3d<float, access::read> tint_symbol_1, device float4* const tint_symbol_2) {
+  int3 arg_1 = int3(1);
+  float4 res = tint_symbol_1.read(uint3(arg_1));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<float, access::read> tint_symbol_3, device float4* const tint_symbol_4) {
+  textureLoad_a6a85a(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<float, access::read> tint_symbol_5 [[texture(0)]], device float4* tint_symbol_6 [[buffer(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::read> tint_symbol_7 [[texture(0)]], device float4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_a6a85a(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture3d<float, access::read> tint_symbol_9 [[texture(0)]], device float4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_a6a85a(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/a6a85a.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/a6a85a.wgsl.expected.spvasm
new file mode 100644
index 0000000..bf08ac6
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/a6a85a.wgsl.expected.spvasm
@@ -0,0 +1,98 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 50
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_a6a85a "textureLoad_a6a85a"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 3D 0 0 0 2 Rgba8
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+%prevent_dce_block = OpTypeStruct %v4float
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %v3int = OpTypeVector %int 3
+      %int_1 = OpConstant %int 1
+         %22 = OpConstantComposite %v3int %int_1 %int_1 %int_1
+%_ptr_Function_v3int = OpTypePointer Function %v3int
+         %25 = OpConstantNull %v3int
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+       %uint = OpTypeInt 32 0
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
+         %36 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_a6a85a = OpFunction %void None %15
+         %18 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v3int Function %25
+        %res = OpVariable %_ptr_Function_v4float Function %5
+               OpStore %arg_1 %22
+         %27 = OpLoad %11 %arg_0
+         %28 = OpLoad %v3int %arg_1
+         %26 = OpImageRead %v4float %27 %28
+               OpStore %res %26
+         %34 = OpAccessChain %_ptr_StorageBuffer_v4float %prevent_dce %uint_0
+         %35 = OpLoad %v4float %res
+               OpStore %34 %35
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %36
+         %38 = OpLabel
+         %39 = OpFunctionCall %void %textureLoad_a6a85a
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %41 = OpLabel
+         %42 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %42
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %45 = OpLabel
+         %46 = OpFunctionCall %void %textureLoad_a6a85a
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %48 = OpLabel
+         %49 = OpFunctionCall %void %textureLoad_a6a85a
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/a6a85a.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/a6a85a.wgsl.expected.wgsl
new file mode 100644
index 0000000..8a5e897
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/a6a85a.wgsl.expected.wgsl
@@ -0,0 +1,27 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_3d<rgba8unorm, read>;
+
+fn textureLoad_a6a85a() {
+  var arg_1 = vec3<i32>(1i);
+  var res : vec4<f32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_a6a85a();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_a6a85a();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_a6a85a();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/a6b61d.wgsl b/test/tint/builtins/gen/var/textureLoad/a6b61d.wgsl
new file mode 100644
index 0000000..3b1abfc
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/a6b61d.wgsl
@@ -0,0 +1,50 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba32sint, read>;
+
+// fn textureLoad(texture: texture_storage_2d_array<rgba32sint, read>, coords: vec2<i32>, array_index: i32) -> vec4<i32>
+fn textureLoad_a6b61d() {
+  var arg_1 = vec2<i32>(1i);
+  var arg_2 = 1i;
+  var res: vec4<i32> = textureLoad(arg_0, arg_1, arg_2);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_a6b61d();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_a6b61d();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_a6b61d();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/a6b61d.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/a6b61d.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..2f37cc1
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/a6b61d.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_a6b61d() {
+  int2 arg_1 = (1).xx;
+  int arg_2 = 1;
+  int4 res = arg_0.Load(int4(int3(arg_1, arg_2), 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_a6b61d();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_a6b61d();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_a6b61d();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/a6b61d.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/a6b61d.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..2f37cc1
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/a6b61d.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_a6b61d() {
+  int2 arg_1 = (1).xx;
+  int arg_2 = 1;
+  int4 res = arg_0.Load(int4(int3(arg_1, arg_2), 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_a6b61d();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_a6b61d();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_a6b61d();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/a6b61d.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/a6b61d.wgsl.expected.glsl
new file mode 100644
index 0000000..4314800
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/a6b61d.wgsl.expected.glsl
@@ -0,0 +1,93 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba32i) uniform highp iimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_a6b61d() {
+  ivec2 arg_1 = ivec2(1);
+  int arg_2 = 1;
+  ivec4 res = texelFetch(arg_0, ivec3(arg_1, arg_2));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_a6b61d();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba32i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba32i) uniform highp iimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_a6b61d() {
+  ivec2 arg_1 = ivec2(1);
+  int arg_2 = 1;
+  ivec4 res = texelFetch(arg_0, ivec3(arg_1, arg_2));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_a6b61d();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba32i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba32i) uniform highp iimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_a6b61d() {
+  ivec2 arg_1 = ivec2(1);
+  int arg_2 = 1;
+  ivec4 res = texelFetch(arg_0, ivec3(arg_1, arg_2));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_a6b61d();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba32i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/a6b61d.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/a6b61d.wgsl.expected.msl
new file mode 100644
index 0000000..ab9d2f0
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/a6b61d.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_a6b61d(texture2d_array<int, access::read> tint_symbol_1, device int4* const tint_symbol_2) {
+  int2 arg_1 = int2(1);
+  int arg_2 = 1;
+  int4 res = tint_symbol_1.read(uint2(arg_1), arg_2);
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<int, access::read> tint_symbol_3, device int4* const tint_symbol_4) {
+  textureLoad_a6b61d(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<int, access::read> tint_symbol_5 [[texture(0)]], device int4* tint_symbol_6 [[buffer(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<int, access::read> tint_symbol_7 [[texture(0)]], device int4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_a6b61d(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<int, access::read> tint_symbol_9 [[texture(0)]], device int4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_a6b61d(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/a6b61d.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/a6b61d.wgsl.expected.spvasm
new file mode 100644
index 0000000..753e8f6
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/a6b61d.wgsl.expected.spvasm
@@ -0,0 +1,110 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 60
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_a6b61d "textureLoad_a6b61d"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 2D 0 1 0 2 Rgba32i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+      %v4int = OpTypeVector %int 4
+%prevent_dce_block = OpTypeStruct %v4int
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+      %v2int = OpTypeVector %int 2
+      %int_1 = OpConstant %int 1
+         %23 = OpConstantComposite %v2int %int_1 %int_1
+%_ptr_Function_v2int = OpTypePointer Function %v2int
+         %26 = OpConstantNull %v2int
+%_ptr_Function_int = OpTypePointer Function %int
+         %29 = OpConstantNull %int
+      %v3int = OpTypeVector %int 3
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+         %40 = OpConstantNull %v4int
+       %uint = OpTypeInt 32 0
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4int = OpTypePointer StorageBuffer %v4int
+         %46 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_a6b61d = OpFunction %void None %17
+         %20 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v2int Function %26
+      %arg_2 = OpVariable %_ptr_Function_int Function %29
+        %res = OpVariable %_ptr_Function_v4int Function %40
+               OpStore %arg_1 %23
+               OpStore %arg_2 %int_1
+         %31 = OpLoad %11 %arg_0
+         %33 = OpLoad %v2int %arg_1
+         %34 = OpCompositeExtract %int %33 0
+         %35 = OpCompositeExtract %int %33 1
+         %36 = OpLoad %int %arg_2
+         %37 = OpCompositeConstruct %v3int %34 %35 %36
+         %30 = OpImageRead %v4int %31 %37
+               OpStore %res %30
+         %44 = OpAccessChain %_ptr_StorageBuffer_v4int %prevent_dce %uint_0
+         %45 = OpLoad %v4int %res
+               OpStore %44 %45
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %46
+         %48 = OpLabel
+         %49 = OpFunctionCall %void %textureLoad_a6b61d
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %51 = OpLabel
+         %52 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %52
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %55 = OpLabel
+         %56 = OpFunctionCall %void %textureLoad_a6b61d
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %58 = OpLabel
+         %59 = OpFunctionCall %void %textureLoad_a6b61d
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/a6b61d.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/a6b61d.wgsl.expected.wgsl
new file mode 100644
index 0000000..5aa5b29
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/a6b61d.wgsl.expected.wgsl
@@ -0,0 +1,28 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba32sint, read>;
+
+fn textureLoad_a6b61d() {
+  var arg_1 = vec2<i32>(1i);
+  var arg_2 = 1i;
+  var res : vec4<i32> = textureLoad(arg_0, arg_1, arg_2);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_a6b61d();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_a6b61d();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_a6b61d();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/a7444c.wgsl b/test/tint/builtins/gen/var/textureLoad/a7444c.wgsl
new file mode 100644
index 0000000..45978a3
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/a7444c.wgsl
@@ -0,0 +1,50 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba8uint, read>;
+
+// fn textureLoad(texture: texture_storage_2d_array<rgba8uint, read>, coords: vec2<u32>, array_index: u32) -> vec4<u32>
+fn textureLoad_a7444c() {
+  var arg_1 = vec2<u32>(1u);
+  var arg_2 = 1u;
+  var res: vec4<u32> = textureLoad(arg_0, arg_1, arg_2);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_a7444c();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_a7444c();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_a7444c();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/a7444c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/a7444c.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..5d7e32c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/a7444c.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_a7444c() {
+  uint2 arg_1 = (1u).xx;
+  uint arg_2 = 1u;
+  uint4 res = arg_0.Load(uint4(uint3(arg_1, arg_2), uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_a7444c();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_a7444c();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_a7444c();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/a7444c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/a7444c.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..5d7e32c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/a7444c.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_a7444c() {
+  uint2 arg_1 = (1u).xx;
+  uint arg_2 = 1u;
+  uint4 res = arg_0.Load(uint4(uint3(arg_1, arg_2), uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_a7444c();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_a7444c();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_a7444c();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/a7444c.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/a7444c.wgsl.expected.glsl
new file mode 100644
index 0000000..9739e69
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/a7444c.wgsl.expected.glsl
@@ -0,0 +1,93 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba8ui) uniform highp uimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_a7444c() {
+  uvec2 arg_1 = uvec2(1u);
+  uint arg_2 = 1u;
+  uvec4 res = texelFetch(arg_0, ivec3(uvec3(arg_1, arg_2)));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_a7444c();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba8ui) uniform highp uimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_a7444c() {
+  uvec2 arg_1 = uvec2(1u);
+  uint arg_2 = 1u;
+  uvec4 res = texelFetch(arg_0, ivec3(uvec3(arg_1, arg_2)));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_a7444c();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba8ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba8ui) uniform highp uimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_a7444c() {
+  uvec2 arg_1 = uvec2(1u);
+  uint arg_2 = 1u;
+  uvec4 res = texelFetch(arg_0, ivec3(uvec3(arg_1, arg_2)));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_a7444c();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/a7444c.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/a7444c.wgsl.expected.msl
new file mode 100644
index 0000000..f17074b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/a7444c.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_a7444c(texture2d_array<uint, access::read> tint_symbol_1, device uint4* const tint_symbol_2) {
+  uint2 arg_1 = uint2(1u);
+  uint arg_2 = 1u;
+  uint4 res = tint_symbol_1.read(uint2(arg_1), arg_2);
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<uint, access::read> tint_symbol_3, device uint4* const tint_symbol_4) {
+  textureLoad_a7444c(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<uint, access::read> tint_symbol_5 [[texture(0)]], device uint4* tint_symbol_6 [[buffer(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<uint, access::read> tint_symbol_7 [[texture(0)]], device uint4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_a7444c(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<uint, access::read> tint_symbol_9 [[texture(0)]], device uint4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_a7444c(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/a7444c.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/a7444c.wgsl.expected.spvasm
new file mode 100644
index 0000000..b4dbba2
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/a7444c.wgsl.expected.spvasm
@@ -0,0 +1,109 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 59
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_a7444c "textureLoad_a7444c"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 2D 0 1 0 2 Rgba8ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+     %v4uint = OpTypeVector %uint 4
+%prevent_dce_block = OpTypeStruct %v4uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+     %v2uint = OpTypeVector %uint 2
+     %uint_1 = OpConstant %uint 1
+         %23 = OpConstantComposite %v2uint %uint_1 %uint_1
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %26 = OpConstantNull %v2uint
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %29 = OpConstantNull %uint
+     %v3uint = OpTypeVector %uint 3
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+         %40 = OpConstantNull %v4uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4uint = OpTypePointer StorageBuffer %v4uint
+         %45 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_a7444c = OpFunction %void None %17
+         %20 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v2uint Function %26
+      %arg_2 = OpVariable %_ptr_Function_uint Function %29
+        %res = OpVariable %_ptr_Function_v4uint Function %40
+               OpStore %arg_1 %23
+               OpStore %arg_2 %uint_1
+         %31 = OpLoad %11 %arg_0
+         %33 = OpLoad %v2uint %arg_1
+         %34 = OpCompositeExtract %uint %33 0
+         %35 = OpCompositeExtract %uint %33 1
+         %36 = OpLoad %uint %arg_2
+         %37 = OpCompositeConstruct %v3uint %34 %35 %36
+         %30 = OpImageRead %v4uint %31 %37
+               OpStore %res %30
+         %43 = OpAccessChain %_ptr_StorageBuffer_v4uint %prevent_dce %uint_0
+         %44 = OpLoad %v4uint %res
+               OpStore %43 %44
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %45
+         %47 = OpLabel
+         %48 = OpFunctionCall %void %textureLoad_a7444c
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %50 = OpLabel
+         %51 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %51
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %54 = OpLabel
+         %55 = OpFunctionCall %void %textureLoad_a7444c
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %57 = OpLabel
+         %58 = OpFunctionCall %void %textureLoad_a7444c
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/a7444c.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/a7444c.wgsl.expected.wgsl
new file mode 100644
index 0000000..fab6c59
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/a7444c.wgsl.expected.wgsl
@@ -0,0 +1,28 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba8uint, read>;
+
+fn textureLoad_a7444c() {
+  var arg_1 = vec2<u32>(1u);
+  var arg_2 = 1u;
+  var res : vec4<u32> = textureLoad(arg_0, arg_1, arg_2);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_a7444c();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_a7444c();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_a7444c();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/a7a3c3.wgsl b/test/tint/builtins/gen/var/textureLoad/a7a3c3.wgsl
new file mode 100644
index 0000000..a44129c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/a7a3c3.wgsl
@@ -0,0 +1,49 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_3d<rgba16sint, read>;
+
+// fn textureLoad(texture: texture_storage_3d<rgba16sint, read>, coords: vec3<i32>) -> vec4<i32>
+fn textureLoad_a7a3c3() {
+  var arg_1 = vec3<i32>(1i);
+  var res: vec4<i32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_a7a3c3();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_a7a3c3();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_a7a3c3();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/a7a3c3.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/a7a3c3.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..7a9ae4f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/a7a3c3.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture3D<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_a7a3c3() {
+  int3 arg_1 = (1).xxx;
+  int4 res = arg_0.Load(int4(arg_1, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_a7a3c3();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_a7a3c3();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_a7a3c3();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/a7a3c3.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/a7a3c3.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..7a9ae4f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/a7a3c3.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture3D<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_a7a3c3() {
+  int3 arg_1 = (1).xxx;
+  int4 res = arg_0.Load(int4(arg_1, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_a7a3c3();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_a7a3c3();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_a7a3c3();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/a7a3c3.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/a7a3c3.wgsl.expected.glsl
new file mode 100644
index 0000000..060f5a8
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/a7a3c3.wgsl.expected.glsl
@@ -0,0 +1,90 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba16i) uniform highp iimage3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_a7a3c3() {
+  ivec3 arg_1 = ivec3(1);
+  ivec4 res = texelFetch(arg_0, arg_1);
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_a7a3c3();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba16i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba16i) uniform highp iimage3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_a7a3c3() {
+  ivec3 arg_1 = ivec3(1);
+  ivec4 res = texelFetch(arg_0, arg_1);
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_a7a3c3();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba16i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba16i) uniform highp iimage3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_a7a3c3() {
+  ivec3 arg_1 = ivec3(1);
+  ivec4 res = texelFetch(arg_0, arg_1);
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_a7a3c3();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba16i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/a7a3c3.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/a7a3c3.wgsl.expected.msl
new file mode 100644
index 0000000..c1fcab0
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/a7a3c3.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_a7a3c3(texture3d<int, access::read> tint_symbol_1, device int4* const tint_symbol_2) {
+  int3 arg_1 = int3(1);
+  int4 res = tint_symbol_1.read(uint3(arg_1));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<int, access::read> tint_symbol_3, device int4* const tint_symbol_4) {
+  textureLoad_a7a3c3(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<int, access::read> tint_symbol_5 [[texture(0)]], device int4* tint_symbol_6 [[buffer(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<int, access::read> tint_symbol_7 [[texture(0)]], device int4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_a7a3c3(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture3d<int, access::read> tint_symbol_9 [[texture(0)]], device int4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_a7a3c3(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/a7a3c3.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/a7a3c3.wgsl.expected.spvasm
new file mode 100644
index 0000000..2080843
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/a7a3c3.wgsl.expected.spvasm
@@ -0,0 +1,100 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 52
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_a7a3c3 "textureLoad_a7a3c3"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 3D 0 0 0 2 Rgba16i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+      %v4int = OpTypeVector %int 4
+%prevent_dce_block = OpTypeStruct %v4int
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+      %v3int = OpTypeVector %int 3
+      %int_1 = OpConstant %int 1
+         %23 = OpConstantComposite %v3int %int_1 %int_1 %int_1
+%_ptr_Function_v3int = OpTypePointer Function %v3int
+         %26 = OpConstantNull %v3int
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+         %32 = OpConstantNull %v4int
+       %uint = OpTypeInt 32 0
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4int = OpTypePointer StorageBuffer %v4int
+         %38 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_a7a3c3 = OpFunction %void None %17
+         %20 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v3int Function %26
+        %res = OpVariable %_ptr_Function_v4int Function %32
+               OpStore %arg_1 %23
+         %28 = OpLoad %11 %arg_0
+         %29 = OpLoad %v3int %arg_1
+         %27 = OpImageRead %v4int %28 %29
+               OpStore %res %27
+         %36 = OpAccessChain %_ptr_StorageBuffer_v4int %prevent_dce %uint_0
+         %37 = OpLoad %v4int %res
+               OpStore %36 %37
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %38
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %textureLoad_a7a3c3
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %43 = OpLabel
+         %44 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %44
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %47 = OpLabel
+         %48 = OpFunctionCall %void %textureLoad_a7a3c3
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %50 = OpLabel
+         %51 = OpFunctionCall %void %textureLoad_a7a3c3
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/a7a3c3.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/a7a3c3.wgsl.expected.wgsl
new file mode 100644
index 0000000..8fb518d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/a7a3c3.wgsl.expected.wgsl
@@ -0,0 +1,27 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_3d<rgba16sint, read>;
+
+fn textureLoad_a7a3c3() {
+  var arg_1 = vec3<i32>(1i);
+  var res : vec4<i32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_a7a3c3();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_a7a3c3();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_a7a3c3();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/a8549b.wgsl b/test/tint/builtins/gen/var/textureLoad/a8549b.wgsl
new file mode 100644
index 0000000..d8eedd9
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/a8549b.wgsl
@@ -0,0 +1,49 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_3d<rgba32float, read>;
+
+// fn textureLoad(texture: texture_storage_3d<rgba32float, read>, coords: vec3<u32>) -> vec4<f32>
+fn textureLoad_a8549b() {
+  var arg_1 = vec3<u32>(1u);
+  var res: vec4<f32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_a8549b();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_a8549b();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_a8549b();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/a8549b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/a8549b.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..02d5ceb
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/a8549b.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture3D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_a8549b() {
+  uint3 arg_1 = (1u).xxx;
+  float4 res = arg_0.Load(uint4(arg_1, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_a8549b();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_a8549b();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_a8549b();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/a8549b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/a8549b.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..02d5ceb
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/a8549b.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture3D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_a8549b() {
+  uint3 arg_1 = (1u).xxx;
+  float4 res = arg_0.Load(uint4(arg_1, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_a8549b();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_a8549b();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_a8549b();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/a8549b.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/a8549b.wgsl.expected.glsl
new file mode 100644
index 0000000..cfbaf1b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/a8549b.wgsl.expected.glsl
@@ -0,0 +1,90 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba32f) uniform highp image3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_a8549b() {
+  uvec3 arg_1 = uvec3(1u);
+  vec4 res = texelFetch(arg_0, ivec3(arg_1));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_a8549b();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba32f' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba32f) uniform highp image3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_a8549b() {
+  uvec3 arg_1 = uvec3(1u);
+  vec4 res = texelFetch(arg_0, ivec3(arg_1));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_a8549b();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba32f' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba32f) uniform highp image3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_a8549b() {
+  uvec3 arg_1 = uvec3(1u);
+  vec4 res = texelFetch(arg_0, ivec3(arg_1));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_a8549b();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba32f' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/a8549b.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/a8549b.wgsl.expected.msl
new file mode 100644
index 0000000..3ee40df
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/a8549b.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_a8549b(texture3d<float, access::read> tint_symbol_1, device float4* const tint_symbol_2) {
+  uint3 arg_1 = uint3(1u);
+  float4 res = tint_symbol_1.read(uint3(arg_1));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<float, access::read> tint_symbol_3, device float4* const tint_symbol_4) {
+  textureLoad_a8549b(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<float, access::read> tint_symbol_5 [[texture(0)]], device float4* tint_symbol_6 [[buffer(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::read> tint_symbol_7 [[texture(0)]], device float4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_a8549b(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture3d<float, access::read> tint_symbol_9 [[texture(0)]], device float4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_a8549b(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/a8549b.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/a8549b.wgsl.expected.spvasm
new file mode 100644
index 0000000..92a0eeb
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/a8549b.wgsl.expected.spvasm
@@ -0,0 +1,97 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 49
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_a8549b "textureLoad_a8549b"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 3D 0 0 0 2 Rgba32f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+%prevent_dce_block = OpTypeStruct %v4float
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v3uint = OpTypeVector %uint 3
+     %uint_1 = OpConstant %uint 1
+         %22 = OpConstantComposite %v3uint %uint_1 %uint_1 %uint_1
+%_ptr_Function_v3uint = OpTypePointer Function %v3uint
+         %25 = OpConstantNull %v3uint
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
+         %35 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_a8549b = OpFunction %void None %15
+         %18 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v3uint Function %25
+        %res = OpVariable %_ptr_Function_v4float Function %5
+               OpStore %arg_1 %22
+         %27 = OpLoad %11 %arg_0
+         %28 = OpLoad %v3uint %arg_1
+         %26 = OpImageRead %v4float %27 %28
+               OpStore %res %26
+         %33 = OpAccessChain %_ptr_StorageBuffer_v4float %prevent_dce %uint_0
+         %34 = OpLoad %v4float %res
+               OpStore %33 %34
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %35
+         %37 = OpLabel
+         %38 = OpFunctionCall %void %textureLoad_a8549b
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %40 = OpLabel
+         %41 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %41
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %44 = OpLabel
+         %45 = OpFunctionCall %void %textureLoad_a8549b
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %47 = OpLabel
+         %48 = OpFunctionCall %void %textureLoad_a8549b
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/a8549b.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/a8549b.wgsl.expected.wgsl
new file mode 100644
index 0000000..61e2d48
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/a8549b.wgsl.expected.wgsl
@@ -0,0 +1,27 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_3d<rgba32float, read>;
+
+fn textureLoad_a8549b() {
+  var arg_1 = vec3<u32>(1u);
+  var res : vec4<f32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_a8549b();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_a8549b();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_a8549b();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/aa8a0d.wgsl b/test/tint/builtins/gen/var/textureLoad/aa8a0d.wgsl
new file mode 100644
index 0000000..419aec2
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/aa8a0d.wgsl
@@ -0,0 +1,49 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d<rgba16uint, read>;
+
+// fn textureLoad(texture: texture_storage_2d<rgba16uint, read>, coords: vec2<u32>) -> vec4<u32>
+fn textureLoad_aa8a0d() {
+  var arg_1 = vec2<u32>(1u);
+  var res: vec4<u32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_aa8a0d();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_aa8a0d();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_aa8a0d();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/aa8a0d.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/aa8a0d.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..82be8ed
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/aa8a0d.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture2D<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_aa8a0d() {
+  uint2 arg_1 = (1u).xx;
+  uint4 res = arg_0.Load(uint3(arg_1, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_aa8a0d();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_aa8a0d();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_aa8a0d();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/aa8a0d.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/aa8a0d.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..82be8ed
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/aa8a0d.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture2D<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_aa8a0d() {
+  uint2 arg_1 = (1u).xx;
+  uint4 res = arg_0.Load(uint3(arg_1, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_aa8a0d();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_aa8a0d();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_aa8a0d();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/aa8a0d.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/aa8a0d.wgsl.expected.glsl
new file mode 100644
index 0000000..282c08d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/aa8a0d.wgsl.expected.glsl
@@ -0,0 +1,90 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba16ui) uniform highp uimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_aa8a0d() {
+  uvec2 arg_1 = uvec2(1u);
+  uvec4 res = texelFetch(arg_0, ivec2(arg_1));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_aa8a0d();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba16ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba16ui) uniform highp uimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_aa8a0d() {
+  uvec2 arg_1 = uvec2(1u);
+  uvec4 res = texelFetch(arg_0, ivec2(arg_1));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_aa8a0d();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba16ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba16ui) uniform highp uimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_aa8a0d() {
+  uvec2 arg_1 = uvec2(1u);
+  uvec4 res = texelFetch(arg_0, ivec2(arg_1));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_aa8a0d();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba16ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/aa8a0d.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/aa8a0d.wgsl.expected.msl
new file mode 100644
index 0000000..f4e9ae2
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/aa8a0d.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_aa8a0d(texture2d<uint, access::read> tint_symbol_1, device uint4* const tint_symbol_2) {
+  uint2 arg_1 = uint2(1u);
+  uint4 res = tint_symbol_1.read(uint2(arg_1));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<uint, access::read> tint_symbol_3, device uint4* const tint_symbol_4) {
+  textureLoad_aa8a0d(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<uint, access::read> tint_symbol_5 [[texture(0)]], device uint4* tint_symbol_6 [[buffer(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<uint, access::read> tint_symbol_7 [[texture(0)]], device uint4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_aa8a0d(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d<uint, access::read> tint_symbol_9 [[texture(0)]], device uint4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_aa8a0d(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/aa8a0d.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/aa8a0d.wgsl.expected.spvasm
new file mode 100644
index 0000000..d08e627
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/aa8a0d.wgsl.expected.spvasm
@@ -0,0 +1,99 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 51
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_aa8a0d "textureLoad_aa8a0d"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 2D 0 0 0 2 Rgba16ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+     %v4uint = OpTypeVector %uint 4
+%prevent_dce_block = OpTypeStruct %v4uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+     %v2uint = OpTypeVector %uint 2
+     %uint_1 = OpConstant %uint 1
+         %23 = OpConstantComposite %v2uint %uint_1 %uint_1
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %26 = OpConstantNull %v2uint
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+         %32 = OpConstantNull %v4uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4uint = OpTypePointer StorageBuffer %v4uint
+         %37 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_aa8a0d = OpFunction %void None %17
+         %20 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v2uint Function %26
+        %res = OpVariable %_ptr_Function_v4uint Function %32
+               OpStore %arg_1 %23
+         %28 = OpLoad %11 %arg_0
+         %29 = OpLoad %v2uint %arg_1
+         %27 = OpImageRead %v4uint %28 %29
+               OpStore %res %27
+         %35 = OpAccessChain %_ptr_StorageBuffer_v4uint %prevent_dce %uint_0
+         %36 = OpLoad %v4uint %res
+               OpStore %35 %36
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %37
+         %39 = OpLabel
+         %40 = OpFunctionCall %void %textureLoad_aa8a0d
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %42 = OpLabel
+         %43 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %43
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %46 = OpLabel
+         %47 = OpFunctionCall %void %textureLoad_aa8a0d
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %49 = OpLabel
+         %50 = OpFunctionCall %void %textureLoad_aa8a0d
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/aa8a0d.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/aa8a0d.wgsl.expected.wgsl
new file mode 100644
index 0000000..b4d6491
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/aa8a0d.wgsl.expected.wgsl
@@ -0,0 +1,27 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d<rgba16uint, read>;
+
+fn textureLoad_aa8a0d() {
+  var arg_1 = vec2<u32>(1u);
+  var res : vec4<u32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_aa8a0d();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_aa8a0d();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_aa8a0d();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/aae7f6.wgsl b/test/tint/builtins/gen/var/textureLoad/aae7f6.wgsl
new file mode 100644
index 0000000..b4d3649
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/aae7f6.wgsl
@@ -0,0 +1,50 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<r32sint, read>;
+
+// fn textureLoad(texture: texture_storage_2d_array<r32sint, read>, coords: vec2<i32>, array_index: u32) -> vec4<i32>
+fn textureLoad_aae7f6() {
+  var arg_1 = vec2<i32>(1i);
+  var arg_2 = 1u;
+  var res: vec4<i32> = textureLoad(arg_0, arg_1, arg_2);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_aae7f6();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_aae7f6();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_aae7f6();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/aae7f6.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/aae7f6.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..ec907a9
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/aae7f6.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_aae7f6() {
+  int2 arg_1 = (1).xx;
+  uint arg_2 = 1u;
+  int4 res = arg_0.Load(int4(int3(arg_1, int(arg_2)), 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_aae7f6();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_aae7f6();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_aae7f6();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/aae7f6.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/aae7f6.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..ec907a9
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/aae7f6.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_aae7f6() {
+  int2 arg_1 = (1).xx;
+  uint arg_2 = 1u;
+  int4 res = arg_0.Load(int4(int3(arg_1, int(arg_2)), 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_aae7f6();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_aae7f6();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_aae7f6();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/aae7f6.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/aae7f6.wgsl.expected.glsl
new file mode 100644
index 0000000..56e2b13
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/aae7f6.wgsl.expected.glsl
@@ -0,0 +1,99 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(r32i) uniform highp iimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_aae7f6() {
+  ivec2 arg_1 = ivec2(1);
+  uint arg_2 = 1u;
+  ivec4 res = texelFetch(arg_0, ivec3(arg_1, int(arg_2)));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_aae7f6();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:11: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:11: '=' :  cannot convert from ' const float' to ' temp highp 4-component vector of int'
+ERROR: 0:11: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(r32i) uniform highp iimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_aae7f6() {
+  ivec2 arg_1 = ivec2(1);
+  uint arg_2 = 1u;
+  ivec4 res = texelFetch(arg_0, ivec3(arg_1, int(arg_2)));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_aae7f6();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:12: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:12: '=' :  cannot convert from ' const float' to ' temp mediump 4-component vector of int'
+ERROR: 0:12: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(r32i) uniform highp iimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_aae7f6() {
+  ivec2 arg_1 = ivec2(1);
+  uint arg_2 = 1u;
+  ivec4 res = texelFetch(arg_0, ivec3(arg_1, int(arg_2)));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_aae7f6();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:11: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:11: '=' :  cannot convert from ' const float' to ' temp highp 4-component vector of int'
+ERROR: 0:11: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/aae7f6.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/aae7f6.wgsl.expected.msl
new file mode 100644
index 0000000..933902b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/aae7f6.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_aae7f6(texture2d_array<int, access::read> tint_symbol_1, device int4* const tint_symbol_2) {
+  int2 arg_1 = int2(1);
+  uint arg_2 = 1u;
+  int4 res = tint_symbol_1.read(uint2(arg_1), arg_2);
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<int, access::read> tint_symbol_3, device int4* const tint_symbol_4) {
+  textureLoad_aae7f6(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<int, access::read> tint_symbol_5 [[texture(0)]], device int4* tint_symbol_6 [[buffer(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<int, access::read> tint_symbol_7 [[texture(0)]], device int4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_aae7f6(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<int, access::read> tint_symbol_9 [[texture(0)]], device int4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_aae7f6(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/aae7f6.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/aae7f6.wgsl.expected.spvasm
new file mode 100644
index 0000000..2e4aa05
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/aae7f6.wgsl.expected.spvasm
@@ -0,0 +1,112 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 62
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_aae7f6 "textureLoad_aae7f6"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 2D 0 1 0 2 R32i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+      %v4int = OpTypeVector %int 4
+%prevent_dce_block = OpTypeStruct %v4int
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+      %v2int = OpTypeVector %int 2
+      %int_1 = OpConstant %int 1
+         %23 = OpConstantComposite %v2int %int_1 %int_1
+%_ptr_Function_v2int = OpTypePointer Function %v2int
+         %26 = OpConstantNull %v2int
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %31 = OpConstantNull %uint
+      %v3int = OpTypeVector %int 3
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+         %43 = OpConstantNull %v4int
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4int = OpTypePointer StorageBuffer %v4int
+         %48 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_aae7f6 = OpFunction %void None %17
+         %20 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v2int Function %26
+      %arg_2 = OpVariable %_ptr_Function_uint Function %31
+        %res = OpVariable %_ptr_Function_v4int Function %43
+               OpStore %arg_1 %23
+               OpStore %arg_2 %uint_1
+         %33 = OpLoad %11 %arg_0
+         %35 = OpLoad %v2int %arg_1
+         %36 = OpCompositeExtract %int %35 0
+         %37 = OpCompositeExtract %int %35 1
+         %39 = OpLoad %uint %arg_2
+         %38 = OpBitcast %int %39
+         %40 = OpCompositeConstruct %v3int %36 %37 %38
+         %32 = OpImageRead %v4int %33 %40
+               OpStore %res %32
+         %46 = OpAccessChain %_ptr_StorageBuffer_v4int %prevent_dce %uint_0
+         %47 = OpLoad %v4int %res
+               OpStore %46 %47
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %48
+         %50 = OpLabel
+         %51 = OpFunctionCall %void %textureLoad_aae7f6
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %53 = OpLabel
+         %54 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %54
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %57 = OpLabel
+         %58 = OpFunctionCall %void %textureLoad_aae7f6
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %60 = OpLabel
+         %61 = OpFunctionCall %void %textureLoad_aae7f6
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/aae7f6.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/aae7f6.wgsl.expected.wgsl
new file mode 100644
index 0000000..2d05635
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/aae7f6.wgsl.expected.wgsl
@@ -0,0 +1,28 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<r32sint, read>;
+
+fn textureLoad_aae7f6() {
+  var arg_1 = vec2<i32>(1i);
+  var arg_2 = 1u;
+  var res : vec4<i32> = textureLoad(arg_0, arg_1, arg_2);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_aae7f6();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_aae7f6();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_aae7f6();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/ac64f7.wgsl b/test/tint/builtins/gen/var/textureLoad/ac64f7.wgsl
new file mode 100644
index 0000000..f19a78e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/ac64f7.wgsl
@@ -0,0 +1,50 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<bgra8unorm, read>;
+
+// fn textureLoad(texture: texture_storage_2d_array<bgra8unorm, read>, coords: vec2<u32>, array_index: u32) -> vec4<f32>
+fn textureLoad_ac64f7() {
+  var arg_1 = vec2<u32>(1u);
+  var arg_2 = 1u;
+  var res: vec4<f32> = textureLoad(arg_0, arg_1, arg_2);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_ac64f7();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_ac64f7();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_ac64f7();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/ac64f7.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/ac64f7.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..7ef0390
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/ac64f7.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_ac64f7() {
+  uint2 arg_1 = (1u).xx;
+  uint arg_2 = 1u;
+  float4 res = arg_0.Load(uint4(uint3(arg_1, arg_2), uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_ac64f7();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_ac64f7();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_ac64f7();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/ac64f7.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/ac64f7.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..7ef0390
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/ac64f7.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_ac64f7() {
+  uint2 arg_1 = (1u).xx;
+  uint arg_2 = 1u;
+  float4 res = arg_0.Load(uint4(uint3(arg_1, arg_2), uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_ac64f7();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_ac64f7();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_ac64f7();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/ac64f7.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/ac64f7.wgsl.expected.glsl
new file mode 100644
index 0000000..ec38c9f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/ac64f7.wgsl.expected.glsl
@@ -0,0 +1,93 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba8) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_ac64f7() {
+  uvec2 arg_1 = uvec2(1u);
+  uint arg_2 = 1u;
+  vec4 res = texelFetch(arg_0, ivec3(uvec3(arg_1, arg_2)));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_ac64f7();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba8) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_ac64f7() {
+  uvec2 arg_1 = uvec2(1u);
+  uint arg_2 = 1u;
+  vec4 res = texelFetch(arg_0, ivec3(uvec3(arg_1, arg_2)));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_ac64f7();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba8' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba8) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_ac64f7() {
+  uvec2 arg_1 = uvec2(1u);
+  uint arg_2 = 1u;
+  vec4 res = texelFetch(arg_0, ivec3(uvec3(arg_1, arg_2)));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_ac64f7();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/ac64f7.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/ac64f7.wgsl.expected.msl
new file mode 100644
index 0000000..9138b6f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/ac64f7.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_ac64f7(texture2d_array<float, access::read> tint_symbol_1, device float4* const tint_symbol_2) {
+  uint2 arg_1 = uint2(1u);
+  uint arg_2 = 1u;
+  float4 res = tint_symbol_1.read(uint2(arg_1), arg_2);
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<float, access::read> tint_symbol_3, device float4* const tint_symbol_4) {
+  textureLoad_ac64f7(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<float, access::read> tint_symbol_5 [[texture(0)]], device float4* tint_symbol_6 [[buffer(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::read> tint_symbol_7 [[texture(0)]], device float4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_ac64f7(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<float, access::read> tint_symbol_9 [[texture(0)]], device float4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_ac64f7(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/ac64f7.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/ac64f7.wgsl.expected.spvasm
new file mode 100644
index 0000000..7281831
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/ac64f7.wgsl.expected.spvasm
@@ -0,0 +1,107 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 57
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_ac64f7 "textureLoad_ac64f7"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 1 0 2 Rgba8
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+%prevent_dce_block = OpTypeStruct %v4float
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+     %uint_1 = OpConstant %uint 1
+         %22 = OpConstantComposite %v2uint %uint_1 %uint_1
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %25 = OpConstantNull %v2uint
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %28 = OpConstantNull %uint
+     %v3uint = OpTypeVector %uint 3
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
+         %43 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_ac64f7 = OpFunction %void None %15
+         %18 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v2uint Function %25
+      %arg_2 = OpVariable %_ptr_Function_uint Function %28
+        %res = OpVariable %_ptr_Function_v4float Function %5
+               OpStore %arg_1 %22
+               OpStore %arg_2 %uint_1
+         %30 = OpLoad %11 %arg_0
+         %32 = OpLoad %v2uint %arg_1
+         %33 = OpCompositeExtract %uint %32 0
+         %34 = OpCompositeExtract %uint %32 1
+         %35 = OpLoad %uint %arg_2
+         %36 = OpCompositeConstruct %v3uint %33 %34 %35
+         %29 = OpImageRead %v4float %30 %36
+               OpStore %res %29
+         %41 = OpAccessChain %_ptr_StorageBuffer_v4float %prevent_dce %uint_0
+         %42 = OpLoad %v4float %res
+               OpStore %41 %42
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %43
+         %45 = OpLabel
+         %46 = OpFunctionCall %void %textureLoad_ac64f7
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %48 = OpLabel
+         %49 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %49
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %52 = OpLabel
+         %53 = OpFunctionCall %void %textureLoad_ac64f7
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %55 = OpLabel
+         %56 = OpFunctionCall %void %textureLoad_ac64f7
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/ac64f7.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/ac64f7.wgsl.expected.wgsl
new file mode 100644
index 0000000..f67149a
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/ac64f7.wgsl.expected.wgsl
@@ -0,0 +1,28 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<bgra8unorm, read>;
+
+fn textureLoad_ac64f7() {
+  var arg_1 = vec2<u32>(1u);
+  var arg_2 = 1u;
+  var res : vec4<f32> = textureLoad(arg_0, arg_1, arg_2);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_ac64f7();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_ac64f7();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_ac64f7();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/aeae73.wgsl b/test/tint/builtins/gen/var/textureLoad/aeae73.wgsl
new file mode 100644
index 0000000..810be90
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/aeae73.wgsl
@@ -0,0 +1,50 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<r32uint, read>;
+
+// fn textureLoad(texture: texture_storage_2d_array<r32uint, read>, coords: vec2<u32>, array_index: i32) -> vec4<u32>
+fn textureLoad_aeae73() {
+  var arg_1 = vec2<u32>(1u);
+  var arg_2 = 1i;
+  var res: vec4<u32> = textureLoad(arg_0, arg_1, arg_2);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_aeae73();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_aeae73();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_aeae73();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/aeae73.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/aeae73.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..431883f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/aeae73.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_aeae73() {
+  uint2 arg_1 = (1u).xx;
+  int arg_2 = 1;
+  uint4 res = arg_0.Load(uint4(uint3(arg_1, uint(arg_2)), uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_aeae73();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_aeae73();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_aeae73();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/aeae73.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/aeae73.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..431883f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/aeae73.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_aeae73() {
+  uint2 arg_1 = (1u).xx;
+  int arg_2 = 1;
+  uint4 res = arg_0.Load(uint4(uint3(arg_1, uint(arg_2)), uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_aeae73();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_aeae73();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_aeae73();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/aeae73.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/aeae73.wgsl.expected.glsl
new file mode 100644
index 0000000..d6f3098
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/aeae73.wgsl.expected.glsl
@@ -0,0 +1,99 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(r32ui) uniform highp uimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_aeae73() {
+  uvec2 arg_1 = uvec2(1u);
+  int arg_2 = 1;
+  uvec4 res = texelFetch(arg_0, ivec3(uvec3(arg_1, uint(arg_2))));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_aeae73();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:11: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:11: '=' :  cannot convert from ' const float' to ' temp highp 4-component vector of uint'
+ERROR: 0:11: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(r32ui) uniform highp uimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_aeae73() {
+  uvec2 arg_1 = uvec2(1u);
+  int arg_2 = 1;
+  uvec4 res = texelFetch(arg_0, ivec3(uvec3(arg_1, uint(arg_2))));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_aeae73();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:12: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:12: '=' :  cannot convert from ' const float' to ' temp mediump 4-component vector of uint'
+ERROR: 0:12: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(r32ui) uniform highp uimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_aeae73() {
+  uvec2 arg_1 = uvec2(1u);
+  int arg_2 = 1;
+  uvec4 res = texelFetch(arg_0, ivec3(uvec3(arg_1, uint(arg_2))));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_aeae73();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:11: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:11: '=' :  cannot convert from ' const float' to ' temp highp 4-component vector of uint'
+ERROR: 0:11: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/aeae73.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/aeae73.wgsl.expected.msl
new file mode 100644
index 0000000..1cd84d8
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/aeae73.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_aeae73(texture2d_array<uint, access::read> tint_symbol_1, device uint4* const tint_symbol_2) {
+  uint2 arg_1 = uint2(1u);
+  int arg_2 = 1;
+  uint4 res = tint_symbol_1.read(uint2(arg_1), arg_2);
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<uint, access::read> tint_symbol_3, device uint4* const tint_symbol_4) {
+  textureLoad_aeae73(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<uint, access::read> tint_symbol_5 [[texture(0)]], device uint4* tint_symbol_6 [[buffer(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<uint, access::read> tint_symbol_7 [[texture(0)]], device uint4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_aeae73(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<uint, access::read> tint_symbol_9 [[texture(0)]], device uint4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_aeae73(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/aeae73.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/aeae73.wgsl.expected.spvasm
new file mode 100644
index 0000000..c722b8e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/aeae73.wgsl.expected.spvasm
@@ -0,0 +1,112 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 62
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_aeae73 "textureLoad_aeae73"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 2D 0 1 0 2 R32ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+     %v4uint = OpTypeVector %uint 4
+%prevent_dce_block = OpTypeStruct %v4uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+     %v2uint = OpTypeVector %uint 2
+     %uint_1 = OpConstant %uint 1
+         %23 = OpConstantComposite %v2uint %uint_1 %uint_1
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %26 = OpConstantNull %v2uint
+        %int = OpTypeInt 32 1
+      %int_1 = OpConstant %int 1
+%_ptr_Function_int = OpTypePointer Function %int
+         %31 = OpConstantNull %int
+     %v3uint = OpTypeVector %uint 3
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+         %43 = OpConstantNull %v4uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4uint = OpTypePointer StorageBuffer %v4uint
+         %48 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_aeae73 = OpFunction %void None %17
+         %20 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v2uint Function %26
+      %arg_2 = OpVariable %_ptr_Function_int Function %31
+        %res = OpVariable %_ptr_Function_v4uint Function %43
+               OpStore %arg_1 %23
+               OpStore %arg_2 %int_1
+         %33 = OpLoad %11 %arg_0
+         %35 = OpLoad %v2uint %arg_1
+         %36 = OpCompositeExtract %uint %35 0
+         %37 = OpCompositeExtract %uint %35 1
+         %39 = OpLoad %int %arg_2
+         %38 = OpBitcast %uint %39
+         %40 = OpCompositeConstruct %v3uint %36 %37 %38
+         %32 = OpImageRead %v4uint %33 %40
+               OpStore %res %32
+         %46 = OpAccessChain %_ptr_StorageBuffer_v4uint %prevent_dce %uint_0
+         %47 = OpLoad %v4uint %res
+               OpStore %46 %47
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %48
+         %50 = OpLabel
+         %51 = OpFunctionCall %void %textureLoad_aeae73
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %53 = OpLabel
+         %54 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %54
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %57 = OpLabel
+         %58 = OpFunctionCall %void %textureLoad_aeae73
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %60 = OpLabel
+         %61 = OpFunctionCall %void %textureLoad_aeae73
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/aeae73.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/aeae73.wgsl.expected.wgsl
new file mode 100644
index 0000000..773687b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/aeae73.wgsl.expected.wgsl
@@ -0,0 +1,28 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<r32uint, read>;
+
+fn textureLoad_aeae73() {
+  var arg_1 = vec2<u32>(1u);
+  var arg_2 = 1i;
+  var res : vec4<u32> = textureLoad(arg_0, arg_1, arg_2);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_aeae73();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_aeae73();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_aeae73();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/aebc09.wgsl b/test/tint/builtins/gen/var/textureLoad/aebc09.wgsl
new file mode 100644
index 0000000..0d010c7
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/aebc09.wgsl
@@ -0,0 +1,49 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_1d<rgba16uint, read>;
+
+// fn textureLoad(texture: texture_storage_1d<rgba16uint, read>, coords: u32) -> vec4<u32>
+fn textureLoad_aebc09() {
+  var arg_1 = 1u;
+  var res: vec4<u32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_aebc09();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_aebc09();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_aebc09();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/aebc09.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/aebc09.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..d1c2dc3
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/aebc09.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture1D<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_aebc09() {
+  uint arg_1 = 1u;
+  uint4 res = arg_0.Load(uint2(arg_1, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_aebc09();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_aebc09();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_aebc09();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/aebc09.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/aebc09.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..d1c2dc3
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/aebc09.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture1D<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_aebc09() {
+  uint arg_1 = 1u;
+  uint4 res = arg_0.Load(uint2(arg_1, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_aebc09();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_aebc09();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_aebc09();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/aebc09.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/aebc09.wgsl.expected.glsl
new file mode 100644
index 0000000..45802a5
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/aebc09.wgsl.expected.glsl
@@ -0,0 +1,90 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba16ui) uniform highp uimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_aebc09() {
+  uint arg_1 = 1u;
+  uvec4 res = texelFetch(arg_0, ivec2(uvec2(arg_1, 0u)));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_aebc09();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba16ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba16ui) uniform highp uimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_aebc09() {
+  uint arg_1 = 1u;
+  uvec4 res = texelFetch(arg_0, ivec2(uvec2(arg_1, 0u)));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_aebc09();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba16ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba16ui) uniform highp uimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_aebc09() {
+  uint arg_1 = 1u;
+  uvec4 res = texelFetch(arg_0, ivec2(uvec2(arg_1, 0u)));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_aebc09();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba16ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/aebc09.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/aebc09.wgsl.expected.msl
new file mode 100644
index 0000000..4cd4c5e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/aebc09.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_aebc09(texture1d<uint, access::read> tint_symbol_1, device uint4* const tint_symbol_2) {
+  uint arg_1 = 1u;
+  uint4 res = tint_symbol_1.read(uint(arg_1));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<uint, access::read> tint_symbol_3, device uint4* const tint_symbol_4) {
+  textureLoad_aebc09(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<uint, access::read> tint_symbol_5 [[texture(0)]], device uint4* tint_symbol_6 [[buffer(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(texture1d<uint, access::read> tint_symbol_7 [[texture(0)]], device uint4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_aebc09(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture1d<uint, access::read> tint_symbol_9 [[texture(0)]], device uint4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_aebc09(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/aebc09.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/aebc09.wgsl.expected.spvasm
new file mode 100644
index 0000000..75510b8
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/aebc09.wgsl.expected.spvasm
@@ -0,0 +1,98 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 49
+; Schema: 0
+               OpCapability Shader
+               OpCapability Image1D
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_aebc09 "textureLoad_aebc09"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 1D 0 0 0 2 Rgba16ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+     %v4uint = OpTypeVector %uint 4
+%prevent_dce_block = OpTypeStruct %v4uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %24 = OpConstantNull %uint
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+         %30 = OpConstantNull %v4uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4uint = OpTypePointer StorageBuffer %v4uint
+         %35 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_aebc09 = OpFunction %void None %17
+         %20 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_uint Function %24
+        %res = OpVariable %_ptr_Function_v4uint Function %30
+               OpStore %arg_1 %uint_1
+         %26 = OpLoad %11 %arg_0
+         %27 = OpLoad %uint %arg_1
+         %25 = OpImageRead %v4uint %26 %27
+               OpStore %res %25
+         %33 = OpAccessChain %_ptr_StorageBuffer_v4uint %prevent_dce %uint_0
+         %34 = OpLoad %v4uint %res
+               OpStore %33 %34
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %35
+         %37 = OpLabel
+         %38 = OpFunctionCall %void %textureLoad_aebc09
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %40 = OpLabel
+         %41 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %41
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %44 = OpLabel
+         %45 = OpFunctionCall %void %textureLoad_aebc09
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %47 = OpLabel
+         %48 = OpFunctionCall %void %textureLoad_aebc09
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/aebc09.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/aebc09.wgsl.expected.wgsl
new file mode 100644
index 0000000..fed4d3a
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/aebc09.wgsl.expected.wgsl
@@ -0,0 +1,27 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_1d<rgba16uint, read>;
+
+fn textureLoad_aebc09() {
+  var arg_1 = 1u;
+  var res : vec4<u32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_aebc09();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_aebc09();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_aebc09();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/b1bf79.wgsl b/test/tint/builtins/gen/var/textureLoad/b1bf79.wgsl
new file mode 100644
index 0000000..0404634
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/b1bf79.wgsl
@@ -0,0 +1,49 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_3d<rgba32sint, read>;
+
+// fn textureLoad(texture: texture_storage_3d<rgba32sint, read>, coords: vec3<i32>) -> vec4<i32>
+fn textureLoad_b1bf79() {
+  var arg_1 = vec3<i32>(1i);
+  var res: vec4<i32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_b1bf79();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_b1bf79();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_b1bf79();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/b1bf79.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/b1bf79.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..ef955de
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/b1bf79.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture3D<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_b1bf79() {
+  int3 arg_1 = (1).xxx;
+  int4 res = arg_0.Load(int4(arg_1, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_b1bf79();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_b1bf79();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_b1bf79();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/b1bf79.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/b1bf79.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..ef955de
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/b1bf79.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture3D<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_b1bf79() {
+  int3 arg_1 = (1).xxx;
+  int4 res = arg_0.Load(int4(arg_1, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_b1bf79();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_b1bf79();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_b1bf79();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/b1bf79.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/b1bf79.wgsl.expected.glsl
new file mode 100644
index 0000000..fa7e636
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/b1bf79.wgsl.expected.glsl
@@ -0,0 +1,90 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba32i) uniform highp iimage3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_b1bf79() {
+  ivec3 arg_1 = ivec3(1);
+  ivec4 res = texelFetch(arg_0, arg_1);
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_b1bf79();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba32i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba32i) uniform highp iimage3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_b1bf79() {
+  ivec3 arg_1 = ivec3(1);
+  ivec4 res = texelFetch(arg_0, arg_1);
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_b1bf79();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba32i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba32i) uniform highp iimage3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_b1bf79() {
+  ivec3 arg_1 = ivec3(1);
+  ivec4 res = texelFetch(arg_0, arg_1);
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_b1bf79();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba32i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/b1bf79.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/b1bf79.wgsl.expected.msl
new file mode 100644
index 0000000..19382d5
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/b1bf79.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_b1bf79(texture3d<int, access::read> tint_symbol_1, device int4* const tint_symbol_2) {
+  int3 arg_1 = int3(1);
+  int4 res = tint_symbol_1.read(uint3(arg_1));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<int, access::read> tint_symbol_3, device int4* const tint_symbol_4) {
+  textureLoad_b1bf79(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<int, access::read> tint_symbol_5 [[texture(0)]], device int4* tint_symbol_6 [[buffer(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<int, access::read> tint_symbol_7 [[texture(0)]], device int4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_b1bf79(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture3d<int, access::read> tint_symbol_9 [[texture(0)]], device int4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_b1bf79(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/b1bf79.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/b1bf79.wgsl.expected.spvasm
new file mode 100644
index 0000000..45f220b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/b1bf79.wgsl.expected.spvasm
@@ -0,0 +1,100 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 52
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_b1bf79 "textureLoad_b1bf79"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 3D 0 0 0 2 Rgba32i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+      %v4int = OpTypeVector %int 4
+%prevent_dce_block = OpTypeStruct %v4int
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+      %v3int = OpTypeVector %int 3
+      %int_1 = OpConstant %int 1
+         %23 = OpConstantComposite %v3int %int_1 %int_1 %int_1
+%_ptr_Function_v3int = OpTypePointer Function %v3int
+         %26 = OpConstantNull %v3int
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+         %32 = OpConstantNull %v4int
+       %uint = OpTypeInt 32 0
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4int = OpTypePointer StorageBuffer %v4int
+         %38 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_b1bf79 = OpFunction %void None %17
+         %20 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v3int Function %26
+        %res = OpVariable %_ptr_Function_v4int Function %32
+               OpStore %arg_1 %23
+         %28 = OpLoad %11 %arg_0
+         %29 = OpLoad %v3int %arg_1
+         %27 = OpImageRead %v4int %28 %29
+               OpStore %res %27
+         %36 = OpAccessChain %_ptr_StorageBuffer_v4int %prevent_dce %uint_0
+         %37 = OpLoad %v4int %res
+               OpStore %36 %37
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %38
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %textureLoad_b1bf79
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %43 = OpLabel
+         %44 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %44
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %47 = OpLabel
+         %48 = OpFunctionCall %void %textureLoad_b1bf79
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %50 = OpLabel
+         %51 = OpFunctionCall %void %textureLoad_b1bf79
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/b1bf79.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/b1bf79.wgsl.expected.wgsl
new file mode 100644
index 0000000..11b9e8e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/b1bf79.wgsl.expected.wgsl
@@ -0,0 +1,27 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_3d<rgba32sint, read>;
+
+fn textureLoad_b1bf79() {
+  var arg_1 = vec3<i32>(1i);
+  var res : vec4<i32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_b1bf79();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_b1bf79();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_b1bf79();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/b24d27.wgsl b/test/tint/builtins/gen/var/textureLoad/b24d27.wgsl
new file mode 100644
index 0000000..3fb37c1
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/b24d27.wgsl
@@ -0,0 +1,49 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d<rgba8sint, read>;
+
+// fn textureLoad(texture: texture_storage_2d<rgba8sint, read>, coords: vec2<u32>) -> vec4<i32>
+fn textureLoad_b24d27() {
+  var arg_1 = vec2<u32>(1u);
+  var res: vec4<i32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_b24d27();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_b24d27();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_b24d27();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/b24d27.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/b24d27.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..974b4b9
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/b24d27.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture2D<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_b24d27() {
+  uint2 arg_1 = (1u).xx;
+  int4 res = arg_0.Load(uint3(arg_1, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_b24d27();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_b24d27();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_b24d27();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/b24d27.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/b24d27.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..974b4b9
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/b24d27.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture2D<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_b24d27() {
+  uint2 arg_1 = (1u).xx;
+  int4 res = arg_0.Load(uint3(arg_1, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_b24d27();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_b24d27();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_b24d27();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/b24d27.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/b24d27.wgsl.expected.glsl
new file mode 100644
index 0000000..42da2cb
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/b24d27.wgsl.expected.glsl
@@ -0,0 +1,90 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba8i) uniform highp iimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_b24d27() {
+  uvec2 arg_1 = uvec2(1u);
+  ivec4 res = texelFetch(arg_0, ivec2(arg_1));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_b24d27();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba8i) uniform highp iimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_b24d27() {
+  uvec2 arg_1 = uvec2(1u);
+  ivec4 res = texelFetch(arg_0, ivec2(arg_1));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_b24d27();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba8i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba8i) uniform highp iimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_b24d27() {
+  uvec2 arg_1 = uvec2(1u);
+  ivec4 res = texelFetch(arg_0, ivec2(arg_1));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_b24d27();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/b24d27.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/b24d27.wgsl.expected.msl
new file mode 100644
index 0000000..264c775
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/b24d27.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_b24d27(texture2d<int, access::read> tint_symbol_1, device int4* const tint_symbol_2) {
+  uint2 arg_1 = uint2(1u);
+  int4 res = tint_symbol_1.read(uint2(arg_1));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<int, access::read> tint_symbol_3, device int4* const tint_symbol_4) {
+  textureLoad_b24d27(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<int, access::read> tint_symbol_5 [[texture(0)]], device int4* tint_symbol_6 [[buffer(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<int, access::read> tint_symbol_7 [[texture(0)]], device int4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_b24d27(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d<int, access::read> tint_symbol_9 [[texture(0)]], device int4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_b24d27(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/b24d27.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/b24d27.wgsl.expected.spvasm
new file mode 100644
index 0000000..8a016f3
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/b24d27.wgsl.expected.spvasm
@@ -0,0 +1,100 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 52
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_b24d27 "textureLoad_b24d27"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 2D 0 0 0 2 Rgba8i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+      %v4int = OpTypeVector %int 4
+%prevent_dce_block = OpTypeStruct %v4int
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+     %uint_1 = OpConstant %uint 1
+         %24 = OpConstantComposite %v2uint %uint_1 %uint_1
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %27 = OpConstantNull %v2uint
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+         %33 = OpConstantNull %v4int
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4int = OpTypePointer StorageBuffer %v4int
+         %38 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_b24d27 = OpFunction %void None %17
+         %20 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v2uint Function %27
+        %res = OpVariable %_ptr_Function_v4int Function %33
+               OpStore %arg_1 %24
+         %29 = OpLoad %11 %arg_0
+         %30 = OpLoad %v2uint %arg_1
+         %28 = OpImageRead %v4int %29 %30
+               OpStore %res %28
+         %36 = OpAccessChain %_ptr_StorageBuffer_v4int %prevent_dce %uint_0
+         %37 = OpLoad %v4int %res
+               OpStore %36 %37
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %38
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %textureLoad_b24d27
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %43 = OpLabel
+         %44 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %44
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %47 = OpLabel
+         %48 = OpFunctionCall %void %textureLoad_b24d27
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %50 = OpLabel
+         %51 = OpFunctionCall %void %textureLoad_b24d27
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/b24d27.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/b24d27.wgsl.expected.wgsl
new file mode 100644
index 0000000..ee0d7e3
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/b24d27.wgsl.expected.wgsl
@@ -0,0 +1,27 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d<rgba8sint, read>;
+
+fn textureLoad_b24d27() {
+  var arg_1 = vec2<u32>(1u);
+  var res : vec4<i32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_b24d27();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_b24d27();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_b24d27();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/b58c6d.wgsl b/test/tint/builtins/gen/var/textureLoad/b58c6d.wgsl
new file mode 100644
index 0000000..d9046ef
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/b58c6d.wgsl
@@ -0,0 +1,50 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<r32float, read>;
+
+// fn textureLoad(texture: texture_storage_2d_array<r32float, read>, coords: vec2<i32>, array_index: i32) -> vec4<f32>
+fn textureLoad_b58c6d() {
+  var arg_1 = vec2<i32>(1i);
+  var arg_2 = 1i;
+  var res: vec4<f32> = textureLoad(arg_0, arg_1, arg_2);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_b58c6d();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_b58c6d();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_b58c6d();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/b58c6d.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/b58c6d.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..6a6378f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/b58c6d.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_b58c6d() {
+  int2 arg_1 = (1).xx;
+  int arg_2 = 1;
+  float4 res = arg_0.Load(int4(int3(arg_1, arg_2), 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_b58c6d();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_b58c6d();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_b58c6d();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/b58c6d.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/b58c6d.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..6a6378f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/b58c6d.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_b58c6d() {
+  int2 arg_1 = (1).xx;
+  int arg_2 = 1;
+  float4 res = arg_0.Load(int4(int3(arg_1, arg_2), 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_b58c6d();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_b58c6d();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_b58c6d();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/b58c6d.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/b58c6d.wgsl.expected.glsl
new file mode 100644
index 0000000..4f7e67e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/b58c6d.wgsl.expected.glsl
@@ -0,0 +1,99 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(r32f) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_b58c6d() {
+  ivec2 arg_1 = ivec2(1);
+  int arg_2 = 1;
+  vec4 res = texelFetch(arg_0, ivec3(arg_1, arg_2));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_b58c6d();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:11: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:11: '=' :  cannot convert from ' const float' to ' temp highp 4-component vector of float'
+ERROR: 0:11: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(r32f) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_b58c6d() {
+  ivec2 arg_1 = ivec2(1);
+  int arg_2 = 1;
+  vec4 res = texelFetch(arg_0, ivec3(arg_1, arg_2));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_b58c6d();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:12: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:12: '=' :  cannot convert from ' const float' to ' temp highp 4-component vector of float'
+ERROR: 0:12: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(r32f) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_b58c6d() {
+  ivec2 arg_1 = ivec2(1);
+  int arg_2 = 1;
+  vec4 res = texelFetch(arg_0, ivec3(arg_1, arg_2));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_b58c6d();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:11: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:11: '=' :  cannot convert from ' const float' to ' temp highp 4-component vector of float'
+ERROR: 0:11: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/b58c6d.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/b58c6d.wgsl.expected.msl
new file mode 100644
index 0000000..cc85e1a
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/b58c6d.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_b58c6d(texture2d_array<float, access::read> tint_symbol_1, device float4* const tint_symbol_2) {
+  int2 arg_1 = int2(1);
+  int arg_2 = 1;
+  float4 res = tint_symbol_1.read(uint2(arg_1), arg_2);
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<float, access::read> tint_symbol_3, device float4* const tint_symbol_4) {
+  textureLoad_b58c6d(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<float, access::read> tint_symbol_5 [[texture(0)]], device float4* tint_symbol_6 [[buffer(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::read> tint_symbol_7 [[texture(0)]], device float4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_b58c6d(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<float, access::read> tint_symbol_9 [[texture(0)]], device float4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_b58c6d(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/b58c6d.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/b58c6d.wgsl.expected.spvasm
new file mode 100644
index 0000000..c0bcaed
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/b58c6d.wgsl.expected.spvasm
@@ -0,0 +1,108 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 58
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_b58c6d "textureLoad_b58c6d"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 1 0 2 R32f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+%prevent_dce_block = OpTypeStruct %v4float
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %v2int = OpTypeVector %int 2
+      %int_1 = OpConstant %int 1
+         %22 = OpConstantComposite %v2int %int_1 %int_1
+%_ptr_Function_v2int = OpTypePointer Function %v2int
+         %25 = OpConstantNull %v2int
+%_ptr_Function_int = OpTypePointer Function %int
+         %28 = OpConstantNull %int
+      %v3int = OpTypeVector %int 3
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+       %uint = OpTypeInt 32 0
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
+         %44 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_b58c6d = OpFunction %void None %15
+         %18 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v2int Function %25
+      %arg_2 = OpVariable %_ptr_Function_int Function %28
+        %res = OpVariable %_ptr_Function_v4float Function %5
+               OpStore %arg_1 %22
+               OpStore %arg_2 %int_1
+         %30 = OpLoad %11 %arg_0
+         %32 = OpLoad %v2int %arg_1
+         %33 = OpCompositeExtract %int %32 0
+         %34 = OpCompositeExtract %int %32 1
+         %35 = OpLoad %int %arg_2
+         %36 = OpCompositeConstruct %v3int %33 %34 %35
+         %29 = OpImageRead %v4float %30 %36
+               OpStore %res %29
+         %42 = OpAccessChain %_ptr_StorageBuffer_v4float %prevent_dce %uint_0
+         %43 = OpLoad %v4float %res
+               OpStore %42 %43
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %44
+         %46 = OpLabel
+         %47 = OpFunctionCall %void %textureLoad_b58c6d
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %49 = OpLabel
+         %50 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %50
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %53 = OpLabel
+         %54 = OpFunctionCall %void %textureLoad_b58c6d
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %56 = OpLabel
+         %57 = OpFunctionCall %void %textureLoad_b58c6d
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/b58c6d.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/b58c6d.wgsl.expected.wgsl
new file mode 100644
index 0000000..64a57c7
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/b58c6d.wgsl.expected.wgsl
@@ -0,0 +1,28 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<r32float, read>;
+
+fn textureLoad_b58c6d() {
+  var arg_1 = vec2<i32>(1i);
+  var arg_2 = 1i;
+  var res : vec4<f32> = textureLoad(arg_0, arg_1, arg_2);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_b58c6d();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_b58c6d();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_b58c6d();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/b6c458.wgsl b/test/tint/builtins/gen/var/textureLoad/b6c458.wgsl
new file mode 100644
index 0000000..8eb19a8
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/b6c458.wgsl
@@ -0,0 +1,49 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d<rgba32uint, read>;
+
+// fn textureLoad(texture: texture_storage_2d<rgba32uint, read>, coords: vec2<i32>) -> vec4<u32>
+fn textureLoad_b6c458() {
+  var arg_1 = vec2<i32>(1i);
+  var res: vec4<u32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_b6c458();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_b6c458();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_b6c458();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/b6c458.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/b6c458.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..e207da6
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/b6c458.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture2D<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_b6c458() {
+  int2 arg_1 = (1).xx;
+  uint4 res = arg_0.Load(int3(arg_1, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_b6c458();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_b6c458();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_b6c458();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/b6c458.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/b6c458.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..e207da6
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/b6c458.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture2D<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_b6c458() {
+  int2 arg_1 = (1).xx;
+  uint4 res = arg_0.Load(int3(arg_1, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_b6c458();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_b6c458();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_b6c458();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/b6c458.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/b6c458.wgsl.expected.glsl
new file mode 100644
index 0000000..a669540
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/b6c458.wgsl.expected.glsl
@@ -0,0 +1,90 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba32ui) uniform highp uimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_b6c458() {
+  ivec2 arg_1 = ivec2(1);
+  uvec4 res = texelFetch(arg_0, arg_1);
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_b6c458();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba32ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba32ui) uniform highp uimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_b6c458() {
+  ivec2 arg_1 = ivec2(1);
+  uvec4 res = texelFetch(arg_0, arg_1);
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_b6c458();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba32ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba32ui) uniform highp uimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_b6c458() {
+  ivec2 arg_1 = ivec2(1);
+  uvec4 res = texelFetch(arg_0, arg_1);
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_b6c458();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba32ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/b6c458.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/b6c458.wgsl.expected.msl
new file mode 100644
index 0000000..ee21f66
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/b6c458.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_b6c458(texture2d<uint, access::read> tint_symbol_1, device uint4* const tint_symbol_2) {
+  int2 arg_1 = int2(1);
+  uint4 res = tint_symbol_1.read(uint2(arg_1));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<uint, access::read> tint_symbol_3, device uint4* const tint_symbol_4) {
+  textureLoad_b6c458(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<uint, access::read> tint_symbol_5 [[texture(0)]], device uint4* tint_symbol_6 [[buffer(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<uint, access::read> tint_symbol_7 [[texture(0)]], device uint4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_b6c458(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d<uint, access::read> tint_symbol_9 [[texture(0)]], device uint4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_b6c458(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/b6c458.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/b6c458.wgsl.expected.spvasm
new file mode 100644
index 0000000..b6183ca
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/b6c458.wgsl.expected.spvasm
@@ -0,0 +1,100 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 52
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_b6c458 "textureLoad_b6c458"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 2D 0 0 0 2 Rgba32ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+     %v4uint = OpTypeVector %uint 4
+%prevent_dce_block = OpTypeStruct %v4uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %v2int = OpTypeVector %int 2
+      %int_1 = OpConstant %int 1
+         %24 = OpConstantComposite %v2int %int_1 %int_1
+%_ptr_Function_v2int = OpTypePointer Function %v2int
+         %27 = OpConstantNull %v2int
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+         %33 = OpConstantNull %v4uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4uint = OpTypePointer StorageBuffer %v4uint
+         %38 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_b6c458 = OpFunction %void None %17
+         %20 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v2int Function %27
+        %res = OpVariable %_ptr_Function_v4uint Function %33
+               OpStore %arg_1 %24
+         %29 = OpLoad %11 %arg_0
+         %30 = OpLoad %v2int %arg_1
+         %28 = OpImageRead %v4uint %29 %30
+               OpStore %res %28
+         %36 = OpAccessChain %_ptr_StorageBuffer_v4uint %prevent_dce %uint_0
+         %37 = OpLoad %v4uint %res
+               OpStore %36 %37
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %38
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %textureLoad_b6c458
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %43 = OpLabel
+         %44 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %44
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %47 = OpLabel
+         %48 = OpFunctionCall %void %textureLoad_b6c458
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %50 = OpLabel
+         %51 = OpFunctionCall %void %textureLoad_b6c458
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/b6c458.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/b6c458.wgsl.expected.wgsl
new file mode 100644
index 0000000..6dcfb9b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/b6c458.wgsl.expected.wgsl
@@ -0,0 +1,27 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d<rgba32uint, read>;
+
+fn textureLoad_b6c458() {
+  var arg_1 = vec2<i32>(1i);
+  var res : vec4<u32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_b6c458();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_b6c458();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_b6c458();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/b7f74f.wgsl b/test/tint/builtins/gen/var/textureLoad/b7f74f.wgsl
new file mode 100644
index 0000000..3c0436e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/b7f74f.wgsl
@@ -0,0 +1,49 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_1d<bgra8unorm, read>;
+
+// fn textureLoad(texture: texture_storage_1d<bgra8unorm, read>, coords: u32) -> vec4<f32>
+fn textureLoad_b7f74f() {
+  var arg_1 = 1u;
+  var res: vec4<f32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_b7f74f();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_b7f74f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_b7f74f();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/b7f74f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/b7f74f.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..87e82ef
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/b7f74f.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture1D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_b7f74f() {
+  uint arg_1 = 1u;
+  float4 res = arg_0.Load(uint2(arg_1, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_b7f74f();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_b7f74f();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_b7f74f();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/b7f74f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/b7f74f.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..87e82ef
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/b7f74f.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture1D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_b7f74f() {
+  uint arg_1 = 1u;
+  float4 res = arg_0.Load(uint2(arg_1, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_b7f74f();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_b7f74f();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_b7f74f();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/b7f74f.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/b7f74f.wgsl.expected.glsl
new file mode 100644
index 0000000..4e884d6
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/b7f74f.wgsl.expected.glsl
@@ -0,0 +1,90 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba8) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_b7f74f() {
+  uint arg_1 = 1u;
+  vec4 res = texelFetch(arg_0, ivec2(uvec2(arg_1, 0u)));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_b7f74f();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba8) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_b7f74f() {
+  uint arg_1 = 1u;
+  vec4 res = texelFetch(arg_0, ivec2(uvec2(arg_1, 0u)));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_b7f74f();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba8' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba8) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_b7f74f() {
+  uint arg_1 = 1u;
+  vec4 res = texelFetch(arg_0, ivec2(uvec2(arg_1, 0u)));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_b7f74f();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/b7f74f.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/b7f74f.wgsl.expected.msl
new file mode 100644
index 0000000..a6f326d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/b7f74f.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_b7f74f(texture1d<float, access::read> tint_symbol_1, device float4* const tint_symbol_2) {
+  uint arg_1 = 1u;
+  float4 res = tint_symbol_1.read(uint(arg_1));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<float, access::read> tint_symbol_3, device float4* const tint_symbol_4) {
+  textureLoad_b7f74f(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<float, access::read> tint_symbol_5 [[texture(0)]], device float4* tint_symbol_6 [[buffer(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(texture1d<float, access::read> tint_symbol_7 [[texture(0)]], device float4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_b7f74f(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture1d<float, access::read> tint_symbol_9 [[texture(0)]], device float4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_b7f74f(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/b7f74f.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/b7f74f.wgsl.expected.spvasm
new file mode 100644
index 0000000..8d8da48
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/b7f74f.wgsl.expected.spvasm
@@ -0,0 +1,96 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 47
+; Schema: 0
+               OpCapability Shader
+               OpCapability Image1D
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_b7f74f "textureLoad_b7f74f"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 1D 0 0 0 2 Rgba8
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+%prevent_dce_block = OpTypeStruct %v4float
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %23 = OpConstantNull %uint
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
+         %33 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_b7f74f = OpFunction %void None %15
+         %18 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_uint Function %23
+        %res = OpVariable %_ptr_Function_v4float Function %5
+               OpStore %arg_1 %uint_1
+         %25 = OpLoad %11 %arg_0
+         %26 = OpLoad %uint %arg_1
+         %24 = OpImageRead %v4float %25 %26
+               OpStore %res %24
+         %31 = OpAccessChain %_ptr_StorageBuffer_v4float %prevent_dce %uint_0
+         %32 = OpLoad %v4float %res
+               OpStore %31 %32
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %33
+         %35 = OpLabel
+         %36 = OpFunctionCall %void %textureLoad_b7f74f
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %38 = OpLabel
+         %39 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %39
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %42 = OpLabel
+         %43 = OpFunctionCall %void %textureLoad_b7f74f
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %45 = OpLabel
+         %46 = OpFunctionCall %void %textureLoad_b7f74f
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/b7f74f.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/b7f74f.wgsl.expected.wgsl
new file mode 100644
index 0000000..0b3036c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/b7f74f.wgsl.expected.wgsl
@@ -0,0 +1,27 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_1d<bgra8unorm, read>;
+
+fn textureLoad_b7f74f() {
+  var arg_1 = 1u;
+  var res : vec4<f32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_b7f74f();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_b7f74f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_b7f74f();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/b80e7e.wgsl b/test/tint/builtins/gen/var/textureLoad/b80e7e.wgsl
new file mode 100644
index 0000000..834fc69
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/b80e7e.wgsl
@@ -0,0 +1,50 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba16float, read>;
+
+// fn textureLoad(texture: texture_storage_2d_array<rgba16float, read>, coords: vec2<u32>, array_index: i32) -> vec4<f32>
+fn textureLoad_b80e7e() {
+  var arg_1 = vec2<u32>(1u);
+  var arg_2 = 1i;
+  var res: vec4<f32> = textureLoad(arg_0, arg_1, arg_2);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_b80e7e();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_b80e7e();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_b80e7e();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/b80e7e.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/b80e7e.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..6d792e6
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/b80e7e.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_b80e7e() {
+  uint2 arg_1 = (1u).xx;
+  int arg_2 = 1;
+  float4 res = arg_0.Load(uint4(uint3(arg_1, uint(arg_2)), uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_b80e7e();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_b80e7e();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_b80e7e();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/b80e7e.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/b80e7e.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..6d792e6
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/b80e7e.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_b80e7e() {
+  uint2 arg_1 = (1u).xx;
+  int arg_2 = 1;
+  float4 res = arg_0.Load(uint4(uint3(arg_1, uint(arg_2)), uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_b80e7e();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_b80e7e();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_b80e7e();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/b80e7e.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/b80e7e.wgsl.expected.glsl
new file mode 100644
index 0000000..162ffdb
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/b80e7e.wgsl.expected.glsl
@@ -0,0 +1,93 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba16f) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_b80e7e() {
+  uvec2 arg_1 = uvec2(1u);
+  int arg_2 = 1;
+  vec4 res = texelFetch(arg_0, ivec3(uvec3(arg_1, uint(arg_2))));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_b80e7e();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba16f' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba16f) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_b80e7e() {
+  uvec2 arg_1 = uvec2(1u);
+  int arg_2 = 1;
+  vec4 res = texelFetch(arg_0, ivec3(uvec3(arg_1, uint(arg_2))));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_b80e7e();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba16f' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba16f) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_b80e7e() {
+  uvec2 arg_1 = uvec2(1u);
+  int arg_2 = 1;
+  vec4 res = texelFetch(arg_0, ivec3(uvec3(arg_1, uint(arg_2))));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_b80e7e();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba16f' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/b80e7e.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/b80e7e.wgsl.expected.msl
new file mode 100644
index 0000000..a107559
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/b80e7e.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_b80e7e(texture2d_array<float, access::read> tint_symbol_1, device float4* const tint_symbol_2) {
+  uint2 arg_1 = uint2(1u);
+  int arg_2 = 1;
+  float4 res = tint_symbol_1.read(uint2(arg_1), arg_2);
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<float, access::read> tint_symbol_3, device float4* const tint_symbol_4) {
+  textureLoad_b80e7e(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<float, access::read> tint_symbol_5 [[texture(0)]], device float4* tint_symbol_6 [[buffer(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::read> tint_symbol_7 [[texture(0)]], device float4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_b80e7e(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<float, access::read> tint_symbol_9 [[texture(0)]], device float4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_b80e7e(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/b80e7e.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/b80e7e.wgsl.expected.spvasm
new file mode 100644
index 0000000..55b3056
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/b80e7e.wgsl.expected.spvasm
@@ -0,0 +1,110 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 60
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_b80e7e "textureLoad_b80e7e"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 1 0 2 Rgba16f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+%prevent_dce_block = OpTypeStruct %v4float
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+     %uint_1 = OpConstant %uint 1
+         %22 = OpConstantComposite %v2uint %uint_1 %uint_1
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %25 = OpConstantNull %v2uint
+        %int = OpTypeInt 32 1
+      %int_1 = OpConstant %int 1
+%_ptr_Function_int = OpTypePointer Function %int
+         %30 = OpConstantNull %int
+     %v3uint = OpTypeVector %uint 3
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
+         %46 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_b80e7e = OpFunction %void None %15
+         %18 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v2uint Function %25
+      %arg_2 = OpVariable %_ptr_Function_int Function %30
+        %res = OpVariable %_ptr_Function_v4float Function %5
+               OpStore %arg_1 %22
+               OpStore %arg_2 %int_1
+         %32 = OpLoad %11 %arg_0
+         %34 = OpLoad %v2uint %arg_1
+         %35 = OpCompositeExtract %uint %34 0
+         %36 = OpCompositeExtract %uint %34 1
+         %38 = OpLoad %int %arg_2
+         %37 = OpBitcast %uint %38
+         %39 = OpCompositeConstruct %v3uint %35 %36 %37
+         %31 = OpImageRead %v4float %32 %39
+               OpStore %res %31
+         %44 = OpAccessChain %_ptr_StorageBuffer_v4float %prevent_dce %uint_0
+         %45 = OpLoad %v4float %res
+               OpStore %44 %45
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %46
+         %48 = OpLabel
+         %49 = OpFunctionCall %void %textureLoad_b80e7e
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %51 = OpLabel
+         %52 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %52
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %55 = OpLabel
+         %56 = OpFunctionCall %void %textureLoad_b80e7e
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %58 = OpLabel
+         %59 = OpFunctionCall %void %textureLoad_b80e7e
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/b80e7e.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/b80e7e.wgsl.expected.wgsl
new file mode 100644
index 0000000..e94c9a7
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/b80e7e.wgsl.expected.wgsl
@@ -0,0 +1,28 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba16float, read>;
+
+fn textureLoad_b80e7e() {
+  var arg_1 = vec2<u32>(1u);
+  var arg_2 = 1i;
+  var res : vec4<f32> = textureLoad(arg_0, arg_1, arg_2);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_b80e7e();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_b80e7e();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_b80e7e();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/b94d15.wgsl b/test/tint/builtins/gen/var/textureLoad/b94d15.wgsl
new file mode 100644
index 0000000..b8f5574
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/b94d15.wgsl
@@ -0,0 +1,50 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba8uint, read>;
+
+// fn textureLoad(texture: texture_storage_2d_array<rgba8uint, read>, coords: vec2<i32>, array_index: u32) -> vec4<u32>
+fn textureLoad_b94d15() {
+  var arg_1 = vec2<i32>(1i);
+  var arg_2 = 1u;
+  var res: vec4<u32> = textureLoad(arg_0, arg_1, arg_2);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_b94d15();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_b94d15();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_b94d15();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/b94d15.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/b94d15.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..5d34cad
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/b94d15.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_b94d15() {
+  int2 arg_1 = (1).xx;
+  uint arg_2 = 1u;
+  uint4 res = arg_0.Load(int4(int3(arg_1, int(arg_2)), 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_b94d15();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_b94d15();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_b94d15();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/b94d15.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/b94d15.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..5d34cad
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/b94d15.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_b94d15() {
+  int2 arg_1 = (1).xx;
+  uint arg_2 = 1u;
+  uint4 res = arg_0.Load(int4(int3(arg_1, int(arg_2)), 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_b94d15();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_b94d15();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_b94d15();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/b94d15.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/b94d15.wgsl.expected.glsl
new file mode 100644
index 0000000..f6800fa
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/b94d15.wgsl.expected.glsl
@@ -0,0 +1,93 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba8ui) uniform highp uimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_b94d15() {
+  ivec2 arg_1 = ivec2(1);
+  uint arg_2 = 1u;
+  uvec4 res = texelFetch(arg_0, ivec3(arg_1, int(arg_2)));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_b94d15();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba8ui) uniform highp uimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_b94d15() {
+  ivec2 arg_1 = ivec2(1);
+  uint arg_2 = 1u;
+  uvec4 res = texelFetch(arg_0, ivec3(arg_1, int(arg_2)));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_b94d15();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba8ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba8ui) uniform highp uimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_b94d15() {
+  ivec2 arg_1 = ivec2(1);
+  uint arg_2 = 1u;
+  uvec4 res = texelFetch(arg_0, ivec3(arg_1, int(arg_2)));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_b94d15();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/b94d15.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/b94d15.wgsl.expected.msl
new file mode 100644
index 0000000..a3966bb
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/b94d15.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_b94d15(texture2d_array<uint, access::read> tint_symbol_1, device uint4* const tint_symbol_2) {
+  int2 arg_1 = int2(1);
+  uint arg_2 = 1u;
+  uint4 res = tint_symbol_1.read(uint2(arg_1), arg_2);
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<uint, access::read> tint_symbol_3, device uint4* const tint_symbol_4) {
+  textureLoad_b94d15(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<uint, access::read> tint_symbol_5 [[texture(0)]], device uint4* tint_symbol_6 [[buffer(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<uint, access::read> tint_symbol_7 [[texture(0)]], device uint4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_b94d15(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<uint, access::read> tint_symbol_9 [[texture(0)]], device uint4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_b94d15(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/b94d15.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/b94d15.wgsl.expected.spvasm
new file mode 100644
index 0000000..b59f7b3
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/b94d15.wgsl.expected.spvasm
@@ -0,0 +1,112 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 62
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_b94d15 "textureLoad_b94d15"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 2D 0 1 0 2 Rgba8ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+     %v4uint = OpTypeVector %uint 4
+%prevent_dce_block = OpTypeStruct %v4uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %v2int = OpTypeVector %int 2
+      %int_1 = OpConstant %int 1
+         %24 = OpConstantComposite %v2int %int_1 %int_1
+%_ptr_Function_v2int = OpTypePointer Function %v2int
+         %27 = OpConstantNull %v2int
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %31 = OpConstantNull %uint
+      %v3int = OpTypeVector %int 3
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+         %43 = OpConstantNull %v4uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4uint = OpTypePointer StorageBuffer %v4uint
+         %48 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_b94d15 = OpFunction %void None %17
+         %20 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v2int Function %27
+      %arg_2 = OpVariable %_ptr_Function_uint Function %31
+        %res = OpVariable %_ptr_Function_v4uint Function %43
+               OpStore %arg_1 %24
+               OpStore %arg_2 %uint_1
+         %33 = OpLoad %11 %arg_0
+         %35 = OpLoad %v2int %arg_1
+         %36 = OpCompositeExtract %int %35 0
+         %37 = OpCompositeExtract %int %35 1
+         %39 = OpLoad %uint %arg_2
+         %38 = OpBitcast %int %39
+         %40 = OpCompositeConstruct %v3int %36 %37 %38
+         %32 = OpImageRead %v4uint %33 %40
+               OpStore %res %32
+         %46 = OpAccessChain %_ptr_StorageBuffer_v4uint %prevent_dce %uint_0
+         %47 = OpLoad %v4uint %res
+               OpStore %46 %47
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %48
+         %50 = OpLabel
+         %51 = OpFunctionCall %void %textureLoad_b94d15
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %53 = OpLabel
+         %54 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %54
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %57 = OpLabel
+         %58 = OpFunctionCall %void %textureLoad_b94d15
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %60 = OpLabel
+         %61 = OpFunctionCall %void %textureLoad_b94d15
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/b94d15.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/b94d15.wgsl.expected.wgsl
new file mode 100644
index 0000000..5df7c71
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/b94d15.wgsl.expected.wgsl
@@ -0,0 +1,28 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba8uint, read>;
+
+fn textureLoad_b94d15() {
+  var arg_1 = vec2<i32>(1i);
+  var arg_2 = 1u;
+  var res : vec4<u32> = textureLoad(arg_0, arg_1, arg_2);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_b94d15();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_b94d15();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_b94d15();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/bfd154.wgsl b/test/tint/builtins/gen/var/textureLoad/bfd154.wgsl
new file mode 100644
index 0000000..d8c8c00
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/bfd154.wgsl
@@ -0,0 +1,49 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_3d<r32uint, read>;
+
+// fn textureLoad(texture: texture_storage_3d<r32uint, read>, coords: vec3<i32>) -> vec4<u32>
+fn textureLoad_bfd154() {
+  var arg_1 = vec3<i32>(1i);
+  var res: vec4<u32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_bfd154();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_bfd154();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_bfd154();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/bfd154.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/bfd154.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..696a444
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/bfd154.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture3D<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_bfd154() {
+  int3 arg_1 = (1).xxx;
+  uint4 res = arg_0.Load(int4(arg_1, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_bfd154();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_bfd154();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_bfd154();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/bfd154.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/bfd154.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..696a444
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/bfd154.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture3D<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_bfd154() {
+  int3 arg_1 = (1).xxx;
+  uint4 res = arg_0.Load(int4(arg_1, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_bfd154();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_bfd154();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_bfd154();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/bfd154.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/bfd154.wgsl.expected.glsl
new file mode 100644
index 0000000..78ca226
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/bfd154.wgsl.expected.glsl
@@ -0,0 +1,96 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(r32ui) uniform highp uimage3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_bfd154() {
+  ivec3 arg_1 = ivec3(1);
+  uvec4 res = texelFetch(arg_0, arg_1);
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_bfd154();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:10: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:10: '=' :  cannot convert from ' const float' to ' temp highp 4-component vector of uint'
+ERROR: 0:10: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(r32ui) uniform highp uimage3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_bfd154() {
+  ivec3 arg_1 = ivec3(1);
+  uvec4 res = texelFetch(arg_0, arg_1);
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_bfd154();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:11: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:11: '=' :  cannot convert from ' const float' to ' temp mediump 4-component vector of uint'
+ERROR: 0:11: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(r32ui) uniform highp uimage3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_bfd154() {
+  ivec3 arg_1 = ivec3(1);
+  uvec4 res = texelFetch(arg_0, arg_1);
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_bfd154();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:10: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:10: '=' :  cannot convert from ' const float' to ' temp highp 4-component vector of uint'
+ERROR: 0:10: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/bfd154.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/bfd154.wgsl.expected.msl
new file mode 100644
index 0000000..133d9e1
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/bfd154.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_bfd154(texture3d<uint, access::read> tint_symbol_1, device uint4* const tint_symbol_2) {
+  int3 arg_1 = int3(1);
+  uint4 res = tint_symbol_1.read(uint3(arg_1));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<uint, access::read> tint_symbol_3, device uint4* const tint_symbol_4) {
+  textureLoad_bfd154(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<uint, access::read> tint_symbol_5 [[texture(0)]], device uint4* tint_symbol_6 [[buffer(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<uint, access::read> tint_symbol_7 [[texture(0)]], device uint4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_bfd154(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture3d<uint, access::read> tint_symbol_9 [[texture(0)]], device uint4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_bfd154(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/bfd154.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/bfd154.wgsl.expected.spvasm
new file mode 100644
index 0000000..bd8f7f2
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/bfd154.wgsl.expected.spvasm
@@ -0,0 +1,100 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 52
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_bfd154 "textureLoad_bfd154"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 3D 0 0 0 2 R32ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+     %v4uint = OpTypeVector %uint 4
+%prevent_dce_block = OpTypeStruct %v4uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %v3int = OpTypeVector %int 3
+      %int_1 = OpConstant %int 1
+         %24 = OpConstantComposite %v3int %int_1 %int_1 %int_1
+%_ptr_Function_v3int = OpTypePointer Function %v3int
+         %27 = OpConstantNull %v3int
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+         %33 = OpConstantNull %v4uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4uint = OpTypePointer StorageBuffer %v4uint
+         %38 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_bfd154 = OpFunction %void None %17
+         %20 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v3int Function %27
+        %res = OpVariable %_ptr_Function_v4uint Function %33
+               OpStore %arg_1 %24
+         %29 = OpLoad %11 %arg_0
+         %30 = OpLoad %v3int %arg_1
+         %28 = OpImageRead %v4uint %29 %30
+               OpStore %res %28
+         %36 = OpAccessChain %_ptr_StorageBuffer_v4uint %prevent_dce %uint_0
+         %37 = OpLoad %v4uint %res
+               OpStore %36 %37
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %38
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %textureLoad_bfd154
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %43 = OpLabel
+         %44 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %44
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %47 = OpLabel
+         %48 = OpFunctionCall %void %textureLoad_bfd154
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %50 = OpLabel
+         %51 = OpFunctionCall %void %textureLoad_bfd154
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/bfd154.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/bfd154.wgsl.expected.wgsl
new file mode 100644
index 0000000..cdf8b02
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/bfd154.wgsl.expected.wgsl
@@ -0,0 +1,27 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_3d<r32uint, read>;
+
+fn textureLoad_bfd154() {
+  var arg_1 = vec3<i32>(1i);
+  var res : vec4<u32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_bfd154();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_bfd154();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_bfd154();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/c02b74.wgsl b/test/tint/builtins/gen/var/textureLoad/c02b74.wgsl
new file mode 100644
index 0000000..2217670
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/c02b74.wgsl
@@ -0,0 +1,49 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_1d<rgba16float, read>;
+
+// fn textureLoad(texture: texture_storage_1d<rgba16float, read>, coords: i32) -> vec4<f32>
+fn textureLoad_c02b74() {
+  var arg_1 = 1i;
+  var res: vec4<f32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_c02b74();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_c02b74();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_c02b74();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/c02b74.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/c02b74.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..dc7ee39
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/c02b74.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture1D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_c02b74() {
+  int arg_1 = 1;
+  float4 res = arg_0.Load(int2(arg_1, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_c02b74();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_c02b74();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_c02b74();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/c02b74.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/c02b74.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..dc7ee39
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/c02b74.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture1D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_c02b74() {
+  int arg_1 = 1;
+  float4 res = arg_0.Load(int2(arg_1, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_c02b74();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_c02b74();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_c02b74();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/c02b74.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/c02b74.wgsl.expected.glsl
new file mode 100644
index 0000000..817fa5f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/c02b74.wgsl.expected.glsl
@@ -0,0 +1,90 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba16f) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_c02b74() {
+  int arg_1 = 1;
+  vec4 res = texelFetch(arg_0, ivec2(arg_1, 0));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_c02b74();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba16f' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba16f) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_c02b74() {
+  int arg_1 = 1;
+  vec4 res = texelFetch(arg_0, ivec2(arg_1, 0));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_c02b74();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba16f' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba16f) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_c02b74() {
+  int arg_1 = 1;
+  vec4 res = texelFetch(arg_0, ivec2(arg_1, 0));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_c02b74();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba16f' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/c02b74.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/c02b74.wgsl.expected.msl
new file mode 100644
index 0000000..8c76191
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/c02b74.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_c02b74(texture1d<float, access::read> tint_symbol_1, device float4* const tint_symbol_2) {
+  int arg_1 = 1;
+  float4 res = tint_symbol_1.read(uint(arg_1));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<float, access::read> tint_symbol_3, device float4* const tint_symbol_4) {
+  textureLoad_c02b74(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<float, access::read> tint_symbol_5 [[texture(0)]], device float4* tint_symbol_6 [[buffer(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(texture1d<float, access::read> tint_symbol_7 [[texture(0)]], device float4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_c02b74(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture1d<float, access::read> tint_symbol_9 [[texture(0)]], device float4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_c02b74(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/c02b74.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/c02b74.wgsl.expected.spvasm
new file mode 100644
index 0000000..f507994
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/c02b74.wgsl.expected.spvasm
@@ -0,0 +1,97 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 48
+; Schema: 0
+               OpCapability Shader
+               OpCapability Image1D
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_c02b74 "textureLoad_c02b74"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 1D 0 0 0 2 Rgba16f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+%prevent_dce_block = OpTypeStruct %v4float
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %int_1 = OpConstant %int 1
+%_ptr_Function_int = OpTypePointer Function %int
+         %23 = OpConstantNull %int
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+       %uint = OpTypeInt 32 0
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
+         %34 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_c02b74 = OpFunction %void None %15
+         %18 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_int Function %23
+        %res = OpVariable %_ptr_Function_v4float Function %5
+               OpStore %arg_1 %int_1
+         %25 = OpLoad %11 %arg_0
+         %26 = OpLoad %int %arg_1
+         %24 = OpImageRead %v4float %25 %26
+               OpStore %res %24
+         %32 = OpAccessChain %_ptr_StorageBuffer_v4float %prevent_dce %uint_0
+         %33 = OpLoad %v4float %res
+               OpStore %32 %33
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %34
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %textureLoad_c02b74
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %39 = OpLabel
+         %40 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %40
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %43 = OpLabel
+         %44 = OpFunctionCall %void %textureLoad_c02b74
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %46 = OpLabel
+         %47 = OpFunctionCall %void %textureLoad_c02b74
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/c02b74.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/c02b74.wgsl.expected.wgsl
new file mode 100644
index 0000000..7a4a3a0
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/c02b74.wgsl.expected.wgsl
@@ -0,0 +1,27 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_1d<rgba16float, read>;
+
+fn textureLoad_c02b74() {
+  var arg_1 = 1i;
+  var res : vec4<f32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_c02b74();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_c02b74();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_c02b74();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/c07013.wgsl b/test/tint/builtins/gen/var/textureLoad/c07013.wgsl
new file mode 100644
index 0000000..ce92596
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/c07013.wgsl
@@ -0,0 +1,49 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d<r32float, read>;
+
+// fn textureLoad(texture: texture_storage_2d<r32float, read>, coords: vec2<i32>) -> vec4<f32>
+fn textureLoad_c07013() {
+  var arg_1 = vec2<i32>(1i);
+  var res: vec4<f32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_c07013();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_c07013();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_c07013();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/c07013.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/c07013.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..0e4529d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/c07013.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture2D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_c07013() {
+  int2 arg_1 = (1).xx;
+  float4 res = arg_0.Load(int3(arg_1, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_c07013();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_c07013();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_c07013();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/c07013.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/c07013.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..0e4529d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/c07013.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture2D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_c07013() {
+  int2 arg_1 = (1).xx;
+  float4 res = arg_0.Load(int3(arg_1, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_c07013();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_c07013();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_c07013();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/c07013.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/c07013.wgsl.expected.glsl
new file mode 100644
index 0000000..7bfb2fa
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/c07013.wgsl.expected.glsl
@@ -0,0 +1,96 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(r32f) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_c07013() {
+  ivec2 arg_1 = ivec2(1);
+  vec4 res = texelFetch(arg_0, arg_1);
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_c07013();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:10: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:10: '=' :  cannot convert from ' const float' to ' temp highp 4-component vector of float'
+ERROR: 0:10: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(r32f) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_c07013() {
+  ivec2 arg_1 = ivec2(1);
+  vec4 res = texelFetch(arg_0, arg_1);
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_c07013();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:11: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:11: '=' :  cannot convert from ' const float' to ' temp highp 4-component vector of float'
+ERROR: 0:11: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(r32f) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_c07013() {
+  ivec2 arg_1 = ivec2(1);
+  vec4 res = texelFetch(arg_0, arg_1);
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_c07013();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:10: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:10: '=' :  cannot convert from ' const float' to ' temp highp 4-component vector of float'
+ERROR: 0:10: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/c07013.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/c07013.wgsl.expected.msl
new file mode 100644
index 0000000..3b0ebe5
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/c07013.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_c07013(texture2d<float, access::read> tint_symbol_1, device float4* const tint_symbol_2) {
+  int2 arg_1 = int2(1);
+  float4 res = tint_symbol_1.read(uint2(arg_1));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<float, access::read> tint_symbol_3, device float4* const tint_symbol_4) {
+  textureLoad_c07013(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<float, access::read> tint_symbol_5 [[texture(0)]], device float4* tint_symbol_6 [[buffer(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::read> tint_symbol_7 [[texture(0)]], device float4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_c07013(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d<float, access::read> tint_symbol_9 [[texture(0)]], device float4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_c07013(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/c07013.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/c07013.wgsl.expected.spvasm
new file mode 100644
index 0000000..a68a055
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/c07013.wgsl.expected.spvasm
@@ -0,0 +1,98 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 50
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_c07013 "textureLoad_c07013"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 0 0 2 R32f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+%prevent_dce_block = OpTypeStruct %v4float
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %v2int = OpTypeVector %int 2
+      %int_1 = OpConstant %int 1
+         %22 = OpConstantComposite %v2int %int_1 %int_1
+%_ptr_Function_v2int = OpTypePointer Function %v2int
+         %25 = OpConstantNull %v2int
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+       %uint = OpTypeInt 32 0
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
+         %36 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_c07013 = OpFunction %void None %15
+         %18 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v2int Function %25
+        %res = OpVariable %_ptr_Function_v4float Function %5
+               OpStore %arg_1 %22
+         %27 = OpLoad %11 %arg_0
+         %28 = OpLoad %v2int %arg_1
+         %26 = OpImageRead %v4float %27 %28
+               OpStore %res %26
+         %34 = OpAccessChain %_ptr_StorageBuffer_v4float %prevent_dce %uint_0
+         %35 = OpLoad %v4float %res
+               OpStore %34 %35
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %36
+         %38 = OpLabel
+         %39 = OpFunctionCall %void %textureLoad_c07013
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %41 = OpLabel
+         %42 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %42
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %45 = OpLabel
+         %46 = OpFunctionCall %void %textureLoad_c07013
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %48 = OpLabel
+         %49 = OpFunctionCall %void %textureLoad_c07013
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/c07013.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/c07013.wgsl.expected.wgsl
new file mode 100644
index 0000000..5be8aee
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/c07013.wgsl.expected.wgsl
@@ -0,0 +1,27 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d<r32float, read>;
+
+fn textureLoad_c07013() {
+  var arg_1 = vec2<i32>(1i);
+  var res : vec4<f32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_c07013();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_c07013();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_c07013();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/c21b33.wgsl b/test/tint/builtins/gen/var/textureLoad/c21b33.wgsl
new file mode 100644
index 0000000..ae609da
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/c21b33.wgsl
@@ -0,0 +1,50 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba32uint, read>;
+
+// fn textureLoad(texture: texture_storage_2d_array<rgba32uint, read>, coords: vec2<u32>, array_index: i32) -> vec4<u32>
+fn textureLoad_c21b33() {
+  var arg_1 = vec2<u32>(1u);
+  var arg_2 = 1i;
+  var res: vec4<u32> = textureLoad(arg_0, arg_1, arg_2);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_c21b33();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_c21b33();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_c21b33();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/c21b33.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/c21b33.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..4215a02
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/c21b33.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_c21b33() {
+  uint2 arg_1 = (1u).xx;
+  int arg_2 = 1;
+  uint4 res = arg_0.Load(uint4(uint3(arg_1, uint(arg_2)), uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_c21b33();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_c21b33();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_c21b33();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/c21b33.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/c21b33.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..4215a02
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/c21b33.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_c21b33() {
+  uint2 arg_1 = (1u).xx;
+  int arg_2 = 1;
+  uint4 res = arg_0.Load(uint4(uint3(arg_1, uint(arg_2)), uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_c21b33();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_c21b33();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_c21b33();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/c21b33.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/c21b33.wgsl.expected.glsl
new file mode 100644
index 0000000..9889259
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/c21b33.wgsl.expected.glsl
@@ -0,0 +1,93 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba32ui) uniform highp uimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_c21b33() {
+  uvec2 arg_1 = uvec2(1u);
+  int arg_2 = 1;
+  uvec4 res = texelFetch(arg_0, ivec3(uvec3(arg_1, uint(arg_2))));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_c21b33();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba32ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba32ui) uniform highp uimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_c21b33() {
+  uvec2 arg_1 = uvec2(1u);
+  int arg_2 = 1;
+  uvec4 res = texelFetch(arg_0, ivec3(uvec3(arg_1, uint(arg_2))));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_c21b33();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba32ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba32ui) uniform highp uimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_c21b33() {
+  uvec2 arg_1 = uvec2(1u);
+  int arg_2 = 1;
+  uvec4 res = texelFetch(arg_0, ivec3(uvec3(arg_1, uint(arg_2))));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_c21b33();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba32ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/c21b33.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/c21b33.wgsl.expected.msl
new file mode 100644
index 0000000..ae09abf
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/c21b33.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_c21b33(texture2d_array<uint, access::read> tint_symbol_1, device uint4* const tint_symbol_2) {
+  uint2 arg_1 = uint2(1u);
+  int arg_2 = 1;
+  uint4 res = tint_symbol_1.read(uint2(arg_1), arg_2);
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<uint, access::read> tint_symbol_3, device uint4* const tint_symbol_4) {
+  textureLoad_c21b33(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<uint, access::read> tint_symbol_5 [[texture(0)]], device uint4* tint_symbol_6 [[buffer(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<uint, access::read> tint_symbol_7 [[texture(0)]], device uint4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_c21b33(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<uint, access::read> tint_symbol_9 [[texture(0)]], device uint4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_c21b33(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/c21b33.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/c21b33.wgsl.expected.spvasm
new file mode 100644
index 0000000..dbde882
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/c21b33.wgsl.expected.spvasm
@@ -0,0 +1,112 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 62
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_c21b33 "textureLoad_c21b33"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 2D 0 1 0 2 Rgba32ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+     %v4uint = OpTypeVector %uint 4
+%prevent_dce_block = OpTypeStruct %v4uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+     %v2uint = OpTypeVector %uint 2
+     %uint_1 = OpConstant %uint 1
+         %23 = OpConstantComposite %v2uint %uint_1 %uint_1
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %26 = OpConstantNull %v2uint
+        %int = OpTypeInt 32 1
+      %int_1 = OpConstant %int 1
+%_ptr_Function_int = OpTypePointer Function %int
+         %31 = OpConstantNull %int
+     %v3uint = OpTypeVector %uint 3
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+         %43 = OpConstantNull %v4uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4uint = OpTypePointer StorageBuffer %v4uint
+         %48 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_c21b33 = OpFunction %void None %17
+         %20 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v2uint Function %26
+      %arg_2 = OpVariable %_ptr_Function_int Function %31
+        %res = OpVariable %_ptr_Function_v4uint Function %43
+               OpStore %arg_1 %23
+               OpStore %arg_2 %int_1
+         %33 = OpLoad %11 %arg_0
+         %35 = OpLoad %v2uint %arg_1
+         %36 = OpCompositeExtract %uint %35 0
+         %37 = OpCompositeExtract %uint %35 1
+         %39 = OpLoad %int %arg_2
+         %38 = OpBitcast %uint %39
+         %40 = OpCompositeConstruct %v3uint %36 %37 %38
+         %32 = OpImageRead %v4uint %33 %40
+               OpStore %res %32
+         %46 = OpAccessChain %_ptr_StorageBuffer_v4uint %prevent_dce %uint_0
+         %47 = OpLoad %v4uint %res
+               OpStore %46 %47
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %48
+         %50 = OpLabel
+         %51 = OpFunctionCall %void %textureLoad_c21b33
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %53 = OpLabel
+         %54 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %54
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %57 = OpLabel
+         %58 = OpFunctionCall %void %textureLoad_c21b33
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %60 = OpLabel
+         %61 = OpFunctionCall %void %textureLoad_c21b33
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/c21b33.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/c21b33.wgsl.expected.wgsl
new file mode 100644
index 0000000..2ad8b31
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/c21b33.wgsl.expected.wgsl
@@ -0,0 +1,28 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba32uint, read>;
+
+fn textureLoad_c21b33() {
+  var arg_1 = vec2<u32>(1u);
+  var arg_2 = 1i;
+  var res : vec4<u32> = textureLoad(arg_0, arg_1, arg_2);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_c21b33();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_c21b33();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_c21b33();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/c40dcb.wgsl b/test/tint/builtins/gen/var/textureLoad/c40dcb.wgsl
new file mode 100644
index 0000000..bf76fca
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/c40dcb.wgsl
@@ -0,0 +1,50 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba32uint, read>;
+
+// fn textureLoad(texture: texture_storage_2d_array<rgba32uint, read>, coords: vec2<i32>, array_index: i32) -> vec4<u32>
+fn textureLoad_c40dcb() {
+  var arg_1 = vec2<i32>(1i);
+  var arg_2 = 1i;
+  var res: vec4<u32> = textureLoad(arg_0, arg_1, arg_2);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_c40dcb();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_c40dcb();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_c40dcb();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/c40dcb.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/c40dcb.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..5c751c4
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/c40dcb.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_c40dcb() {
+  int2 arg_1 = (1).xx;
+  int arg_2 = 1;
+  uint4 res = arg_0.Load(int4(int3(arg_1, arg_2), 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_c40dcb();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_c40dcb();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_c40dcb();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/c40dcb.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/c40dcb.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..5c751c4
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/c40dcb.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_c40dcb() {
+  int2 arg_1 = (1).xx;
+  int arg_2 = 1;
+  uint4 res = arg_0.Load(int4(int3(arg_1, arg_2), 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_c40dcb();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_c40dcb();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_c40dcb();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/c40dcb.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/c40dcb.wgsl.expected.glsl
new file mode 100644
index 0000000..63fb806
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/c40dcb.wgsl.expected.glsl
@@ -0,0 +1,93 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba32ui) uniform highp uimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_c40dcb() {
+  ivec2 arg_1 = ivec2(1);
+  int arg_2 = 1;
+  uvec4 res = texelFetch(arg_0, ivec3(arg_1, arg_2));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_c40dcb();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba32ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba32ui) uniform highp uimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_c40dcb() {
+  ivec2 arg_1 = ivec2(1);
+  int arg_2 = 1;
+  uvec4 res = texelFetch(arg_0, ivec3(arg_1, arg_2));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_c40dcb();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba32ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba32ui) uniform highp uimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_c40dcb() {
+  ivec2 arg_1 = ivec2(1);
+  int arg_2 = 1;
+  uvec4 res = texelFetch(arg_0, ivec3(arg_1, arg_2));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_c40dcb();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba32ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/c40dcb.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/c40dcb.wgsl.expected.msl
new file mode 100644
index 0000000..e8d7c37
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/c40dcb.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_c40dcb(texture2d_array<uint, access::read> tint_symbol_1, device uint4* const tint_symbol_2) {
+  int2 arg_1 = int2(1);
+  int arg_2 = 1;
+  uint4 res = tint_symbol_1.read(uint2(arg_1), arg_2);
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<uint, access::read> tint_symbol_3, device uint4* const tint_symbol_4) {
+  textureLoad_c40dcb(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<uint, access::read> tint_symbol_5 [[texture(0)]], device uint4* tint_symbol_6 [[buffer(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<uint, access::read> tint_symbol_7 [[texture(0)]], device uint4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_c40dcb(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<uint, access::read> tint_symbol_9 [[texture(0)]], device uint4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_c40dcb(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/c40dcb.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/c40dcb.wgsl.expected.spvasm
new file mode 100644
index 0000000..bbf9e78
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/c40dcb.wgsl.expected.spvasm
@@ -0,0 +1,110 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 60
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_c40dcb "textureLoad_c40dcb"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 2D 0 1 0 2 Rgba32ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+     %v4uint = OpTypeVector %uint 4
+%prevent_dce_block = OpTypeStruct %v4uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %v2int = OpTypeVector %int 2
+      %int_1 = OpConstant %int 1
+         %24 = OpConstantComposite %v2int %int_1 %int_1
+%_ptr_Function_v2int = OpTypePointer Function %v2int
+         %27 = OpConstantNull %v2int
+%_ptr_Function_int = OpTypePointer Function %int
+         %30 = OpConstantNull %int
+      %v3int = OpTypeVector %int 3
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+         %41 = OpConstantNull %v4uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4uint = OpTypePointer StorageBuffer %v4uint
+         %46 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_c40dcb = OpFunction %void None %17
+         %20 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v2int Function %27
+      %arg_2 = OpVariable %_ptr_Function_int Function %30
+        %res = OpVariable %_ptr_Function_v4uint Function %41
+               OpStore %arg_1 %24
+               OpStore %arg_2 %int_1
+         %32 = OpLoad %11 %arg_0
+         %34 = OpLoad %v2int %arg_1
+         %35 = OpCompositeExtract %int %34 0
+         %36 = OpCompositeExtract %int %34 1
+         %37 = OpLoad %int %arg_2
+         %38 = OpCompositeConstruct %v3int %35 %36 %37
+         %31 = OpImageRead %v4uint %32 %38
+               OpStore %res %31
+         %44 = OpAccessChain %_ptr_StorageBuffer_v4uint %prevent_dce %uint_0
+         %45 = OpLoad %v4uint %res
+               OpStore %44 %45
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %46
+         %48 = OpLabel
+         %49 = OpFunctionCall %void %textureLoad_c40dcb
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %51 = OpLabel
+         %52 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %52
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %55 = OpLabel
+         %56 = OpFunctionCall %void %textureLoad_c40dcb
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %58 = OpLabel
+         %59 = OpFunctionCall %void %textureLoad_c40dcb
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/c40dcb.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/c40dcb.wgsl.expected.wgsl
new file mode 100644
index 0000000..f413f28
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/c40dcb.wgsl.expected.wgsl
@@ -0,0 +1,28 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba32uint, read>;
+
+fn textureLoad_c40dcb() {
+  var arg_1 = vec2<i32>(1i);
+  var arg_2 = 1i;
+  var res : vec4<u32> = textureLoad(arg_0, arg_1, arg_2);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_c40dcb();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_c40dcb();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_c40dcb();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/c456bc.wgsl b/test/tint/builtins/gen/var/textureLoad/c456bc.wgsl
new file mode 100644
index 0000000..5b69cf7
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/c456bc.wgsl
@@ -0,0 +1,49 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_3d<r32float, read>;
+
+// fn textureLoad(texture: texture_storage_3d<r32float, read>, coords: vec3<i32>) -> vec4<f32>
+fn textureLoad_c456bc() {
+  var arg_1 = vec3<i32>(1i);
+  var res: vec4<f32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_c456bc();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_c456bc();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_c456bc();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/c456bc.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/c456bc.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..1d06e48
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/c456bc.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture3D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_c456bc() {
+  int3 arg_1 = (1).xxx;
+  float4 res = arg_0.Load(int4(arg_1, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_c456bc();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_c456bc();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_c456bc();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/c456bc.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/c456bc.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..1d06e48
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/c456bc.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture3D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_c456bc() {
+  int3 arg_1 = (1).xxx;
+  float4 res = arg_0.Load(int4(arg_1, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_c456bc();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_c456bc();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_c456bc();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/c456bc.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/c456bc.wgsl.expected.glsl
new file mode 100644
index 0000000..149666a
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/c456bc.wgsl.expected.glsl
@@ -0,0 +1,96 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(r32f) uniform highp image3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_c456bc() {
+  ivec3 arg_1 = ivec3(1);
+  vec4 res = texelFetch(arg_0, arg_1);
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_c456bc();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:10: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:10: '=' :  cannot convert from ' const float' to ' temp highp 4-component vector of float'
+ERROR: 0:10: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(r32f) uniform highp image3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_c456bc() {
+  ivec3 arg_1 = ivec3(1);
+  vec4 res = texelFetch(arg_0, arg_1);
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_c456bc();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:11: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:11: '=' :  cannot convert from ' const float' to ' temp highp 4-component vector of float'
+ERROR: 0:11: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(r32f) uniform highp image3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_c456bc() {
+  ivec3 arg_1 = ivec3(1);
+  vec4 res = texelFetch(arg_0, arg_1);
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_c456bc();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:10: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:10: '=' :  cannot convert from ' const float' to ' temp highp 4-component vector of float'
+ERROR: 0:10: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/c456bc.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/c456bc.wgsl.expected.msl
new file mode 100644
index 0000000..bd725c9
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/c456bc.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_c456bc(texture3d<float, access::read> tint_symbol_1, device float4* const tint_symbol_2) {
+  int3 arg_1 = int3(1);
+  float4 res = tint_symbol_1.read(uint3(arg_1));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<float, access::read> tint_symbol_3, device float4* const tint_symbol_4) {
+  textureLoad_c456bc(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<float, access::read> tint_symbol_5 [[texture(0)]], device float4* tint_symbol_6 [[buffer(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::read> tint_symbol_7 [[texture(0)]], device float4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_c456bc(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture3d<float, access::read> tint_symbol_9 [[texture(0)]], device float4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_c456bc(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/c456bc.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/c456bc.wgsl.expected.spvasm
new file mode 100644
index 0000000..2c6b21d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/c456bc.wgsl.expected.spvasm
@@ -0,0 +1,98 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 50
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_c456bc "textureLoad_c456bc"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 3D 0 0 0 2 R32f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+%prevent_dce_block = OpTypeStruct %v4float
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %v3int = OpTypeVector %int 3
+      %int_1 = OpConstant %int 1
+         %22 = OpConstantComposite %v3int %int_1 %int_1 %int_1
+%_ptr_Function_v3int = OpTypePointer Function %v3int
+         %25 = OpConstantNull %v3int
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+       %uint = OpTypeInt 32 0
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
+         %36 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_c456bc = OpFunction %void None %15
+         %18 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v3int Function %25
+        %res = OpVariable %_ptr_Function_v4float Function %5
+               OpStore %arg_1 %22
+         %27 = OpLoad %11 %arg_0
+         %28 = OpLoad %v3int %arg_1
+         %26 = OpImageRead %v4float %27 %28
+               OpStore %res %26
+         %34 = OpAccessChain %_ptr_StorageBuffer_v4float %prevent_dce %uint_0
+         %35 = OpLoad %v4float %res
+               OpStore %34 %35
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %36
+         %38 = OpLabel
+         %39 = OpFunctionCall %void %textureLoad_c456bc
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %41 = OpLabel
+         %42 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %42
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %45 = OpLabel
+         %46 = OpFunctionCall %void %textureLoad_c456bc
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %48 = OpLabel
+         %49 = OpFunctionCall %void %textureLoad_c456bc
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/c456bc.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/c456bc.wgsl.expected.wgsl
new file mode 100644
index 0000000..b7dc898
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/c456bc.wgsl.expected.wgsl
@@ -0,0 +1,27 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_3d<r32float, read>;
+
+fn textureLoad_c456bc() {
+  var arg_1 = vec3<i32>(1i);
+  var res : vec4<f32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_c456bc();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_c456bc();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_c456bc();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/c5791b.wgsl b/test/tint/builtins/gen/var/textureLoad/c5791b.wgsl
new file mode 100644
index 0000000..c5c1f1c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/c5791b.wgsl
@@ -0,0 +1,49 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d<rgba16sint, read>;
+
+// fn textureLoad(texture: texture_storage_2d<rgba16sint, read>, coords: vec2<u32>) -> vec4<i32>
+fn textureLoad_c5791b() {
+  var arg_1 = vec2<u32>(1u);
+  var res: vec4<i32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_c5791b();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_c5791b();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_c5791b();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/c5791b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/c5791b.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..c554f99
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/c5791b.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture2D<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_c5791b() {
+  uint2 arg_1 = (1u).xx;
+  int4 res = arg_0.Load(uint3(arg_1, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_c5791b();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_c5791b();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_c5791b();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/c5791b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/c5791b.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..c554f99
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/c5791b.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture2D<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_c5791b() {
+  uint2 arg_1 = (1u).xx;
+  int4 res = arg_0.Load(uint3(arg_1, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_c5791b();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_c5791b();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_c5791b();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/c5791b.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/c5791b.wgsl.expected.glsl
new file mode 100644
index 0000000..cad6d01
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/c5791b.wgsl.expected.glsl
@@ -0,0 +1,90 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba16i) uniform highp iimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_c5791b() {
+  uvec2 arg_1 = uvec2(1u);
+  ivec4 res = texelFetch(arg_0, ivec2(arg_1));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_c5791b();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba16i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba16i) uniform highp iimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_c5791b() {
+  uvec2 arg_1 = uvec2(1u);
+  ivec4 res = texelFetch(arg_0, ivec2(arg_1));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_c5791b();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba16i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba16i) uniform highp iimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_c5791b() {
+  uvec2 arg_1 = uvec2(1u);
+  ivec4 res = texelFetch(arg_0, ivec2(arg_1));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_c5791b();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba16i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/c5791b.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/c5791b.wgsl.expected.msl
new file mode 100644
index 0000000..f7dd9f2
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/c5791b.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_c5791b(texture2d<int, access::read> tint_symbol_1, device int4* const tint_symbol_2) {
+  uint2 arg_1 = uint2(1u);
+  int4 res = tint_symbol_1.read(uint2(arg_1));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<int, access::read> tint_symbol_3, device int4* const tint_symbol_4) {
+  textureLoad_c5791b(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<int, access::read> tint_symbol_5 [[texture(0)]], device int4* tint_symbol_6 [[buffer(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<int, access::read> tint_symbol_7 [[texture(0)]], device int4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_c5791b(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d<int, access::read> tint_symbol_9 [[texture(0)]], device int4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_c5791b(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/c5791b.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/c5791b.wgsl.expected.spvasm
new file mode 100644
index 0000000..a19fd0b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/c5791b.wgsl.expected.spvasm
@@ -0,0 +1,100 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 52
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_c5791b "textureLoad_c5791b"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 2D 0 0 0 2 Rgba16i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+      %v4int = OpTypeVector %int 4
+%prevent_dce_block = OpTypeStruct %v4int
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+     %uint_1 = OpConstant %uint 1
+         %24 = OpConstantComposite %v2uint %uint_1 %uint_1
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %27 = OpConstantNull %v2uint
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+         %33 = OpConstantNull %v4int
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4int = OpTypePointer StorageBuffer %v4int
+         %38 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_c5791b = OpFunction %void None %17
+         %20 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v2uint Function %27
+        %res = OpVariable %_ptr_Function_v4int Function %33
+               OpStore %arg_1 %24
+         %29 = OpLoad %11 %arg_0
+         %30 = OpLoad %v2uint %arg_1
+         %28 = OpImageRead %v4int %29 %30
+               OpStore %res %28
+         %36 = OpAccessChain %_ptr_StorageBuffer_v4int %prevent_dce %uint_0
+         %37 = OpLoad %v4int %res
+               OpStore %36 %37
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %38
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %textureLoad_c5791b
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %43 = OpLabel
+         %44 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %44
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %47 = OpLabel
+         %48 = OpFunctionCall %void %textureLoad_c5791b
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %50 = OpLabel
+         %51 = OpFunctionCall %void %textureLoad_c5791b
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/c5791b.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/c5791b.wgsl.expected.wgsl
new file mode 100644
index 0000000..eaeb3e7
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/c5791b.wgsl.expected.wgsl
@@ -0,0 +1,27 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d<rgba16sint, read>;
+
+fn textureLoad_c5791b() {
+  var arg_1 = vec2<u32>(1u);
+  var res : vec4<i32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_c5791b();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_c5791b();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_c5791b();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/c66b20.wgsl b/test/tint/builtins/gen/var/textureLoad/c66b20.wgsl
new file mode 100644
index 0000000..de9f0ce
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/c66b20.wgsl
@@ -0,0 +1,49 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d<r32sint, read>;
+
+// fn textureLoad(texture: texture_storage_2d<r32sint, read>, coords: vec2<u32>) -> vec4<i32>
+fn textureLoad_c66b20() {
+  var arg_1 = vec2<u32>(1u);
+  var res: vec4<i32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_c66b20();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_c66b20();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_c66b20();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/c66b20.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/c66b20.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..b1d6aff
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/c66b20.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture2D<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_c66b20() {
+  uint2 arg_1 = (1u).xx;
+  int4 res = arg_0.Load(uint3(arg_1, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_c66b20();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_c66b20();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_c66b20();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/c66b20.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/c66b20.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..b1d6aff
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/c66b20.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture2D<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_c66b20() {
+  uint2 arg_1 = (1u).xx;
+  int4 res = arg_0.Load(uint3(arg_1, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_c66b20();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_c66b20();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_c66b20();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/c66b20.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/c66b20.wgsl.expected.glsl
new file mode 100644
index 0000000..6b4143d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/c66b20.wgsl.expected.glsl
@@ -0,0 +1,96 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(r32i) uniform highp iimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_c66b20() {
+  uvec2 arg_1 = uvec2(1u);
+  ivec4 res = texelFetch(arg_0, ivec2(arg_1));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_c66b20();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:10: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:10: '=' :  cannot convert from ' const float' to ' temp highp 4-component vector of int'
+ERROR: 0:10: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(r32i) uniform highp iimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_c66b20() {
+  uvec2 arg_1 = uvec2(1u);
+  ivec4 res = texelFetch(arg_0, ivec2(arg_1));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_c66b20();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:11: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:11: '=' :  cannot convert from ' const float' to ' temp mediump 4-component vector of int'
+ERROR: 0:11: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(r32i) uniform highp iimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_c66b20() {
+  uvec2 arg_1 = uvec2(1u);
+  ivec4 res = texelFetch(arg_0, ivec2(arg_1));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_c66b20();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:10: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:10: '=' :  cannot convert from ' const float' to ' temp highp 4-component vector of int'
+ERROR: 0:10: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/c66b20.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/c66b20.wgsl.expected.msl
new file mode 100644
index 0000000..5dd5982
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/c66b20.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_c66b20(texture2d<int, access::read> tint_symbol_1, device int4* const tint_symbol_2) {
+  uint2 arg_1 = uint2(1u);
+  int4 res = tint_symbol_1.read(uint2(arg_1));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<int, access::read> tint_symbol_3, device int4* const tint_symbol_4) {
+  textureLoad_c66b20(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<int, access::read> tint_symbol_5 [[texture(0)]], device int4* tint_symbol_6 [[buffer(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<int, access::read> tint_symbol_7 [[texture(0)]], device int4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_c66b20(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d<int, access::read> tint_symbol_9 [[texture(0)]], device int4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_c66b20(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/c66b20.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/c66b20.wgsl.expected.spvasm
new file mode 100644
index 0000000..6cd25b8
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/c66b20.wgsl.expected.spvasm
@@ -0,0 +1,100 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 52
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_c66b20 "textureLoad_c66b20"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 2D 0 0 0 2 R32i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+      %v4int = OpTypeVector %int 4
+%prevent_dce_block = OpTypeStruct %v4int
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+     %uint_1 = OpConstant %uint 1
+         %24 = OpConstantComposite %v2uint %uint_1 %uint_1
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %27 = OpConstantNull %v2uint
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+         %33 = OpConstantNull %v4int
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4int = OpTypePointer StorageBuffer %v4int
+         %38 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_c66b20 = OpFunction %void None %17
+         %20 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v2uint Function %27
+        %res = OpVariable %_ptr_Function_v4int Function %33
+               OpStore %arg_1 %24
+         %29 = OpLoad %11 %arg_0
+         %30 = OpLoad %v2uint %arg_1
+         %28 = OpImageRead %v4int %29 %30
+               OpStore %res %28
+         %36 = OpAccessChain %_ptr_StorageBuffer_v4int %prevent_dce %uint_0
+         %37 = OpLoad %v4int %res
+               OpStore %36 %37
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %38
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %textureLoad_c66b20
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %43 = OpLabel
+         %44 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %44
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %47 = OpLabel
+         %48 = OpFunctionCall %void %textureLoad_c66b20
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %50 = OpLabel
+         %51 = OpFunctionCall %void %textureLoad_c66b20
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/c66b20.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/c66b20.wgsl.expected.wgsl
new file mode 100644
index 0000000..03ffd24
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/c66b20.wgsl.expected.wgsl
@@ -0,0 +1,27 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d<r32sint, read>;
+
+fn textureLoad_c66b20() {
+  var arg_1 = vec2<u32>(1u);
+  var res : vec4<i32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_c66b20();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_c66b20();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_c66b20();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/c7cbed.wgsl b/test/tint/builtins/gen/var/textureLoad/c7cbed.wgsl
new file mode 100644
index 0000000..9bf46c6
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/c7cbed.wgsl
@@ -0,0 +1,49 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_1d<r32float, read>;
+
+// fn textureLoad(texture: texture_storage_1d<r32float, read>, coords: i32) -> vec4<f32>
+fn textureLoad_c7cbed() {
+  var arg_1 = 1i;
+  var res: vec4<f32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_c7cbed();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_c7cbed();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_c7cbed();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/c7cbed.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/c7cbed.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..7a6b589
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/c7cbed.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture1D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_c7cbed() {
+  int arg_1 = 1;
+  float4 res = arg_0.Load(int2(arg_1, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_c7cbed();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_c7cbed();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_c7cbed();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/c7cbed.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/c7cbed.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..7a6b589
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/c7cbed.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture1D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_c7cbed() {
+  int arg_1 = 1;
+  float4 res = arg_0.Load(int2(arg_1, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_c7cbed();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_c7cbed();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_c7cbed();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/c7cbed.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/c7cbed.wgsl.expected.glsl
new file mode 100644
index 0000000..407e416
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/c7cbed.wgsl.expected.glsl
@@ -0,0 +1,96 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(r32f) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_c7cbed() {
+  int arg_1 = 1;
+  vec4 res = texelFetch(arg_0, ivec2(arg_1, 0));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_c7cbed();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:10: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:10: '=' :  cannot convert from ' const float' to ' temp highp 4-component vector of float'
+ERROR: 0:10: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(r32f) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_c7cbed() {
+  int arg_1 = 1;
+  vec4 res = texelFetch(arg_0, ivec2(arg_1, 0));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_c7cbed();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:11: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:11: '=' :  cannot convert from ' const float' to ' temp highp 4-component vector of float'
+ERROR: 0:11: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(r32f) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_c7cbed() {
+  int arg_1 = 1;
+  vec4 res = texelFetch(arg_0, ivec2(arg_1, 0));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_c7cbed();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:10: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:10: '=' :  cannot convert from ' const float' to ' temp highp 4-component vector of float'
+ERROR: 0:10: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/c7cbed.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/c7cbed.wgsl.expected.msl
new file mode 100644
index 0000000..c5e48e9
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/c7cbed.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_c7cbed(texture1d<float, access::read> tint_symbol_1, device float4* const tint_symbol_2) {
+  int arg_1 = 1;
+  float4 res = tint_symbol_1.read(uint(arg_1));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<float, access::read> tint_symbol_3, device float4* const tint_symbol_4) {
+  textureLoad_c7cbed(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<float, access::read> tint_symbol_5 [[texture(0)]], device float4* tint_symbol_6 [[buffer(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(texture1d<float, access::read> tint_symbol_7 [[texture(0)]], device float4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_c7cbed(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture1d<float, access::read> tint_symbol_9 [[texture(0)]], device float4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_c7cbed(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/c7cbed.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/c7cbed.wgsl.expected.spvasm
new file mode 100644
index 0000000..ca90810
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/c7cbed.wgsl.expected.spvasm
@@ -0,0 +1,97 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 48
+; Schema: 0
+               OpCapability Shader
+               OpCapability Image1D
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_c7cbed "textureLoad_c7cbed"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 1D 0 0 0 2 R32f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+%prevent_dce_block = OpTypeStruct %v4float
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %int_1 = OpConstant %int 1
+%_ptr_Function_int = OpTypePointer Function %int
+         %23 = OpConstantNull %int
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+       %uint = OpTypeInt 32 0
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
+         %34 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_c7cbed = OpFunction %void None %15
+         %18 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_int Function %23
+        %res = OpVariable %_ptr_Function_v4float Function %5
+               OpStore %arg_1 %int_1
+         %25 = OpLoad %11 %arg_0
+         %26 = OpLoad %int %arg_1
+         %24 = OpImageRead %v4float %25 %26
+               OpStore %res %24
+         %32 = OpAccessChain %_ptr_StorageBuffer_v4float %prevent_dce %uint_0
+         %33 = OpLoad %v4float %res
+               OpStore %32 %33
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %34
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %textureLoad_c7cbed
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %39 = OpLabel
+         %40 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %40
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %43 = OpLabel
+         %44 = OpFunctionCall %void %textureLoad_c7cbed
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %46 = OpLabel
+         %47 = OpFunctionCall %void %textureLoad_c7cbed
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/c7cbed.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/c7cbed.wgsl.expected.wgsl
new file mode 100644
index 0000000..0116d17
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/c7cbed.wgsl.expected.wgsl
@@ -0,0 +1,27 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_1d<r32float, read>;
+
+fn textureLoad_c7cbed() {
+  var arg_1 = 1i;
+  var res : vec4<f32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_c7cbed();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_c7cbed();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_c7cbed();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/c8ed19.wgsl b/test/tint/builtins/gen/var/textureLoad/c8ed19.wgsl
new file mode 100644
index 0000000..8517975
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/c8ed19.wgsl
@@ -0,0 +1,50 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rg32uint, read>;
+
+// fn textureLoad(texture: texture_storage_2d_array<rg32uint, read>, coords: vec2<u32>, array_index: u32) -> vec4<u32>
+fn textureLoad_c8ed19() {
+  var arg_1 = vec2<u32>(1u);
+  var arg_2 = 1u;
+  var res: vec4<u32> = textureLoad(arg_0, arg_1, arg_2);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_c8ed19();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_c8ed19();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_c8ed19();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/c8ed19.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/c8ed19.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..732b13b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/c8ed19.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_c8ed19() {
+  uint2 arg_1 = (1u).xx;
+  uint arg_2 = 1u;
+  uint4 res = arg_0.Load(uint4(uint3(arg_1, arg_2), uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_c8ed19();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_c8ed19();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_c8ed19();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/c8ed19.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/c8ed19.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..732b13b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/c8ed19.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_c8ed19() {
+  uint2 arg_1 = (1u).xx;
+  uint arg_2 = 1u;
+  uint4 res = arg_0.Load(uint4(uint3(arg_1, arg_2), uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_c8ed19();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_c8ed19();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_c8ed19();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/c8ed19.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/c8ed19.wgsl.expected.glsl
new file mode 100644
index 0000000..cef22ac
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/c8ed19.wgsl.expected.glsl
@@ -0,0 +1,96 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rg32ui) uniform highp uimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_c8ed19() {
+  uvec2 arg_1 = uvec2(1u);
+  uint arg_2 = 1u;
+  uvec4 res = texelFetch(arg_0, ivec3(uvec3(arg_1, arg_2)));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_c8ed19();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rg32ui) uniform highp uimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_c8ed19() {
+  uvec2 arg_1 = uvec2(1u);
+  uint arg_2 = 1u;
+  uvec4 res = texelFetch(arg_0, ivec3(uvec3(arg_1, arg_2)));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_c8ed19();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'image load-store format' : not supported with this profile: es
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rg32ui) uniform highp uimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_c8ed19() {
+  uvec2 arg_1 = uvec2(1u);
+  uint arg_2 = 1u;
+  uvec4 res = texelFetch(arg_0, ivec3(uvec3(arg_1, arg_2)));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_c8ed19();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/c8ed19.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/c8ed19.wgsl.expected.msl
new file mode 100644
index 0000000..3cca71c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/c8ed19.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_c8ed19(texture2d_array<uint, access::read> tint_symbol_1, device uint4* const tint_symbol_2) {
+  uint2 arg_1 = uint2(1u);
+  uint arg_2 = 1u;
+  uint4 res = tint_symbol_1.read(uint2(arg_1), arg_2);
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<uint, access::read> tint_symbol_3, device uint4* const tint_symbol_4) {
+  textureLoad_c8ed19(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<uint, access::read> tint_symbol_5 [[texture(0)]], device uint4* tint_symbol_6 [[buffer(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<uint, access::read> tint_symbol_7 [[texture(0)]], device uint4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_c8ed19(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<uint, access::read> tint_symbol_9 [[texture(0)]], device uint4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_c8ed19(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/c8ed19.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/c8ed19.wgsl.expected.spvasm
new file mode 100644
index 0000000..8a9a7d1
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/c8ed19.wgsl.expected.spvasm
@@ -0,0 +1,110 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 59
+; Schema: 0
+               OpCapability Shader
+               OpCapability StorageImageExtendedFormats
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_c8ed19 "textureLoad_c8ed19"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 2D 0 1 0 2 Rg32ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+     %v4uint = OpTypeVector %uint 4
+%prevent_dce_block = OpTypeStruct %v4uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+     %v2uint = OpTypeVector %uint 2
+     %uint_1 = OpConstant %uint 1
+         %23 = OpConstantComposite %v2uint %uint_1 %uint_1
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %26 = OpConstantNull %v2uint
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %29 = OpConstantNull %uint
+     %v3uint = OpTypeVector %uint 3
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+         %40 = OpConstantNull %v4uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4uint = OpTypePointer StorageBuffer %v4uint
+         %45 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_c8ed19 = OpFunction %void None %17
+         %20 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v2uint Function %26
+      %arg_2 = OpVariable %_ptr_Function_uint Function %29
+        %res = OpVariable %_ptr_Function_v4uint Function %40
+               OpStore %arg_1 %23
+               OpStore %arg_2 %uint_1
+         %31 = OpLoad %11 %arg_0
+         %33 = OpLoad %v2uint %arg_1
+         %34 = OpCompositeExtract %uint %33 0
+         %35 = OpCompositeExtract %uint %33 1
+         %36 = OpLoad %uint %arg_2
+         %37 = OpCompositeConstruct %v3uint %34 %35 %36
+         %30 = OpImageRead %v4uint %31 %37
+               OpStore %res %30
+         %43 = OpAccessChain %_ptr_StorageBuffer_v4uint %prevent_dce %uint_0
+         %44 = OpLoad %v4uint %res
+               OpStore %43 %44
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %45
+         %47 = OpLabel
+         %48 = OpFunctionCall %void %textureLoad_c8ed19
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %50 = OpLabel
+         %51 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %51
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %54 = OpLabel
+         %55 = OpFunctionCall %void %textureLoad_c8ed19
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %57 = OpLabel
+         %58 = OpFunctionCall %void %textureLoad_c8ed19
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/c8ed19.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/c8ed19.wgsl.expected.wgsl
new file mode 100644
index 0000000..852c5cd
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/c8ed19.wgsl.expected.wgsl
@@ -0,0 +1,28 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rg32uint, read>;
+
+fn textureLoad_c8ed19() {
+  var arg_1 = vec2<u32>(1u);
+  var arg_2 = 1u;
+  var res : vec4<u32> = textureLoad(arg_0, arg_1, arg_2);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_c8ed19();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_c8ed19();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_c8ed19();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/c9cc40.wgsl b/test/tint/builtins/gen/var/textureLoad/c9cc40.wgsl
new file mode 100644
index 0000000..55535a8
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/c9cc40.wgsl
@@ -0,0 +1,49 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_1d<rgba8sint, read>;
+
+// fn textureLoad(texture: texture_storage_1d<rgba8sint, read>, coords: i32) -> vec4<i32>
+fn textureLoad_c9cc40() {
+  var arg_1 = 1i;
+  var res: vec4<i32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_c9cc40();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_c9cc40();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_c9cc40();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/c9cc40.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/c9cc40.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..0d7b649
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/c9cc40.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture1D<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_c9cc40() {
+  int arg_1 = 1;
+  int4 res = arg_0.Load(int2(arg_1, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_c9cc40();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_c9cc40();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_c9cc40();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/c9cc40.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/c9cc40.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..0d7b649
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/c9cc40.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture1D<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_c9cc40() {
+  int arg_1 = 1;
+  int4 res = arg_0.Load(int2(arg_1, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_c9cc40();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_c9cc40();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_c9cc40();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/c9cc40.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/c9cc40.wgsl.expected.glsl
new file mode 100644
index 0000000..ef8776a
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/c9cc40.wgsl.expected.glsl
@@ -0,0 +1,90 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba8i) uniform highp iimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_c9cc40() {
+  int arg_1 = 1;
+  ivec4 res = texelFetch(arg_0, ivec2(arg_1, 0));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_c9cc40();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba8i) uniform highp iimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_c9cc40() {
+  int arg_1 = 1;
+  ivec4 res = texelFetch(arg_0, ivec2(arg_1, 0));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_c9cc40();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba8i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba8i) uniform highp iimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_c9cc40() {
+  int arg_1 = 1;
+  ivec4 res = texelFetch(arg_0, ivec2(arg_1, 0));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_c9cc40();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/c9cc40.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/c9cc40.wgsl.expected.msl
new file mode 100644
index 0000000..29134c9
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/c9cc40.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_c9cc40(texture1d<int, access::read> tint_symbol_1, device int4* const tint_symbol_2) {
+  int arg_1 = 1;
+  int4 res = tint_symbol_1.read(uint(arg_1));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<int, access::read> tint_symbol_3, device int4* const tint_symbol_4) {
+  textureLoad_c9cc40(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<int, access::read> tint_symbol_5 [[texture(0)]], device int4* tint_symbol_6 [[buffer(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(texture1d<int, access::read> tint_symbol_7 [[texture(0)]], device int4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_c9cc40(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture1d<int, access::read> tint_symbol_9 [[texture(0)]], device int4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_c9cc40(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/c9cc40.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/c9cc40.wgsl.expected.spvasm
new file mode 100644
index 0000000..efc4fee
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/c9cc40.wgsl.expected.spvasm
@@ -0,0 +1,99 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 50
+; Schema: 0
+               OpCapability Shader
+               OpCapability Image1D
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_c9cc40 "textureLoad_c9cc40"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 1D 0 0 0 2 Rgba8i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+      %v4int = OpTypeVector %int 4
+%prevent_dce_block = OpTypeStruct %v4int
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+      %int_1 = OpConstant %int 1
+%_ptr_Function_int = OpTypePointer Function %int
+         %24 = OpConstantNull %int
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+         %30 = OpConstantNull %v4int
+       %uint = OpTypeInt 32 0
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4int = OpTypePointer StorageBuffer %v4int
+         %36 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_c9cc40 = OpFunction %void None %17
+         %20 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_int Function %24
+        %res = OpVariable %_ptr_Function_v4int Function %30
+               OpStore %arg_1 %int_1
+         %26 = OpLoad %11 %arg_0
+         %27 = OpLoad %int %arg_1
+         %25 = OpImageRead %v4int %26 %27
+               OpStore %res %25
+         %34 = OpAccessChain %_ptr_StorageBuffer_v4int %prevent_dce %uint_0
+         %35 = OpLoad %v4int %res
+               OpStore %34 %35
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %36
+         %38 = OpLabel
+         %39 = OpFunctionCall %void %textureLoad_c9cc40
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %41 = OpLabel
+         %42 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %42
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %45 = OpLabel
+         %46 = OpFunctionCall %void %textureLoad_c9cc40
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %48 = OpLabel
+         %49 = OpFunctionCall %void %textureLoad_c9cc40
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/c9cc40.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/c9cc40.wgsl.expected.wgsl
new file mode 100644
index 0000000..633daed
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/c9cc40.wgsl.expected.wgsl
@@ -0,0 +1,27 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_1d<rgba8sint, read>;
+
+fn textureLoad_c9cc40() {
+  var arg_1 = 1i;
+  var res : vec4<i32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_c9cc40();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_c9cc40();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_c9cc40();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/cdd343.wgsl b/test/tint/builtins/gen/var/textureLoad/cdd343.wgsl
new file mode 100644
index 0000000..43e9ac2
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/cdd343.wgsl
@@ -0,0 +1,50 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba32uint, read>;
+
+// fn textureLoad(texture: texture_storage_2d_array<rgba32uint, read>, coords: vec2<i32>, array_index: u32) -> vec4<u32>
+fn textureLoad_cdd343() {
+  var arg_1 = vec2<i32>(1i);
+  var arg_2 = 1u;
+  var res: vec4<u32> = textureLoad(arg_0, arg_1, arg_2);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_cdd343();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_cdd343();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_cdd343();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/cdd343.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/cdd343.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..7af2615
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/cdd343.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_cdd343() {
+  int2 arg_1 = (1).xx;
+  uint arg_2 = 1u;
+  uint4 res = arg_0.Load(int4(int3(arg_1, int(arg_2)), 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_cdd343();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_cdd343();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_cdd343();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/cdd343.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/cdd343.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..7af2615
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/cdd343.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_cdd343() {
+  int2 arg_1 = (1).xx;
+  uint arg_2 = 1u;
+  uint4 res = arg_0.Load(int4(int3(arg_1, int(arg_2)), 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_cdd343();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_cdd343();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_cdd343();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/cdd343.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/cdd343.wgsl.expected.glsl
new file mode 100644
index 0000000..07df8a7
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/cdd343.wgsl.expected.glsl
@@ -0,0 +1,93 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba32ui) uniform highp uimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_cdd343() {
+  ivec2 arg_1 = ivec2(1);
+  uint arg_2 = 1u;
+  uvec4 res = texelFetch(arg_0, ivec3(arg_1, int(arg_2)));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_cdd343();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba32ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba32ui) uniform highp uimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_cdd343() {
+  ivec2 arg_1 = ivec2(1);
+  uint arg_2 = 1u;
+  uvec4 res = texelFetch(arg_0, ivec3(arg_1, int(arg_2)));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_cdd343();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba32ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba32ui) uniform highp uimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_cdd343() {
+  ivec2 arg_1 = ivec2(1);
+  uint arg_2 = 1u;
+  uvec4 res = texelFetch(arg_0, ivec3(arg_1, int(arg_2)));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_cdd343();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba32ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/cdd343.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/cdd343.wgsl.expected.msl
new file mode 100644
index 0000000..9219cf3
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/cdd343.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_cdd343(texture2d_array<uint, access::read> tint_symbol_1, device uint4* const tint_symbol_2) {
+  int2 arg_1 = int2(1);
+  uint arg_2 = 1u;
+  uint4 res = tint_symbol_1.read(uint2(arg_1), arg_2);
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<uint, access::read> tint_symbol_3, device uint4* const tint_symbol_4) {
+  textureLoad_cdd343(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<uint, access::read> tint_symbol_5 [[texture(0)]], device uint4* tint_symbol_6 [[buffer(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<uint, access::read> tint_symbol_7 [[texture(0)]], device uint4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_cdd343(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<uint, access::read> tint_symbol_9 [[texture(0)]], device uint4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_cdd343(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/cdd343.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/cdd343.wgsl.expected.spvasm
new file mode 100644
index 0000000..7822031
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/cdd343.wgsl.expected.spvasm
@@ -0,0 +1,112 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 62
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_cdd343 "textureLoad_cdd343"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 2D 0 1 0 2 Rgba32ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+     %v4uint = OpTypeVector %uint 4
+%prevent_dce_block = OpTypeStruct %v4uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %v2int = OpTypeVector %int 2
+      %int_1 = OpConstant %int 1
+         %24 = OpConstantComposite %v2int %int_1 %int_1
+%_ptr_Function_v2int = OpTypePointer Function %v2int
+         %27 = OpConstantNull %v2int
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %31 = OpConstantNull %uint
+      %v3int = OpTypeVector %int 3
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+         %43 = OpConstantNull %v4uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4uint = OpTypePointer StorageBuffer %v4uint
+         %48 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_cdd343 = OpFunction %void None %17
+         %20 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v2int Function %27
+      %arg_2 = OpVariable %_ptr_Function_uint Function %31
+        %res = OpVariable %_ptr_Function_v4uint Function %43
+               OpStore %arg_1 %24
+               OpStore %arg_2 %uint_1
+         %33 = OpLoad %11 %arg_0
+         %35 = OpLoad %v2int %arg_1
+         %36 = OpCompositeExtract %int %35 0
+         %37 = OpCompositeExtract %int %35 1
+         %39 = OpLoad %uint %arg_2
+         %38 = OpBitcast %int %39
+         %40 = OpCompositeConstruct %v3int %36 %37 %38
+         %32 = OpImageRead %v4uint %33 %40
+               OpStore %res %32
+         %46 = OpAccessChain %_ptr_StorageBuffer_v4uint %prevent_dce %uint_0
+         %47 = OpLoad %v4uint %res
+               OpStore %46 %47
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %48
+         %50 = OpLabel
+         %51 = OpFunctionCall %void %textureLoad_cdd343
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %53 = OpLabel
+         %54 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %54
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %57 = OpLabel
+         %58 = OpFunctionCall %void %textureLoad_cdd343
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %60 = OpLabel
+         %61 = OpFunctionCall %void %textureLoad_cdd343
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/cdd343.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/cdd343.wgsl.expected.wgsl
new file mode 100644
index 0000000..137d56f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/cdd343.wgsl.expected.wgsl
@@ -0,0 +1,28 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba32uint, read>;
+
+fn textureLoad_cdd343() {
+  var arg_1 = vec2<i32>(1i);
+  var arg_2 = 1u;
+  var res : vec4<u32> = textureLoad(arg_0, arg_1, arg_2);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_cdd343();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_cdd343();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_cdd343();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/d02afc.wgsl b/test/tint/builtins/gen/var/textureLoad/d02afc.wgsl
new file mode 100644
index 0000000..ddbee92
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/d02afc.wgsl
@@ -0,0 +1,49 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_3d<rgba32sint, read>;
+
+// fn textureLoad(texture: texture_storage_3d<rgba32sint, read>, coords: vec3<u32>) -> vec4<i32>
+fn textureLoad_d02afc() {
+  var arg_1 = vec3<u32>(1u);
+  var res: vec4<i32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_d02afc();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_d02afc();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_d02afc();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/d02afc.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/d02afc.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..a97d054
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/d02afc.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture3D<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_d02afc() {
+  uint3 arg_1 = (1u).xxx;
+  int4 res = arg_0.Load(uint4(arg_1, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_d02afc();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_d02afc();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_d02afc();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/d02afc.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/d02afc.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..a97d054
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/d02afc.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture3D<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_d02afc() {
+  uint3 arg_1 = (1u).xxx;
+  int4 res = arg_0.Load(uint4(arg_1, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_d02afc();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_d02afc();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_d02afc();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/d02afc.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/d02afc.wgsl.expected.glsl
new file mode 100644
index 0000000..177f616
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/d02afc.wgsl.expected.glsl
@@ -0,0 +1,90 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba32i) uniform highp iimage3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_d02afc() {
+  uvec3 arg_1 = uvec3(1u);
+  ivec4 res = texelFetch(arg_0, ivec3(arg_1));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_d02afc();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba32i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba32i) uniform highp iimage3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_d02afc() {
+  uvec3 arg_1 = uvec3(1u);
+  ivec4 res = texelFetch(arg_0, ivec3(arg_1));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_d02afc();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba32i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba32i) uniform highp iimage3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_d02afc() {
+  uvec3 arg_1 = uvec3(1u);
+  ivec4 res = texelFetch(arg_0, ivec3(arg_1));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_d02afc();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba32i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/d02afc.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/d02afc.wgsl.expected.msl
new file mode 100644
index 0000000..57a5025
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/d02afc.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_d02afc(texture3d<int, access::read> tint_symbol_1, device int4* const tint_symbol_2) {
+  uint3 arg_1 = uint3(1u);
+  int4 res = tint_symbol_1.read(uint3(arg_1));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<int, access::read> tint_symbol_3, device int4* const tint_symbol_4) {
+  textureLoad_d02afc(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<int, access::read> tint_symbol_5 [[texture(0)]], device int4* tint_symbol_6 [[buffer(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<int, access::read> tint_symbol_7 [[texture(0)]], device int4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_d02afc(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture3d<int, access::read> tint_symbol_9 [[texture(0)]], device int4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_d02afc(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/d02afc.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/d02afc.wgsl.expected.spvasm
new file mode 100644
index 0000000..0d6d8e5
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/d02afc.wgsl.expected.spvasm
@@ -0,0 +1,100 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 52
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_d02afc "textureLoad_d02afc"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 3D 0 0 0 2 Rgba32i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+      %v4int = OpTypeVector %int 4
+%prevent_dce_block = OpTypeStruct %v4int
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v3uint = OpTypeVector %uint 3
+     %uint_1 = OpConstant %uint 1
+         %24 = OpConstantComposite %v3uint %uint_1 %uint_1 %uint_1
+%_ptr_Function_v3uint = OpTypePointer Function %v3uint
+         %27 = OpConstantNull %v3uint
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+         %33 = OpConstantNull %v4int
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4int = OpTypePointer StorageBuffer %v4int
+         %38 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_d02afc = OpFunction %void None %17
+         %20 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v3uint Function %27
+        %res = OpVariable %_ptr_Function_v4int Function %33
+               OpStore %arg_1 %24
+         %29 = OpLoad %11 %arg_0
+         %30 = OpLoad %v3uint %arg_1
+         %28 = OpImageRead %v4int %29 %30
+               OpStore %res %28
+         %36 = OpAccessChain %_ptr_StorageBuffer_v4int %prevent_dce %uint_0
+         %37 = OpLoad %v4int %res
+               OpStore %36 %37
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %38
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %textureLoad_d02afc
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %43 = OpLabel
+         %44 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %44
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %47 = OpLabel
+         %48 = OpFunctionCall %void %textureLoad_d02afc
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %50 = OpLabel
+         %51 = OpFunctionCall %void %textureLoad_d02afc
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/d02afc.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/d02afc.wgsl.expected.wgsl
new file mode 100644
index 0000000..eb60c51
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/d02afc.wgsl.expected.wgsl
@@ -0,0 +1,27 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_3d<rgba32sint, read>;
+
+fn textureLoad_d02afc() {
+  var arg_1 = vec3<u32>(1u);
+  var res : vec4<i32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_d02afc();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_d02afc();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_d02afc();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/d357bb.wgsl b/test/tint/builtins/gen/var/textureLoad/d357bb.wgsl
new file mode 100644
index 0000000..148eb7e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/d357bb.wgsl
@@ -0,0 +1,49 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_1d<bgra8unorm, read>;
+
+// fn textureLoad(texture: texture_storage_1d<bgra8unorm, read>, coords: i32) -> vec4<f32>
+fn textureLoad_d357bb() {
+  var arg_1 = 1i;
+  var res: vec4<f32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_d357bb();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_d357bb();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_d357bb();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/d357bb.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/d357bb.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..c262a73
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/d357bb.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture1D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_d357bb() {
+  int arg_1 = 1;
+  float4 res = arg_0.Load(int2(arg_1, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_d357bb();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_d357bb();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_d357bb();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/d357bb.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/d357bb.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..c262a73
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/d357bb.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture1D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_d357bb() {
+  int arg_1 = 1;
+  float4 res = arg_0.Load(int2(arg_1, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_d357bb();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_d357bb();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_d357bb();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/d357bb.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/d357bb.wgsl.expected.glsl
new file mode 100644
index 0000000..f2ef05a
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/d357bb.wgsl.expected.glsl
@@ -0,0 +1,90 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba8) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_d357bb() {
+  int arg_1 = 1;
+  vec4 res = texelFetch(arg_0, ivec2(arg_1, 0));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_d357bb();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba8) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_d357bb() {
+  int arg_1 = 1;
+  vec4 res = texelFetch(arg_0, ivec2(arg_1, 0));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_d357bb();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba8' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba8) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_d357bb() {
+  int arg_1 = 1;
+  vec4 res = texelFetch(arg_0, ivec2(arg_1, 0));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_d357bb();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/d357bb.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/d357bb.wgsl.expected.msl
new file mode 100644
index 0000000..09f8002
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/d357bb.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_d357bb(texture1d<float, access::read> tint_symbol_1, device float4* const tint_symbol_2) {
+  int arg_1 = 1;
+  float4 res = tint_symbol_1.read(uint(arg_1));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<float, access::read> tint_symbol_3, device float4* const tint_symbol_4) {
+  textureLoad_d357bb(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<float, access::read> tint_symbol_5 [[texture(0)]], device float4* tint_symbol_6 [[buffer(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(texture1d<float, access::read> tint_symbol_7 [[texture(0)]], device float4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_d357bb(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture1d<float, access::read> tint_symbol_9 [[texture(0)]], device float4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_d357bb(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/d357bb.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/d357bb.wgsl.expected.spvasm
new file mode 100644
index 0000000..0f1ff61
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/d357bb.wgsl.expected.spvasm
@@ -0,0 +1,97 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 48
+; Schema: 0
+               OpCapability Shader
+               OpCapability Image1D
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_d357bb "textureLoad_d357bb"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 1D 0 0 0 2 Rgba8
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+%prevent_dce_block = OpTypeStruct %v4float
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %int_1 = OpConstant %int 1
+%_ptr_Function_int = OpTypePointer Function %int
+         %23 = OpConstantNull %int
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+       %uint = OpTypeInt 32 0
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
+         %34 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_d357bb = OpFunction %void None %15
+         %18 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_int Function %23
+        %res = OpVariable %_ptr_Function_v4float Function %5
+               OpStore %arg_1 %int_1
+         %25 = OpLoad %11 %arg_0
+         %26 = OpLoad %int %arg_1
+         %24 = OpImageRead %v4float %25 %26
+               OpStore %res %24
+         %32 = OpAccessChain %_ptr_StorageBuffer_v4float %prevent_dce %uint_0
+         %33 = OpLoad %v4float %res
+               OpStore %32 %33
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %34
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %textureLoad_d357bb
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %39 = OpLabel
+         %40 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %40
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %43 = OpLabel
+         %44 = OpFunctionCall %void %textureLoad_d357bb
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %46 = OpLabel
+         %47 = OpFunctionCall %void %textureLoad_d357bb
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/d357bb.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/d357bb.wgsl.expected.wgsl
new file mode 100644
index 0000000..5a55513
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/d357bb.wgsl.expected.wgsl
@@ -0,0 +1,27 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_1d<bgra8unorm, read>;
+
+fn textureLoad_d357bb() {
+  var arg_1 = 1i;
+  var res : vec4<f32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_d357bb();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_d357bb();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_d357bb();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/d4df19.wgsl b/test/tint/builtins/gen/var/textureLoad/d4df19.wgsl
new file mode 100644
index 0000000..6a7421c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/d4df19.wgsl
@@ -0,0 +1,49 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d<r32uint, read>;
+
+// fn textureLoad(texture: texture_storage_2d<r32uint, read>, coords: vec2<u32>) -> vec4<u32>
+fn textureLoad_d4df19() {
+  var arg_1 = vec2<u32>(1u);
+  var res: vec4<u32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_d4df19();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_d4df19();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_d4df19();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/d4df19.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/d4df19.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..d3f085b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/d4df19.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture2D<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_d4df19() {
+  uint2 arg_1 = (1u).xx;
+  uint4 res = arg_0.Load(uint3(arg_1, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_d4df19();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_d4df19();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_d4df19();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/d4df19.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/d4df19.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..d3f085b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/d4df19.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture2D<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_d4df19() {
+  uint2 arg_1 = (1u).xx;
+  uint4 res = arg_0.Load(uint3(arg_1, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_d4df19();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_d4df19();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_d4df19();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/d4df19.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/d4df19.wgsl.expected.glsl
new file mode 100644
index 0000000..09215a8
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/d4df19.wgsl.expected.glsl
@@ -0,0 +1,96 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(r32ui) uniform highp uimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_d4df19() {
+  uvec2 arg_1 = uvec2(1u);
+  uvec4 res = texelFetch(arg_0, ivec2(arg_1));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_d4df19();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:10: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:10: '=' :  cannot convert from ' const float' to ' temp highp 4-component vector of uint'
+ERROR: 0:10: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(r32ui) uniform highp uimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_d4df19() {
+  uvec2 arg_1 = uvec2(1u);
+  uvec4 res = texelFetch(arg_0, ivec2(arg_1));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_d4df19();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:11: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:11: '=' :  cannot convert from ' const float' to ' temp mediump 4-component vector of uint'
+ERROR: 0:11: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(r32ui) uniform highp uimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_d4df19() {
+  uvec2 arg_1 = uvec2(1u);
+  uvec4 res = texelFetch(arg_0, ivec2(arg_1));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_d4df19();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:10: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:10: '=' :  cannot convert from ' const float' to ' temp highp 4-component vector of uint'
+ERROR: 0:10: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/d4df19.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/d4df19.wgsl.expected.msl
new file mode 100644
index 0000000..877cb14
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/d4df19.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_d4df19(texture2d<uint, access::read> tint_symbol_1, device uint4* const tint_symbol_2) {
+  uint2 arg_1 = uint2(1u);
+  uint4 res = tint_symbol_1.read(uint2(arg_1));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<uint, access::read> tint_symbol_3, device uint4* const tint_symbol_4) {
+  textureLoad_d4df19(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<uint, access::read> tint_symbol_5 [[texture(0)]], device uint4* tint_symbol_6 [[buffer(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<uint, access::read> tint_symbol_7 [[texture(0)]], device uint4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_d4df19(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d<uint, access::read> tint_symbol_9 [[texture(0)]], device uint4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_d4df19(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/d4df19.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/d4df19.wgsl.expected.spvasm
new file mode 100644
index 0000000..284f027
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/d4df19.wgsl.expected.spvasm
@@ -0,0 +1,99 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 51
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_d4df19 "textureLoad_d4df19"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 2D 0 0 0 2 R32ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+     %v4uint = OpTypeVector %uint 4
+%prevent_dce_block = OpTypeStruct %v4uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+     %v2uint = OpTypeVector %uint 2
+     %uint_1 = OpConstant %uint 1
+         %23 = OpConstantComposite %v2uint %uint_1 %uint_1
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %26 = OpConstantNull %v2uint
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+         %32 = OpConstantNull %v4uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4uint = OpTypePointer StorageBuffer %v4uint
+         %37 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_d4df19 = OpFunction %void None %17
+         %20 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v2uint Function %26
+        %res = OpVariable %_ptr_Function_v4uint Function %32
+               OpStore %arg_1 %23
+         %28 = OpLoad %11 %arg_0
+         %29 = OpLoad %v2uint %arg_1
+         %27 = OpImageRead %v4uint %28 %29
+               OpStore %res %27
+         %35 = OpAccessChain %_ptr_StorageBuffer_v4uint %prevent_dce %uint_0
+         %36 = OpLoad %v4uint %res
+               OpStore %35 %36
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %37
+         %39 = OpLabel
+         %40 = OpFunctionCall %void %textureLoad_d4df19
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %42 = OpLabel
+         %43 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %43
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %46 = OpLabel
+         %47 = OpFunctionCall %void %textureLoad_d4df19
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %49 = OpLabel
+         %50 = OpFunctionCall %void %textureLoad_d4df19
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/d4df19.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/d4df19.wgsl.expected.wgsl
new file mode 100644
index 0000000..b5736cd
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/d4df19.wgsl.expected.wgsl
@@ -0,0 +1,27 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d<r32uint, read>;
+
+fn textureLoad_d4df19() {
+  var arg_1 = vec2<u32>(1u);
+  var res : vec4<u32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_d4df19();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_d4df19();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_d4df19();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/d5c48d.wgsl b/test/tint/builtins/gen/var/textureLoad/d5c48d.wgsl
new file mode 100644
index 0000000..930742c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/d5c48d.wgsl
@@ -0,0 +1,49 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d<rgba32float, read>;
+
+// fn textureLoad(texture: texture_storage_2d<rgba32float, read>, coords: vec2<i32>) -> vec4<f32>
+fn textureLoad_d5c48d() {
+  var arg_1 = vec2<i32>(1i);
+  var res: vec4<f32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_d5c48d();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_d5c48d();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_d5c48d();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/d5c48d.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/d5c48d.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..4feaa53
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/d5c48d.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture2D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_d5c48d() {
+  int2 arg_1 = (1).xx;
+  float4 res = arg_0.Load(int3(arg_1, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_d5c48d();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_d5c48d();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_d5c48d();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/d5c48d.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/d5c48d.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..4feaa53
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/d5c48d.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture2D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_d5c48d() {
+  int2 arg_1 = (1).xx;
+  float4 res = arg_0.Load(int3(arg_1, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_d5c48d();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_d5c48d();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_d5c48d();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/d5c48d.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/d5c48d.wgsl.expected.glsl
new file mode 100644
index 0000000..6494399
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/d5c48d.wgsl.expected.glsl
@@ -0,0 +1,90 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba32f) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_d5c48d() {
+  ivec2 arg_1 = ivec2(1);
+  vec4 res = texelFetch(arg_0, arg_1);
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_d5c48d();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba32f' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba32f) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_d5c48d() {
+  ivec2 arg_1 = ivec2(1);
+  vec4 res = texelFetch(arg_0, arg_1);
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_d5c48d();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba32f' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba32f) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_d5c48d() {
+  ivec2 arg_1 = ivec2(1);
+  vec4 res = texelFetch(arg_0, arg_1);
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_d5c48d();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba32f' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/d5c48d.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/d5c48d.wgsl.expected.msl
new file mode 100644
index 0000000..337c3c6
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/d5c48d.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_d5c48d(texture2d<float, access::read> tint_symbol_1, device float4* const tint_symbol_2) {
+  int2 arg_1 = int2(1);
+  float4 res = tint_symbol_1.read(uint2(arg_1));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<float, access::read> tint_symbol_3, device float4* const tint_symbol_4) {
+  textureLoad_d5c48d(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<float, access::read> tint_symbol_5 [[texture(0)]], device float4* tint_symbol_6 [[buffer(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::read> tint_symbol_7 [[texture(0)]], device float4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_d5c48d(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d<float, access::read> tint_symbol_9 [[texture(0)]], device float4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_d5c48d(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/d5c48d.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/d5c48d.wgsl.expected.spvasm
new file mode 100644
index 0000000..301d69f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/d5c48d.wgsl.expected.spvasm
@@ -0,0 +1,98 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 50
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_d5c48d "textureLoad_d5c48d"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 0 0 2 Rgba32f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+%prevent_dce_block = OpTypeStruct %v4float
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %v2int = OpTypeVector %int 2
+      %int_1 = OpConstant %int 1
+         %22 = OpConstantComposite %v2int %int_1 %int_1
+%_ptr_Function_v2int = OpTypePointer Function %v2int
+         %25 = OpConstantNull %v2int
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+       %uint = OpTypeInt 32 0
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
+         %36 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_d5c48d = OpFunction %void None %15
+         %18 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v2int Function %25
+        %res = OpVariable %_ptr_Function_v4float Function %5
+               OpStore %arg_1 %22
+         %27 = OpLoad %11 %arg_0
+         %28 = OpLoad %v2int %arg_1
+         %26 = OpImageRead %v4float %27 %28
+               OpStore %res %26
+         %34 = OpAccessChain %_ptr_StorageBuffer_v4float %prevent_dce %uint_0
+         %35 = OpLoad %v4float %res
+               OpStore %34 %35
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %36
+         %38 = OpLabel
+         %39 = OpFunctionCall %void %textureLoad_d5c48d
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %41 = OpLabel
+         %42 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %42
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %45 = OpLabel
+         %46 = OpFunctionCall %void %textureLoad_d5c48d
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %48 = OpLabel
+         %49 = OpFunctionCall %void %textureLoad_d5c48d
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/d5c48d.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/d5c48d.wgsl.expected.wgsl
new file mode 100644
index 0000000..15090a2
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/d5c48d.wgsl.expected.wgsl
@@ -0,0 +1,27 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d<rgba32float, read>;
+
+fn textureLoad_d5c48d() {
+  var arg_1 = vec2<i32>(1i);
+  var res : vec4<f32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_d5c48d();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_d5c48d();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_d5c48d();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/d81c57.wgsl b/test/tint/builtins/gen/var/textureLoad/d81c57.wgsl
new file mode 100644
index 0000000..087f884
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/d81c57.wgsl
@@ -0,0 +1,49 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_1d<rg32float, read>;
+
+// fn textureLoad(texture: texture_storage_1d<rg32float, read>, coords: i32) -> vec4<f32>
+fn textureLoad_d81c57() {
+  var arg_1 = 1i;
+  var res: vec4<f32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_d81c57();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_d81c57();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_d81c57();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/d81c57.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/d81c57.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..cbc5fbb
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/d81c57.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture1D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_d81c57() {
+  int arg_1 = 1;
+  float4 res = arg_0.Load(int2(arg_1, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_d81c57();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_d81c57();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_d81c57();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/d81c57.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/d81c57.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..cbc5fbb
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/d81c57.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture1D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_d81c57() {
+  int arg_1 = 1;
+  float4 res = arg_0.Load(int2(arg_1, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_d81c57();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_d81c57();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_d81c57();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/d81c57.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/d81c57.wgsl.expected.glsl
new file mode 100644
index 0000000..60c3bce
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/d81c57.wgsl.expected.glsl
@@ -0,0 +1,93 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rg32f) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_d81c57() {
+  int arg_1 = 1;
+  vec4 res = texelFetch(arg_0, ivec2(arg_1, 0));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_d81c57();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rg32f) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_d81c57() {
+  int arg_1 = 1;
+  vec4 res = texelFetch(arg_0, ivec2(arg_1, 0));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_d81c57();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'image load-store format' : not supported with this profile: es
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rg32f) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_d81c57() {
+  int arg_1 = 1;
+  vec4 res = texelFetch(arg_0, ivec2(arg_1, 0));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_d81c57();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/d81c57.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/d81c57.wgsl.expected.msl
new file mode 100644
index 0000000..4535488
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/d81c57.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_d81c57(texture1d<float, access::read> tint_symbol_1, device float4* const tint_symbol_2) {
+  int arg_1 = 1;
+  float4 res = tint_symbol_1.read(uint(arg_1));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<float, access::read> tint_symbol_3, device float4* const tint_symbol_4) {
+  textureLoad_d81c57(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<float, access::read> tint_symbol_5 [[texture(0)]], device float4* tint_symbol_6 [[buffer(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(texture1d<float, access::read> tint_symbol_7 [[texture(0)]], device float4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_d81c57(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture1d<float, access::read> tint_symbol_9 [[texture(0)]], device float4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_d81c57(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/d81c57.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/d81c57.wgsl.expected.spvasm
new file mode 100644
index 0000000..6b4c489
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/d81c57.wgsl.expected.spvasm
@@ -0,0 +1,98 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 48
+; Schema: 0
+               OpCapability Shader
+               OpCapability Image1D
+               OpCapability StorageImageExtendedFormats
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_d81c57 "textureLoad_d81c57"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 1D 0 0 0 2 Rg32f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+%prevent_dce_block = OpTypeStruct %v4float
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %int_1 = OpConstant %int 1
+%_ptr_Function_int = OpTypePointer Function %int
+         %23 = OpConstantNull %int
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+       %uint = OpTypeInt 32 0
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
+         %34 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_d81c57 = OpFunction %void None %15
+         %18 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_int Function %23
+        %res = OpVariable %_ptr_Function_v4float Function %5
+               OpStore %arg_1 %int_1
+         %25 = OpLoad %11 %arg_0
+         %26 = OpLoad %int %arg_1
+         %24 = OpImageRead %v4float %25 %26
+               OpStore %res %24
+         %32 = OpAccessChain %_ptr_StorageBuffer_v4float %prevent_dce %uint_0
+         %33 = OpLoad %v4float %res
+               OpStore %32 %33
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %34
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %textureLoad_d81c57
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %39 = OpLabel
+         %40 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %40
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %43 = OpLabel
+         %44 = OpFunctionCall %void %textureLoad_d81c57
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %46 = OpLabel
+         %47 = OpFunctionCall %void %textureLoad_d81c57
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/d81c57.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/d81c57.wgsl.expected.wgsl
new file mode 100644
index 0000000..41ef931
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/d81c57.wgsl.expected.wgsl
@@ -0,0 +1,27 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_1d<rg32float, read>;
+
+fn textureLoad_d81c57() {
+  var arg_1 = 1i;
+  var res : vec4<f32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_d81c57();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_d81c57();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_d81c57();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/d85d61.wgsl b/test/tint/builtins/gen/var/textureLoad/d85d61.wgsl
new file mode 100644
index 0000000..dd5170f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/d85d61.wgsl
@@ -0,0 +1,49 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d<rgba32uint, read>;
+
+// fn textureLoad(texture: texture_storage_2d<rgba32uint, read>, coords: vec2<u32>) -> vec4<u32>
+fn textureLoad_d85d61() {
+  var arg_1 = vec2<u32>(1u);
+  var res: vec4<u32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_d85d61();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_d85d61();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_d85d61();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/d85d61.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/d85d61.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..aea7386
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/d85d61.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture2D<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_d85d61() {
+  uint2 arg_1 = (1u).xx;
+  uint4 res = arg_0.Load(uint3(arg_1, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_d85d61();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_d85d61();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_d85d61();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/d85d61.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/d85d61.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..aea7386
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/d85d61.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture2D<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_d85d61() {
+  uint2 arg_1 = (1u).xx;
+  uint4 res = arg_0.Load(uint3(arg_1, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_d85d61();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_d85d61();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_d85d61();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/d85d61.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/d85d61.wgsl.expected.glsl
new file mode 100644
index 0000000..26b0d9e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/d85d61.wgsl.expected.glsl
@@ -0,0 +1,90 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba32ui) uniform highp uimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_d85d61() {
+  uvec2 arg_1 = uvec2(1u);
+  uvec4 res = texelFetch(arg_0, ivec2(arg_1));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_d85d61();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba32ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba32ui) uniform highp uimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_d85d61() {
+  uvec2 arg_1 = uvec2(1u);
+  uvec4 res = texelFetch(arg_0, ivec2(arg_1));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_d85d61();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba32ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba32ui) uniform highp uimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_d85d61() {
+  uvec2 arg_1 = uvec2(1u);
+  uvec4 res = texelFetch(arg_0, ivec2(arg_1));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_d85d61();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba32ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/d85d61.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/d85d61.wgsl.expected.msl
new file mode 100644
index 0000000..611a4d6
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/d85d61.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_d85d61(texture2d<uint, access::read> tint_symbol_1, device uint4* const tint_symbol_2) {
+  uint2 arg_1 = uint2(1u);
+  uint4 res = tint_symbol_1.read(uint2(arg_1));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<uint, access::read> tint_symbol_3, device uint4* const tint_symbol_4) {
+  textureLoad_d85d61(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<uint, access::read> tint_symbol_5 [[texture(0)]], device uint4* tint_symbol_6 [[buffer(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<uint, access::read> tint_symbol_7 [[texture(0)]], device uint4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_d85d61(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d<uint, access::read> tint_symbol_9 [[texture(0)]], device uint4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_d85d61(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/d85d61.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/d85d61.wgsl.expected.spvasm
new file mode 100644
index 0000000..835b229
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/d85d61.wgsl.expected.spvasm
@@ -0,0 +1,99 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 51
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_d85d61 "textureLoad_d85d61"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 2D 0 0 0 2 Rgba32ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+     %v4uint = OpTypeVector %uint 4
+%prevent_dce_block = OpTypeStruct %v4uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+     %v2uint = OpTypeVector %uint 2
+     %uint_1 = OpConstant %uint 1
+         %23 = OpConstantComposite %v2uint %uint_1 %uint_1
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %26 = OpConstantNull %v2uint
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+         %32 = OpConstantNull %v4uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4uint = OpTypePointer StorageBuffer %v4uint
+         %37 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_d85d61 = OpFunction %void None %17
+         %20 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v2uint Function %26
+        %res = OpVariable %_ptr_Function_v4uint Function %32
+               OpStore %arg_1 %23
+         %28 = OpLoad %11 %arg_0
+         %29 = OpLoad %v2uint %arg_1
+         %27 = OpImageRead %v4uint %28 %29
+               OpStore %res %27
+         %35 = OpAccessChain %_ptr_StorageBuffer_v4uint %prevent_dce %uint_0
+         %36 = OpLoad %v4uint %res
+               OpStore %35 %36
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %37
+         %39 = OpLabel
+         %40 = OpFunctionCall %void %textureLoad_d85d61
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %42 = OpLabel
+         %43 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %43
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %46 = OpLabel
+         %47 = OpFunctionCall %void %textureLoad_d85d61
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %49 = OpLabel
+         %50 = OpFunctionCall %void %textureLoad_d85d61
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/d85d61.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/d85d61.wgsl.expected.wgsl
new file mode 100644
index 0000000..2300d96
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/d85d61.wgsl.expected.wgsl
@@ -0,0 +1,27 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d<rgba32uint, read>;
+
+fn textureLoad_d85d61() {
+  var arg_1 = vec2<u32>(1u);
+  var res : vec4<u32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_d85d61();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_d85d61();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_d85d61();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/d8617f.wgsl b/test/tint/builtins/gen/var/textureLoad/d8617f.wgsl
new file mode 100644
index 0000000..e193881
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/d8617f.wgsl
@@ -0,0 +1,50 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rg32sint, read>;
+
+// fn textureLoad(texture: texture_storage_2d_array<rg32sint, read>, coords: vec2<i32>, array_index: i32) -> vec4<i32>
+fn textureLoad_d8617f() {
+  var arg_1 = vec2<i32>(1i);
+  var arg_2 = 1i;
+  var res: vec4<i32> = textureLoad(arg_0, arg_1, arg_2);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_d8617f();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_d8617f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_d8617f();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/d8617f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/d8617f.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..38c41d6
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/d8617f.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_d8617f() {
+  int2 arg_1 = (1).xx;
+  int arg_2 = 1;
+  int4 res = arg_0.Load(int4(int3(arg_1, arg_2), 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_d8617f();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_d8617f();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_d8617f();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/d8617f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/d8617f.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..38c41d6
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/d8617f.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_d8617f() {
+  int2 arg_1 = (1).xx;
+  int arg_2 = 1;
+  int4 res = arg_0.Load(int4(int3(arg_1, arg_2), 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_d8617f();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_d8617f();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_d8617f();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/d8617f.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/d8617f.wgsl.expected.glsl
new file mode 100644
index 0000000..e6fb12f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/d8617f.wgsl.expected.glsl
@@ -0,0 +1,96 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rg32i) uniform highp iimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_d8617f() {
+  ivec2 arg_1 = ivec2(1);
+  int arg_2 = 1;
+  ivec4 res = texelFetch(arg_0, ivec3(arg_1, arg_2));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_d8617f();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rg32i) uniform highp iimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_d8617f() {
+  ivec2 arg_1 = ivec2(1);
+  int arg_2 = 1;
+  ivec4 res = texelFetch(arg_0, ivec3(arg_1, arg_2));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_d8617f();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'image load-store format' : not supported with this profile: es
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rg32i) uniform highp iimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_d8617f() {
+  ivec2 arg_1 = ivec2(1);
+  int arg_2 = 1;
+  ivec4 res = texelFetch(arg_0, ivec3(arg_1, arg_2));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_d8617f();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/d8617f.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/d8617f.wgsl.expected.msl
new file mode 100644
index 0000000..4112bda
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/d8617f.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_d8617f(texture2d_array<int, access::read> tint_symbol_1, device int4* const tint_symbol_2) {
+  int2 arg_1 = int2(1);
+  int arg_2 = 1;
+  int4 res = tint_symbol_1.read(uint2(arg_1), arg_2);
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<int, access::read> tint_symbol_3, device int4* const tint_symbol_4) {
+  textureLoad_d8617f(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<int, access::read> tint_symbol_5 [[texture(0)]], device int4* tint_symbol_6 [[buffer(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<int, access::read> tint_symbol_7 [[texture(0)]], device int4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_d8617f(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<int, access::read> tint_symbol_9 [[texture(0)]], device int4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_d8617f(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/d8617f.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/d8617f.wgsl.expected.spvasm
new file mode 100644
index 0000000..5d08b21
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/d8617f.wgsl.expected.spvasm
@@ -0,0 +1,111 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 60
+; Schema: 0
+               OpCapability Shader
+               OpCapability StorageImageExtendedFormats
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_d8617f "textureLoad_d8617f"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 2D 0 1 0 2 Rg32i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+      %v4int = OpTypeVector %int 4
+%prevent_dce_block = OpTypeStruct %v4int
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+      %v2int = OpTypeVector %int 2
+      %int_1 = OpConstant %int 1
+         %23 = OpConstantComposite %v2int %int_1 %int_1
+%_ptr_Function_v2int = OpTypePointer Function %v2int
+         %26 = OpConstantNull %v2int
+%_ptr_Function_int = OpTypePointer Function %int
+         %29 = OpConstantNull %int
+      %v3int = OpTypeVector %int 3
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+         %40 = OpConstantNull %v4int
+       %uint = OpTypeInt 32 0
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4int = OpTypePointer StorageBuffer %v4int
+         %46 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_d8617f = OpFunction %void None %17
+         %20 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v2int Function %26
+      %arg_2 = OpVariable %_ptr_Function_int Function %29
+        %res = OpVariable %_ptr_Function_v4int Function %40
+               OpStore %arg_1 %23
+               OpStore %arg_2 %int_1
+         %31 = OpLoad %11 %arg_0
+         %33 = OpLoad %v2int %arg_1
+         %34 = OpCompositeExtract %int %33 0
+         %35 = OpCompositeExtract %int %33 1
+         %36 = OpLoad %int %arg_2
+         %37 = OpCompositeConstruct %v3int %34 %35 %36
+         %30 = OpImageRead %v4int %31 %37
+               OpStore %res %30
+         %44 = OpAccessChain %_ptr_StorageBuffer_v4int %prevent_dce %uint_0
+         %45 = OpLoad %v4int %res
+               OpStore %44 %45
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %46
+         %48 = OpLabel
+         %49 = OpFunctionCall %void %textureLoad_d8617f
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %51 = OpLabel
+         %52 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %52
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %55 = OpLabel
+         %56 = OpFunctionCall %void %textureLoad_d8617f
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %58 = OpLabel
+         %59 = OpFunctionCall %void %textureLoad_d8617f
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/d8617f.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/d8617f.wgsl.expected.wgsl
new file mode 100644
index 0000000..1489f20
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/d8617f.wgsl.expected.wgsl
@@ -0,0 +1,28 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rg32sint, read>;
+
+fn textureLoad_d8617f() {
+  var arg_1 = vec2<i32>(1i);
+  var arg_2 = 1i;
+  var res : vec4<i32> = textureLoad(arg_0, arg_1, arg_2);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_d8617f();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_d8617f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_d8617f();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/dbd554.wgsl b/test/tint/builtins/gen/var/textureLoad/dbd554.wgsl
new file mode 100644
index 0000000..294553c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/dbd554.wgsl
@@ -0,0 +1,49 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d<rgba32sint, read>;
+
+// fn textureLoad(texture: texture_storage_2d<rgba32sint, read>, coords: vec2<i32>) -> vec4<i32>
+fn textureLoad_dbd554() {
+  var arg_1 = vec2<i32>(1i);
+  var res: vec4<i32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_dbd554();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_dbd554();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_dbd554();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/dbd554.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/dbd554.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..9b3b892
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/dbd554.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture2D<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_dbd554() {
+  int2 arg_1 = (1).xx;
+  int4 res = arg_0.Load(int3(arg_1, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_dbd554();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_dbd554();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_dbd554();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/dbd554.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/dbd554.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..9b3b892
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/dbd554.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture2D<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_dbd554() {
+  int2 arg_1 = (1).xx;
+  int4 res = arg_0.Load(int3(arg_1, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_dbd554();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_dbd554();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_dbd554();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/dbd554.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/dbd554.wgsl.expected.glsl
new file mode 100644
index 0000000..a96d9f0
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/dbd554.wgsl.expected.glsl
@@ -0,0 +1,90 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba32i) uniform highp iimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_dbd554() {
+  ivec2 arg_1 = ivec2(1);
+  ivec4 res = texelFetch(arg_0, arg_1);
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_dbd554();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba32i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba32i) uniform highp iimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_dbd554() {
+  ivec2 arg_1 = ivec2(1);
+  ivec4 res = texelFetch(arg_0, arg_1);
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_dbd554();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba32i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba32i) uniform highp iimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_dbd554() {
+  ivec2 arg_1 = ivec2(1);
+  ivec4 res = texelFetch(arg_0, arg_1);
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_dbd554();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba32i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/dbd554.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/dbd554.wgsl.expected.msl
new file mode 100644
index 0000000..aaf4216
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/dbd554.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_dbd554(texture2d<int, access::read> tint_symbol_1, device int4* const tint_symbol_2) {
+  int2 arg_1 = int2(1);
+  int4 res = tint_symbol_1.read(uint2(arg_1));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<int, access::read> tint_symbol_3, device int4* const tint_symbol_4) {
+  textureLoad_dbd554(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<int, access::read> tint_symbol_5 [[texture(0)]], device int4* tint_symbol_6 [[buffer(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<int, access::read> tint_symbol_7 [[texture(0)]], device int4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_dbd554(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d<int, access::read> tint_symbol_9 [[texture(0)]], device int4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_dbd554(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/dbd554.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/dbd554.wgsl.expected.spvasm
new file mode 100644
index 0000000..096f3e7
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/dbd554.wgsl.expected.spvasm
@@ -0,0 +1,100 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 52
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_dbd554 "textureLoad_dbd554"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 2D 0 0 0 2 Rgba32i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+      %v4int = OpTypeVector %int 4
+%prevent_dce_block = OpTypeStruct %v4int
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+      %v2int = OpTypeVector %int 2
+      %int_1 = OpConstant %int 1
+         %23 = OpConstantComposite %v2int %int_1 %int_1
+%_ptr_Function_v2int = OpTypePointer Function %v2int
+         %26 = OpConstantNull %v2int
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+         %32 = OpConstantNull %v4int
+       %uint = OpTypeInt 32 0
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4int = OpTypePointer StorageBuffer %v4int
+         %38 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_dbd554 = OpFunction %void None %17
+         %20 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v2int Function %26
+        %res = OpVariable %_ptr_Function_v4int Function %32
+               OpStore %arg_1 %23
+         %28 = OpLoad %11 %arg_0
+         %29 = OpLoad %v2int %arg_1
+         %27 = OpImageRead %v4int %28 %29
+               OpStore %res %27
+         %36 = OpAccessChain %_ptr_StorageBuffer_v4int %prevent_dce %uint_0
+         %37 = OpLoad %v4int %res
+               OpStore %36 %37
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %38
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %textureLoad_dbd554
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %43 = OpLabel
+         %44 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %44
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %47 = OpLabel
+         %48 = OpFunctionCall %void %textureLoad_dbd554
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %50 = OpLabel
+         %51 = OpFunctionCall %void %textureLoad_dbd554
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/dbd554.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/dbd554.wgsl.expected.wgsl
new file mode 100644
index 0000000..ec0155a
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/dbd554.wgsl.expected.wgsl
@@ -0,0 +1,27 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d<rgba32sint, read>;
+
+fn textureLoad_dbd554() {
+  var arg_1 = vec2<i32>(1i);
+  var res : vec4<i32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_dbd554();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_dbd554();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_dbd554();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/dd8776.wgsl b/test/tint/builtins/gen/var/textureLoad/dd8776.wgsl
new file mode 100644
index 0000000..4731dd9
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/dd8776.wgsl
@@ -0,0 +1,50 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rg32float, read>;
+
+// fn textureLoad(texture: texture_storage_2d_array<rg32float, read>, coords: vec2<u32>, array_index: u32) -> vec4<f32>
+fn textureLoad_dd8776() {
+  var arg_1 = vec2<u32>(1u);
+  var arg_2 = 1u;
+  var res: vec4<f32> = textureLoad(arg_0, arg_1, arg_2);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_dd8776();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_dd8776();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_dd8776();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/dd8776.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/dd8776.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..b72f678
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/dd8776.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_dd8776() {
+  uint2 arg_1 = (1u).xx;
+  uint arg_2 = 1u;
+  float4 res = arg_0.Load(uint4(uint3(arg_1, arg_2), uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_dd8776();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_dd8776();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_dd8776();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/dd8776.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/dd8776.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..b72f678
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/dd8776.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_dd8776() {
+  uint2 arg_1 = (1u).xx;
+  uint arg_2 = 1u;
+  float4 res = arg_0.Load(uint4(uint3(arg_1, arg_2), uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_dd8776();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_dd8776();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_dd8776();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/dd8776.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/dd8776.wgsl.expected.glsl
new file mode 100644
index 0000000..87fb40e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/dd8776.wgsl.expected.glsl
@@ -0,0 +1,96 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rg32f) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_dd8776() {
+  uvec2 arg_1 = uvec2(1u);
+  uint arg_2 = 1u;
+  vec4 res = texelFetch(arg_0, ivec3(uvec3(arg_1, arg_2)));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_dd8776();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rg32f) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_dd8776() {
+  uvec2 arg_1 = uvec2(1u);
+  uint arg_2 = 1u;
+  vec4 res = texelFetch(arg_0, ivec3(uvec3(arg_1, arg_2)));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_dd8776();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'image load-store format' : not supported with this profile: es
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rg32f) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_dd8776() {
+  uvec2 arg_1 = uvec2(1u);
+  uint arg_2 = 1u;
+  vec4 res = texelFetch(arg_0, ivec3(uvec3(arg_1, arg_2)));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_dd8776();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/dd8776.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/dd8776.wgsl.expected.msl
new file mode 100644
index 0000000..bdae5bc
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/dd8776.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_dd8776(texture2d_array<float, access::read> tint_symbol_1, device float4* const tint_symbol_2) {
+  uint2 arg_1 = uint2(1u);
+  uint arg_2 = 1u;
+  float4 res = tint_symbol_1.read(uint2(arg_1), arg_2);
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<float, access::read> tint_symbol_3, device float4* const tint_symbol_4) {
+  textureLoad_dd8776(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<float, access::read> tint_symbol_5 [[texture(0)]], device float4* tint_symbol_6 [[buffer(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::read> tint_symbol_7 [[texture(0)]], device float4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_dd8776(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<float, access::read> tint_symbol_9 [[texture(0)]], device float4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_dd8776(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/dd8776.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/dd8776.wgsl.expected.spvasm
new file mode 100644
index 0000000..58c786f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/dd8776.wgsl.expected.spvasm
@@ -0,0 +1,108 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 57
+; Schema: 0
+               OpCapability Shader
+               OpCapability StorageImageExtendedFormats
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_dd8776 "textureLoad_dd8776"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 1 0 2 Rg32f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+%prevent_dce_block = OpTypeStruct %v4float
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+     %uint_1 = OpConstant %uint 1
+         %22 = OpConstantComposite %v2uint %uint_1 %uint_1
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %25 = OpConstantNull %v2uint
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %28 = OpConstantNull %uint
+     %v3uint = OpTypeVector %uint 3
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
+         %43 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_dd8776 = OpFunction %void None %15
+         %18 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v2uint Function %25
+      %arg_2 = OpVariable %_ptr_Function_uint Function %28
+        %res = OpVariable %_ptr_Function_v4float Function %5
+               OpStore %arg_1 %22
+               OpStore %arg_2 %uint_1
+         %30 = OpLoad %11 %arg_0
+         %32 = OpLoad %v2uint %arg_1
+         %33 = OpCompositeExtract %uint %32 0
+         %34 = OpCompositeExtract %uint %32 1
+         %35 = OpLoad %uint %arg_2
+         %36 = OpCompositeConstruct %v3uint %33 %34 %35
+         %29 = OpImageRead %v4float %30 %36
+               OpStore %res %29
+         %41 = OpAccessChain %_ptr_StorageBuffer_v4float %prevent_dce %uint_0
+         %42 = OpLoad %v4float %res
+               OpStore %41 %42
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %43
+         %45 = OpLabel
+         %46 = OpFunctionCall %void %textureLoad_dd8776
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %48 = OpLabel
+         %49 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %49
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %52 = OpLabel
+         %53 = OpFunctionCall %void %textureLoad_dd8776
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %55 = OpLabel
+         %56 = OpFunctionCall %void %textureLoad_dd8776
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/dd8776.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/dd8776.wgsl.expected.wgsl
new file mode 100644
index 0000000..937d4ea
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/dd8776.wgsl.expected.wgsl
@@ -0,0 +1,28 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rg32float, read>;
+
+fn textureLoad_dd8776() {
+  var arg_1 = vec2<u32>(1u);
+  var arg_2 = 1u;
+  var res : vec4<f32> = textureLoad(arg_0, arg_1, arg_2);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_dd8776();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_dd8776();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_dd8776();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/ddeed3.wgsl b/test/tint/builtins/gen/var/textureLoad/ddeed3.wgsl
new file mode 100644
index 0000000..9e6679e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/ddeed3.wgsl
@@ -0,0 +1,49 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_1d<rgba32sint, read>;
+
+// fn textureLoad(texture: texture_storage_1d<rgba32sint, read>, coords: i32) -> vec4<i32>
+fn textureLoad_ddeed3() {
+  var arg_1 = 1i;
+  var res: vec4<i32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_ddeed3();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_ddeed3();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_ddeed3();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/ddeed3.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/ddeed3.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..97237ab
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/ddeed3.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture1D<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_ddeed3() {
+  int arg_1 = 1;
+  int4 res = arg_0.Load(int2(arg_1, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_ddeed3();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_ddeed3();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_ddeed3();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/ddeed3.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/ddeed3.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..97237ab
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/ddeed3.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture1D<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_ddeed3() {
+  int arg_1 = 1;
+  int4 res = arg_0.Load(int2(arg_1, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_ddeed3();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_ddeed3();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_ddeed3();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/ddeed3.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/ddeed3.wgsl.expected.glsl
new file mode 100644
index 0000000..3729aaf
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/ddeed3.wgsl.expected.glsl
@@ -0,0 +1,90 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba32i) uniform highp iimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_ddeed3() {
+  int arg_1 = 1;
+  ivec4 res = texelFetch(arg_0, ivec2(arg_1, 0));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_ddeed3();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba32i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba32i) uniform highp iimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_ddeed3() {
+  int arg_1 = 1;
+  ivec4 res = texelFetch(arg_0, ivec2(arg_1, 0));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_ddeed3();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba32i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba32i) uniform highp iimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_ddeed3() {
+  int arg_1 = 1;
+  ivec4 res = texelFetch(arg_0, ivec2(arg_1, 0));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_ddeed3();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba32i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/ddeed3.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/ddeed3.wgsl.expected.msl
new file mode 100644
index 0000000..df62466
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/ddeed3.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_ddeed3(texture1d<int, access::read> tint_symbol_1, device int4* const tint_symbol_2) {
+  int arg_1 = 1;
+  int4 res = tint_symbol_1.read(uint(arg_1));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<int, access::read> tint_symbol_3, device int4* const tint_symbol_4) {
+  textureLoad_ddeed3(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<int, access::read> tint_symbol_5 [[texture(0)]], device int4* tint_symbol_6 [[buffer(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(texture1d<int, access::read> tint_symbol_7 [[texture(0)]], device int4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_ddeed3(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture1d<int, access::read> tint_symbol_9 [[texture(0)]], device int4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_ddeed3(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/ddeed3.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/ddeed3.wgsl.expected.spvasm
new file mode 100644
index 0000000..e6caa09
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/ddeed3.wgsl.expected.spvasm
@@ -0,0 +1,99 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 50
+; Schema: 0
+               OpCapability Shader
+               OpCapability Image1D
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_ddeed3 "textureLoad_ddeed3"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 1D 0 0 0 2 Rgba32i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+      %v4int = OpTypeVector %int 4
+%prevent_dce_block = OpTypeStruct %v4int
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+      %int_1 = OpConstant %int 1
+%_ptr_Function_int = OpTypePointer Function %int
+         %24 = OpConstantNull %int
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+         %30 = OpConstantNull %v4int
+       %uint = OpTypeInt 32 0
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4int = OpTypePointer StorageBuffer %v4int
+         %36 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_ddeed3 = OpFunction %void None %17
+         %20 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_int Function %24
+        %res = OpVariable %_ptr_Function_v4int Function %30
+               OpStore %arg_1 %int_1
+         %26 = OpLoad %11 %arg_0
+         %27 = OpLoad %int %arg_1
+         %25 = OpImageRead %v4int %26 %27
+               OpStore %res %25
+         %34 = OpAccessChain %_ptr_StorageBuffer_v4int %prevent_dce %uint_0
+         %35 = OpLoad %v4int %res
+               OpStore %34 %35
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %36
+         %38 = OpLabel
+         %39 = OpFunctionCall %void %textureLoad_ddeed3
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %41 = OpLabel
+         %42 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %42
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %45 = OpLabel
+         %46 = OpFunctionCall %void %textureLoad_ddeed3
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %48 = OpLabel
+         %49 = OpFunctionCall %void %textureLoad_ddeed3
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/ddeed3.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/ddeed3.wgsl.expected.wgsl
new file mode 100644
index 0000000..4e8683e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/ddeed3.wgsl.expected.wgsl
@@ -0,0 +1,27 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_1d<rgba32sint, read>;
+
+fn textureLoad_ddeed3() {
+  var arg_1 = 1i;
+  var res : vec4<i32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_ddeed3();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_ddeed3();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_ddeed3();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/dee8e7.wgsl b/test/tint/builtins/gen/var/textureLoad/dee8e7.wgsl
new file mode 100644
index 0000000..8e84460
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/dee8e7.wgsl
@@ -0,0 +1,49 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d<rgba8sint, read>;
+
+// fn textureLoad(texture: texture_storage_2d<rgba8sint, read>, coords: vec2<i32>) -> vec4<i32>
+fn textureLoad_dee8e7() {
+  var arg_1 = vec2<i32>(1i);
+  var res: vec4<i32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_dee8e7();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_dee8e7();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_dee8e7();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/dee8e7.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/dee8e7.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..b1469b5
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/dee8e7.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture2D<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_dee8e7() {
+  int2 arg_1 = (1).xx;
+  int4 res = arg_0.Load(int3(arg_1, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_dee8e7();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_dee8e7();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_dee8e7();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/dee8e7.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/dee8e7.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..b1469b5
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/dee8e7.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture2D<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_dee8e7() {
+  int2 arg_1 = (1).xx;
+  int4 res = arg_0.Load(int3(arg_1, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_dee8e7();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_dee8e7();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_dee8e7();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/dee8e7.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/dee8e7.wgsl.expected.glsl
new file mode 100644
index 0000000..2550bf3
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/dee8e7.wgsl.expected.glsl
@@ -0,0 +1,90 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba8i) uniform highp iimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_dee8e7() {
+  ivec2 arg_1 = ivec2(1);
+  ivec4 res = texelFetch(arg_0, arg_1);
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_dee8e7();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba8i) uniform highp iimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_dee8e7() {
+  ivec2 arg_1 = ivec2(1);
+  ivec4 res = texelFetch(arg_0, arg_1);
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_dee8e7();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba8i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba8i) uniform highp iimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_dee8e7() {
+  ivec2 arg_1 = ivec2(1);
+  ivec4 res = texelFetch(arg_0, arg_1);
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_dee8e7();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/dee8e7.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/dee8e7.wgsl.expected.msl
new file mode 100644
index 0000000..988a18a
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/dee8e7.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_dee8e7(texture2d<int, access::read> tint_symbol_1, device int4* const tint_symbol_2) {
+  int2 arg_1 = int2(1);
+  int4 res = tint_symbol_1.read(uint2(arg_1));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<int, access::read> tint_symbol_3, device int4* const tint_symbol_4) {
+  textureLoad_dee8e7(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<int, access::read> tint_symbol_5 [[texture(0)]], device int4* tint_symbol_6 [[buffer(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<int, access::read> tint_symbol_7 [[texture(0)]], device int4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_dee8e7(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d<int, access::read> tint_symbol_9 [[texture(0)]], device int4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_dee8e7(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/dee8e7.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/dee8e7.wgsl.expected.spvasm
new file mode 100644
index 0000000..dd14ab0
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/dee8e7.wgsl.expected.spvasm
@@ -0,0 +1,100 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 52
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_dee8e7 "textureLoad_dee8e7"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 2D 0 0 0 2 Rgba8i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+      %v4int = OpTypeVector %int 4
+%prevent_dce_block = OpTypeStruct %v4int
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+      %v2int = OpTypeVector %int 2
+      %int_1 = OpConstant %int 1
+         %23 = OpConstantComposite %v2int %int_1 %int_1
+%_ptr_Function_v2int = OpTypePointer Function %v2int
+         %26 = OpConstantNull %v2int
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+         %32 = OpConstantNull %v4int
+       %uint = OpTypeInt 32 0
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4int = OpTypePointer StorageBuffer %v4int
+         %38 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_dee8e7 = OpFunction %void None %17
+         %20 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v2int Function %26
+        %res = OpVariable %_ptr_Function_v4int Function %32
+               OpStore %arg_1 %23
+         %28 = OpLoad %11 %arg_0
+         %29 = OpLoad %v2int %arg_1
+         %27 = OpImageRead %v4int %28 %29
+               OpStore %res %27
+         %36 = OpAccessChain %_ptr_StorageBuffer_v4int %prevent_dce %uint_0
+         %37 = OpLoad %v4int %res
+               OpStore %36 %37
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %38
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %textureLoad_dee8e7
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %43 = OpLabel
+         %44 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %44
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %47 = OpLabel
+         %48 = OpFunctionCall %void %textureLoad_dee8e7
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %50 = OpLabel
+         %51 = OpFunctionCall %void %textureLoad_dee8e7
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/dee8e7.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/dee8e7.wgsl.expected.wgsl
new file mode 100644
index 0000000..df49268
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/dee8e7.wgsl.expected.wgsl
@@ -0,0 +1,27 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d<rgba8sint, read>;
+
+fn textureLoad_dee8e7() {
+  var arg_1 = vec2<i32>(1i);
+  var res : vec4<i32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_dee8e7();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_dee8e7();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_dee8e7();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/dfdf3b.wgsl b/test/tint/builtins/gen/var/textureLoad/dfdf3b.wgsl
new file mode 100644
index 0000000..8c1ca4d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/dfdf3b.wgsl
@@ -0,0 +1,50 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba8sint, read>;
+
+// fn textureLoad(texture: texture_storage_2d_array<rgba8sint, read>, coords: vec2<u32>, array_index: u32) -> vec4<i32>
+fn textureLoad_dfdf3b() {
+  var arg_1 = vec2<u32>(1u);
+  var arg_2 = 1u;
+  var res: vec4<i32> = textureLoad(arg_0, arg_1, arg_2);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_dfdf3b();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_dfdf3b();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_dfdf3b();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/dfdf3b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/dfdf3b.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..7e413e2
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/dfdf3b.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_dfdf3b() {
+  uint2 arg_1 = (1u).xx;
+  uint arg_2 = 1u;
+  int4 res = arg_0.Load(uint4(uint3(arg_1, arg_2), uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_dfdf3b();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_dfdf3b();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_dfdf3b();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/dfdf3b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/dfdf3b.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..7e413e2
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/dfdf3b.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_dfdf3b() {
+  uint2 arg_1 = (1u).xx;
+  uint arg_2 = 1u;
+  int4 res = arg_0.Load(uint4(uint3(arg_1, arg_2), uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_dfdf3b();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_dfdf3b();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_dfdf3b();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/dfdf3b.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/dfdf3b.wgsl.expected.glsl
new file mode 100644
index 0000000..3b2eedc
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/dfdf3b.wgsl.expected.glsl
@@ -0,0 +1,93 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba8i) uniform highp iimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_dfdf3b() {
+  uvec2 arg_1 = uvec2(1u);
+  uint arg_2 = 1u;
+  ivec4 res = texelFetch(arg_0, ivec3(uvec3(arg_1, arg_2)));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_dfdf3b();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba8i) uniform highp iimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_dfdf3b() {
+  uvec2 arg_1 = uvec2(1u);
+  uint arg_2 = 1u;
+  ivec4 res = texelFetch(arg_0, ivec3(uvec3(arg_1, arg_2)));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_dfdf3b();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba8i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba8i) uniform highp iimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_dfdf3b() {
+  uvec2 arg_1 = uvec2(1u);
+  uint arg_2 = 1u;
+  ivec4 res = texelFetch(arg_0, ivec3(uvec3(arg_1, arg_2)));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_dfdf3b();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/dfdf3b.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/dfdf3b.wgsl.expected.msl
new file mode 100644
index 0000000..6ec2208
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/dfdf3b.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_dfdf3b(texture2d_array<int, access::read> tint_symbol_1, device int4* const tint_symbol_2) {
+  uint2 arg_1 = uint2(1u);
+  uint arg_2 = 1u;
+  int4 res = tint_symbol_1.read(uint2(arg_1), arg_2);
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<int, access::read> tint_symbol_3, device int4* const tint_symbol_4) {
+  textureLoad_dfdf3b(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<int, access::read> tint_symbol_5 [[texture(0)]], device int4* tint_symbol_6 [[buffer(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<int, access::read> tint_symbol_7 [[texture(0)]], device int4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_dfdf3b(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<int, access::read> tint_symbol_9 [[texture(0)]], device int4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_dfdf3b(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/dfdf3b.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/dfdf3b.wgsl.expected.spvasm
new file mode 100644
index 0000000..567f918
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/dfdf3b.wgsl.expected.spvasm
@@ -0,0 +1,110 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 60
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_dfdf3b "textureLoad_dfdf3b"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 2D 0 1 0 2 Rgba8i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+      %v4int = OpTypeVector %int 4
+%prevent_dce_block = OpTypeStruct %v4int
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+     %uint_1 = OpConstant %uint 1
+         %24 = OpConstantComposite %v2uint %uint_1 %uint_1
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %27 = OpConstantNull %v2uint
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %30 = OpConstantNull %uint
+     %v3uint = OpTypeVector %uint 3
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+         %41 = OpConstantNull %v4int
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4int = OpTypePointer StorageBuffer %v4int
+         %46 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_dfdf3b = OpFunction %void None %17
+         %20 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v2uint Function %27
+      %arg_2 = OpVariable %_ptr_Function_uint Function %30
+        %res = OpVariable %_ptr_Function_v4int Function %41
+               OpStore %arg_1 %24
+               OpStore %arg_2 %uint_1
+         %32 = OpLoad %11 %arg_0
+         %34 = OpLoad %v2uint %arg_1
+         %35 = OpCompositeExtract %uint %34 0
+         %36 = OpCompositeExtract %uint %34 1
+         %37 = OpLoad %uint %arg_2
+         %38 = OpCompositeConstruct %v3uint %35 %36 %37
+         %31 = OpImageRead %v4int %32 %38
+               OpStore %res %31
+         %44 = OpAccessChain %_ptr_StorageBuffer_v4int %prevent_dce %uint_0
+         %45 = OpLoad %v4int %res
+               OpStore %44 %45
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %46
+         %48 = OpLabel
+         %49 = OpFunctionCall %void %textureLoad_dfdf3b
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %51 = OpLabel
+         %52 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %52
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %55 = OpLabel
+         %56 = OpFunctionCall %void %textureLoad_dfdf3b
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %58 = OpLabel
+         %59 = OpFunctionCall %void %textureLoad_dfdf3b
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/dfdf3b.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/dfdf3b.wgsl.expected.wgsl
new file mode 100644
index 0000000..c30ad17
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/dfdf3b.wgsl.expected.wgsl
@@ -0,0 +1,28 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba8sint, read>;
+
+fn textureLoad_dfdf3b() {
+  var arg_1 = vec2<u32>(1u);
+  var arg_2 = 1u;
+  var res : vec4<i32> = textureLoad(arg_0, arg_1, arg_2);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_dfdf3b();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_dfdf3b();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_dfdf3b();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/e2292f.wgsl b/test/tint/builtins/gen/var/textureLoad/e2292f.wgsl
new file mode 100644
index 0000000..87cf8d0
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/e2292f.wgsl
@@ -0,0 +1,49 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_1d<r32sint, read>;
+
+// fn textureLoad(texture: texture_storage_1d<r32sint, read>, coords: u32) -> vec4<i32>
+fn textureLoad_e2292f() {
+  var arg_1 = 1u;
+  var res: vec4<i32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_e2292f();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_e2292f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_e2292f();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/e2292f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/e2292f.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..5024f67
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/e2292f.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture1D<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_e2292f() {
+  uint arg_1 = 1u;
+  int4 res = arg_0.Load(uint2(arg_1, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_e2292f();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_e2292f();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_e2292f();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/e2292f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/e2292f.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..5024f67
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/e2292f.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture1D<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_e2292f() {
+  uint arg_1 = 1u;
+  int4 res = arg_0.Load(uint2(arg_1, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_e2292f();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_e2292f();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_e2292f();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/e2292f.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/e2292f.wgsl.expected.glsl
new file mode 100644
index 0000000..3631c5f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/e2292f.wgsl.expected.glsl
@@ -0,0 +1,96 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(r32i) uniform highp iimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_e2292f() {
+  uint arg_1 = 1u;
+  ivec4 res = texelFetch(arg_0, ivec2(uvec2(arg_1, 0u)));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_e2292f();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:10: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:10: '=' :  cannot convert from ' const float' to ' temp highp 4-component vector of int'
+ERROR: 0:10: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(r32i) uniform highp iimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_e2292f() {
+  uint arg_1 = 1u;
+  ivec4 res = texelFetch(arg_0, ivec2(uvec2(arg_1, 0u)));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_e2292f();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:11: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:11: '=' :  cannot convert from ' const float' to ' temp mediump 4-component vector of int'
+ERROR: 0:11: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(r32i) uniform highp iimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_e2292f() {
+  uint arg_1 = 1u;
+  ivec4 res = texelFetch(arg_0, ivec2(uvec2(arg_1, 0u)));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_e2292f();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:10: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:10: '=' :  cannot convert from ' const float' to ' temp highp 4-component vector of int'
+ERROR: 0:10: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/e2292f.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/e2292f.wgsl.expected.msl
new file mode 100644
index 0000000..dff79f7
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/e2292f.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_e2292f(texture1d<int, access::read> tint_symbol_1, device int4* const tint_symbol_2) {
+  uint arg_1 = 1u;
+  int4 res = tint_symbol_1.read(uint(arg_1));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<int, access::read> tint_symbol_3, device int4* const tint_symbol_4) {
+  textureLoad_e2292f(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<int, access::read> tint_symbol_5 [[texture(0)]], device int4* tint_symbol_6 [[buffer(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(texture1d<int, access::read> tint_symbol_7 [[texture(0)]], device int4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_e2292f(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture1d<int, access::read> tint_symbol_9 [[texture(0)]], device int4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_e2292f(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/e2292f.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/e2292f.wgsl.expected.spvasm
new file mode 100644
index 0000000..af3eedc
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/e2292f.wgsl.expected.spvasm
@@ -0,0 +1,99 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 50
+; Schema: 0
+               OpCapability Shader
+               OpCapability Image1D
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_e2292f "textureLoad_e2292f"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 1D 0 0 0 2 R32i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+      %v4int = OpTypeVector %int 4
+%prevent_dce_block = OpTypeStruct %v4int
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %25 = OpConstantNull %uint
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+         %31 = OpConstantNull %v4int
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4int = OpTypePointer StorageBuffer %v4int
+         %36 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_e2292f = OpFunction %void None %17
+         %20 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_uint Function %25
+        %res = OpVariable %_ptr_Function_v4int Function %31
+               OpStore %arg_1 %uint_1
+         %27 = OpLoad %11 %arg_0
+         %28 = OpLoad %uint %arg_1
+         %26 = OpImageRead %v4int %27 %28
+               OpStore %res %26
+         %34 = OpAccessChain %_ptr_StorageBuffer_v4int %prevent_dce %uint_0
+         %35 = OpLoad %v4int %res
+               OpStore %34 %35
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %36
+         %38 = OpLabel
+         %39 = OpFunctionCall %void %textureLoad_e2292f
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %41 = OpLabel
+         %42 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %42
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %45 = OpLabel
+         %46 = OpFunctionCall %void %textureLoad_e2292f
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %48 = OpLabel
+         %49 = OpFunctionCall %void %textureLoad_e2292f
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/e2292f.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/e2292f.wgsl.expected.wgsl
new file mode 100644
index 0000000..d2e36ad
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/e2292f.wgsl.expected.wgsl
@@ -0,0 +1,27 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_1d<r32sint, read>;
+
+fn textureLoad_e2292f() {
+  var arg_1 = 1u;
+  var res : vec4<i32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_e2292f();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_e2292f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_e2292f();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/e3b08b.wgsl b/test/tint/builtins/gen/var/textureLoad/e3b08b.wgsl
new file mode 100644
index 0000000..6ec1c18
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/e3b08b.wgsl
@@ -0,0 +1,49 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_3d<r32float, read>;
+
+// fn textureLoad(texture: texture_storage_3d<r32float, read>, coords: vec3<u32>) -> vec4<f32>
+fn textureLoad_e3b08b() {
+  var arg_1 = vec3<u32>(1u);
+  var res: vec4<f32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_e3b08b();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_e3b08b();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_e3b08b();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/e3b08b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/e3b08b.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..d7a3bcc
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/e3b08b.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture3D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_e3b08b() {
+  uint3 arg_1 = (1u).xxx;
+  float4 res = arg_0.Load(uint4(arg_1, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_e3b08b();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_e3b08b();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_e3b08b();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/e3b08b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/e3b08b.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..d7a3bcc
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/e3b08b.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture3D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_e3b08b() {
+  uint3 arg_1 = (1u).xxx;
+  float4 res = arg_0.Load(uint4(arg_1, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_e3b08b();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_e3b08b();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_e3b08b();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/e3b08b.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/e3b08b.wgsl.expected.glsl
new file mode 100644
index 0000000..a7d31ee
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/e3b08b.wgsl.expected.glsl
@@ -0,0 +1,96 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(r32f) uniform highp image3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_e3b08b() {
+  uvec3 arg_1 = uvec3(1u);
+  vec4 res = texelFetch(arg_0, ivec3(arg_1));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_e3b08b();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:10: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:10: '=' :  cannot convert from ' const float' to ' temp highp 4-component vector of float'
+ERROR: 0:10: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(r32f) uniform highp image3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_e3b08b() {
+  uvec3 arg_1 = uvec3(1u);
+  vec4 res = texelFetch(arg_0, ivec3(arg_1));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_e3b08b();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:11: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:11: '=' :  cannot convert from ' const float' to ' temp highp 4-component vector of float'
+ERROR: 0:11: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(r32f) uniform highp image3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_e3b08b() {
+  uvec3 arg_1 = uvec3(1u);
+  vec4 res = texelFetch(arg_0, ivec3(arg_1));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_e3b08b();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:10: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:10: '=' :  cannot convert from ' const float' to ' temp highp 4-component vector of float'
+ERROR: 0:10: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/e3b08b.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/e3b08b.wgsl.expected.msl
new file mode 100644
index 0000000..6e54938
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/e3b08b.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_e3b08b(texture3d<float, access::read> tint_symbol_1, device float4* const tint_symbol_2) {
+  uint3 arg_1 = uint3(1u);
+  float4 res = tint_symbol_1.read(uint3(arg_1));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<float, access::read> tint_symbol_3, device float4* const tint_symbol_4) {
+  textureLoad_e3b08b(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<float, access::read> tint_symbol_5 [[texture(0)]], device float4* tint_symbol_6 [[buffer(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::read> tint_symbol_7 [[texture(0)]], device float4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_e3b08b(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture3d<float, access::read> tint_symbol_9 [[texture(0)]], device float4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_e3b08b(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/e3b08b.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/e3b08b.wgsl.expected.spvasm
new file mode 100644
index 0000000..ea32892
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/e3b08b.wgsl.expected.spvasm
@@ -0,0 +1,97 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 49
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_e3b08b "textureLoad_e3b08b"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 3D 0 0 0 2 R32f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+%prevent_dce_block = OpTypeStruct %v4float
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v3uint = OpTypeVector %uint 3
+     %uint_1 = OpConstant %uint 1
+         %22 = OpConstantComposite %v3uint %uint_1 %uint_1 %uint_1
+%_ptr_Function_v3uint = OpTypePointer Function %v3uint
+         %25 = OpConstantNull %v3uint
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
+         %35 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_e3b08b = OpFunction %void None %15
+         %18 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v3uint Function %25
+        %res = OpVariable %_ptr_Function_v4float Function %5
+               OpStore %arg_1 %22
+         %27 = OpLoad %11 %arg_0
+         %28 = OpLoad %v3uint %arg_1
+         %26 = OpImageRead %v4float %27 %28
+               OpStore %res %26
+         %33 = OpAccessChain %_ptr_StorageBuffer_v4float %prevent_dce %uint_0
+         %34 = OpLoad %v4float %res
+               OpStore %33 %34
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %35
+         %37 = OpLabel
+         %38 = OpFunctionCall %void %textureLoad_e3b08b
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %40 = OpLabel
+         %41 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %41
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %44 = OpLabel
+         %45 = OpFunctionCall %void %textureLoad_e3b08b
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %47 = OpLabel
+         %48 = OpFunctionCall %void %textureLoad_e3b08b
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/e3b08b.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/e3b08b.wgsl.expected.wgsl
new file mode 100644
index 0000000..848825f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/e3b08b.wgsl.expected.wgsl
@@ -0,0 +1,27 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_3d<r32float, read>;
+
+fn textureLoad_e3b08b() {
+  var arg_1 = vec3<u32>(1u);
+  var res : vec4<f32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_e3b08b();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_e3b08b();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_e3b08b();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/e57e92.wgsl b/test/tint/builtins/gen/var/textureLoad/e57e92.wgsl
new file mode 100644
index 0000000..adf0b0f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/e57e92.wgsl
@@ -0,0 +1,50 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<bgra8unorm, read>;
+
+// fn textureLoad(texture: texture_storage_2d_array<bgra8unorm, read>, coords: vec2<u32>, array_index: i32) -> vec4<f32>
+fn textureLoad_e57e92() {
+  var arg_1 = vec2<u32>(1u);
+  var arg_2 = 1i;
+  var res: vec4<f32> = textureLoad(arg_0, arg_1, arg_2);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_e57e92();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_e57e92();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_e57e92();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/e57e92.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/e57e92.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..30dd9f8
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/e57e92.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_e57e92() {
+  uint2 arg_1 = (1u).xx;
+  int arg_2 = 1;
+  float4 res = arg_0.Load(uint4(uint3(arg_1, uint(arg_2)), uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_e57e92();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_e57e92();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_e57e92();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/e57e92.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/e57e92.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..30dd9f8
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/e57e92.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_e57e92() {
+  uint2 arg_1 = (1u).xx;
+  int arg_2 = 1;
+  float4 res = arg_0.Load(uint4(uint3(arg_1, uint(arg_2)), uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_e57e92();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_e57e92();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_e57e92();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/e57e92.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/e57e92.wgsl.expected.glsl
new file mode 100644
index 0000000..eed5ca2
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/e57e92.wgsl.expected.glsl
@@ -0,0 +1,93 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba8) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_e57e92() {
+  uvec2 arg_1 = uvec2(1u);
+  int arg_2 = 1;
+  vec4 res = texelFetch(arg_0, ivec3(uvec3(arg_1, uint(arg_2))));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_e57e92();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba8) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_e57e92() {
+  uvec2 arg_1 = uvec2(1u);
+  int arg_2 = 1;
+  vec4 res = texelFetch(arg_0, ivec3(uvec3(arg_1, uint(arg_2))));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_e57e92();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba8' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba8) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_e57e92() {
+  uvec2 arg_1 = uvec2(1u);
+  int arg_2 = 1;
+  vec4 res = texelFetch(arg_0, ivec3(uvec3(arg_1, uint(arg_2))));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_e57e92();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/e57e92.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/e57e92.wgsl.expected.msl
new file mode 100644
index 0000000..8e16dc4
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/e57e92.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_e57e92(texture2d_array<float, access::read> tint_symbol_1, device float4* const tint_symbol_2) {
+  uint2 arg_1 = uint2(1u);
+  int arg_2 = 1;
+  float4 res = tint_symbol_1.read(uint2(arg_1), arg_2);
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<float, access::read> tint_symbol_3, device float4* const tint_symbol_4) {
+  textureLoad_e57e92(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<float, access::read> tint_symbol_5 [[texture(0)]], device float4* tint_symbol_6 [[buffer(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::read> tint_symbol_7 [[texture(0)]], device float4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_e57e92(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<float, access::read> tint_symbol_9 [[texture(0)]], device float4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_e57e92(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/e57e92.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/e57e92.wgsl.expected.spvasm
new file mode 100644
index 0000000..f277e67
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/e57e92.wgsl.expected.spvasm
@@ -0,0 +1,110 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 60
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_e57e92 "textureLoad_e57e92"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 1 0 2 Rgba8
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+%prevent_dce_block = OpTypeStruct %v4float
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+     %uint_1 = OpConstant %uint 1
+         %22 = OpConstantComposite %v2uint %uint_1 %uint_1
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %25 = OpConstantNull %v2uint
+        %int = OpTypeInt 32 1
+      %int_1 = OpConstant %int 1
+%_ptr_Function_int = OpTypePointer Function %int
+         %30 = OpConstantNull %int
+     %v3uint = OpTypeVector %uint 3
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
+         %46 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_e57e92 = OpFunction %void None %15
+         %18 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v2uint Function %25
+      %arg_2 = OpVariable %_ptr_Function_int Function %30
+        %res = OpVariable %_ptr_Function_v4float Function %5
+               OpStore %arg_1 %22
+               OpStore %arg_2 %int_1
+         %32 = OpLoad %11 %arg_0
+         %34 = OpLoad %v2uint %arg_1
+         %35 = OpCompositeExtract %uint %34 0
+         %36 = OpCompositeExtract %uint %34 1
+         %38 = OpLoad %int %arg_2
+         %37 = OpBitcast %uint %38
+         %39 = OpCompositeConstruct %v3uint %35 %36 %37
+         %31 = OpImageRead %v4float %32 %39
+               OpStore %res %31
+         %44 = OpAccessChain %_ptr_StorageBuffer_v4float %prevent_dce %uint_0
+         %45 = OpLoad %v4float %res
+               OpStore %44 %45
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %46
+         %48 = OpLabel
+         %49 = OpFunctionCall %void %textureLoad_e57e92
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %51 = OpLabel
+         %52 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %52
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %55 = OpLabel
+         %56 = OpFunctionCall %void %textureLoad_e57e92
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %58 = OpLabel
+         %59 = OpFunctionCall %void %textureLoad_e57e92
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/e57e92.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/e57e92.wgsl.expected.wgsl
new file mode 100644
index 0000000..3908bb9
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/e57e92.wgsl.expected.wgsl
@@ -0,0 +1,28 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<bgra8unorm, read>;
+
+fn textureLoad_e57e92() {
+  var arg_1 = vec2<u32>(1u);
+  var arg_2 = 1i;
+  var res : vec4<f32> = textureLoad(arg_0, arg_1, arg_2);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_e57e92();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_e57e92();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_e57e92();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/e59fdf.wgsl b/test/tint/builtins/gen/var/textureLoad/e59fdf.wgsl
new file mode 100644
index 0000000..8732e46
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/e59fdf.wgsl
@@ -0,0 +1,49 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_3d<rg32uint, read>;
+
+// fn textureLoad(texture: texture_storage_3d<rg32uint, read>, coords: vec3<u32>) -> vec4<u32>
+fn textureLoad_e59fdf() {
+  var arg_1 = vec3<u32>(1u);
+  var res: vec4<u32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_e59fdf();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_e59fdf();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_e59fdf();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/e59fdf.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/e59fdf.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..4e4d240
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/e59fdf.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture3D<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_e59fdf() {
+  uint3 arg_1 = (1u).xxx;
+  uint4 res = arg_0.Load(uint4(arg_1, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_e59fdf();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_e59fdf();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_e59fdf();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/e59fdf.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/e59fdf.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..4e4d240
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/e59fdf.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture3D<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_e59fdf() {
+  uint3 arg_1 = (1u).xxx;
+  uint4 res = arg_0.Load(uint4(arg_1, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_e59fdf();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_e59fdf();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_e59fdf();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/e59fdf.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/e59fdf.wgsl.expected.glsl
new file mode 100644
index 0000000..f806e21
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/e59fdf.wgsl.expected.glsl
@@ -0,0 +1,93 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rg32ui) uniform highp uimage3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_e59fdf() {
+  uvec3 arg_1 = uvec3(1u);
+  uvec4 res = texelFetch(arg_0, ivec3(arg_1));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_e59fdf();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rg32ui) uniform highp uimage3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_e59fdf() {
+  uvec3 arg_1 = uvec3(1u);
+  uvec4 res = texelFetch(arg_0, ivec3(arg_1));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_e59fdf();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'image load-store format' : not supported with this profile: es
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rg32ui) uniform highp uimage3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_e59fdf() {
+  uvec3 arg_1 = uvec3(1u);
+  uvec4 res = texelFetch(arg_0, ivec3(arg_1));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_e59fdf();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/e59fdf.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/e59fdf.wgsl.expected.msl
new file mode 100644
index 0000000..c4101c0
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/e59fdf.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_e59fdf(texture3d<uint, access::read> tint_symbol_1, device uint4* const tint_symbol_2) {
+  uint3 arg_1 = uint3(1u);
+  uint4 res = tint_symbol_1.read(uint3(arg_1));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<uint, access::read> tint_symbol_3, device uint4* const tint_symbol_4) {
+  textureLoad_e59fdf(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<uint, access::read> tint_symbol_5 [[texture(0)]], device uint4* tint_symbol_6 [[buffer(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<uint, access::read> tint_symbol_7 [[texture(0)]], device uint4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_e59fdf(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture3d<uint, access::read> tint_symbol_9 [[texture(0)]], device uint4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_e59fdf(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/e59fdf.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/e59fdf.wgsl.expected.spvasm
new file mode 100644
index 0000000..d6c9341
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/e59fdf.wgsl.expected.spvasm
@@ -0,0 +1,100 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 51
+; Schema: 0
+               OpCapability Shader
+               OpCapability StorageImageExtendedFormats
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_e59fdf "textureLoad_e59fdf"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 3D 0 0 0 2 Rg32ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+     %v4uint = OpTypeVector %uint 4
+%prevent_dce_block = OpTypeStruct %v4uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+     %v3uint = OpTypeVector %uint 3
+     %uint_1 = OpConstant %uint 1
+         %23 = OpConstantComposite %v3uint %uint_1 %uint_1 %uint_1
+%_ptr_Function_v3uint = OpTypePointer Function %v3uint
+         %26 = OpConstantNull %v3uint
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+         %32 = OpConstantNull %v4uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4uint = OpTypePointer StorageBuffer %v4uint
+         %37 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_e59fdf = OpFunction %void None %17
+         %20 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v3uint Function %26
+        %res = OpVariable %_ptr_Function_v4uint Function %32
+               OpStore %arg_1 %23
+         %28 = OpLoad %11 %arg_0
+         %29 = OpLoad %v3uint %arg_1
+         %27 = OpImageRead %v4uint %28 %29
+               OpStore %res %27
+         %35 = OpAccessChain %_ptr_StorageBuffer_v4uint %prevent_dce %uint_0
+         %36 = OpLoad %v4uint %res
+               OpStore %35 %36
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %37
+         %39 = OpLabel
+         %40 = OpFunctionCall %void %textureLoad_e59fdf
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %42 = OpLabel
+         %43 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %43
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %46 = OpLabel
+         %47 = OpFunctionCall %void %textureLoad_e59fdf
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %49 = OpLabel
+         %50 = OpFunctionCall %void %textureLoad_e59fdf
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/e59fdf.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/e59fdf.wgsl.expected.wgsl
new file mode 100644
index 0000000..89ab423
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/e59fdf.wgsl.expected.wgsl
@@ -0,0 +1,27 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_3d<rg32uint, read>;
+
+fn textureLoad_e59fdf() {
+  var arg_1 = vec3<u32>(1u);
+  var res : vec4<u32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_e59fdf();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_e59fdf();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_e59fdf();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/e65916.wgsl b/test/tint/builtins/gen/var/textureLoad/e65916.wgsl
new file mode 100644
index 0000000..2224d4c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/e65916.wgsl
@@ -0,0 +1,49 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_3d<rg32sint, read>;
+
+// fn textureLoad(texture: texture_storage_3d<rg32sint, read>, coords: vec3<i32>) -> vec4<i32>
+fn textureLoad_e65916() {
+  var arg_1 = vec3<i32>(1i);
+  var res: vec4<i32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_e65916();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_e65916();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_e65916();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/e65916.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/e65916.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..8c0e857
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/e65916.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture3D<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_e65916() {
+  int3 arg_1 = (1).xxx;
+  int4 res = arg_0.Load(int4(arg_1, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_e65916();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_e65916();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_e65916();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/e65916.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/e65916.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..8c0e857
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/e65916.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture3D<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_e65916() {
+  int3 arg_1 = (1).xxx;
+  int4 res = arg_0.Load(int4(arg_1, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_e65916();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_e65916();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_e65916();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/e65916.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/e65916.wgsl.expected.glsl
new file mode 100644
index 0000000..93d8a1b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/e65916.wgsl.expected.glsl
@@ -0,0 +1,93 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rg32i) uniform highp iimage3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_e65916() {
+  ivec3 arg_1 = ivec3(1);
+  ivec4 res = texelFetch(arg_0, arg_1);
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_e65916();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rg32i) uniform highp iimage3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_e65916() {
+  ivec3 arg_1 = ivec3(1);
+  ivec4 res = texelFetch(arg_0, arg_1);
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_e65916();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'image load-store format' : not supported with this profile: es
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rg32i) uniform highp iimage3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_e65916() {
+  ivec3 arg_1 = ivec3(1);
+  ivec4 res = texelFetch(arg_0, arg_1);
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_e65916();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/e65916.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/e65916.wgsl.expected.msl
new file mode 100644
index 0000000..3b2b781
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/e65916.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_e65916(texture3d<int, access::read> tint_symbol_1, device int4* const tint_symbol_2) {
+  int3 arg_1 = int3(1);
+  int4 res = tint_symbol_1.read(uint3(arg_1));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<int, access::read> tint_symbol_3, device int4* const tint_symbol_4) {
+  textureLoad_e65916(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<int, access::read> tint_symbol_5 [[texture(0)]], device int4* tint_symbol_6 [[buffer(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<int, access::read> tint_symbol_7 [[texture(0)]], device int4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_e65916(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture3d<int, access::read> tint_symbol_9 [[texture(0)]], device int4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_e65916(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/e65916.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/e65916.wgsl.expected.spvasm
new file mode 100644
index 0000000..5e271bd
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/e65916.wgsl.expected.spvasm
@@ -0,0 +1,101 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 52
+; Schema: 0
+               OpCapability Shader
+               OpCapability StorageImageExtendedFormats
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_e65916 "textureLoad_e65916"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 3D 0 0 0 2 Rg32i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+      %v4int = OpTypeVector %int 4
+%prevent_dce_block = OpTypeStruct %v4int
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+      %v3int = OpTypeVector %int 3
+      %int_1 = OpConstant %int 1
+         %23 = OpConstantComposite %v3int %int_1 %int_1 %int_1
+%_ptr_Function_v3int = OpTypePointer Function %v3int
+         %26 = OpConstantNull %v3int
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+         %32 = OpConstantNull %v4int
+       %uint = OpTypeInt 32 0
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4int = OpTypePointer StorageBuffer %v4int
+         %38 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_e65916 = OpFunction %void None %17
+         %20 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v3int Function %26
+        %res = OpVariable %_ptr_Function_v4int Function %32
+               OpStore %arg_1 %23
+         %28 = OpLoad %11 %arg_0
+         %29 = OpLoad %v3int %arg_1
+         %27 = OpImageRead %v4int %28 %29
+               OpStore %res %27
+         %36 = OpAccessChain %_ptr_StorageBuffer_v4int %prevent_dce %uint_0
+         %37 = OpLoad %v4int %res
+               OpStore %36 %37
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %38
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %textureLoad_e65916
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %43 = OpLabel
+         %44 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %44
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %47 = OpLabel
+         %48 = OpFunctionCall %void %textureLoad_e65916
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %50 = OpLabel
+         %51 = OpFunctionCall %void %textureLoad_e65916
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/e65916.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/e65916.wgsl.expected.wgsl
new file mode 100644
index 0000000..8f76925
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/e65916.wgsl.expected.wgsl
@@ -0,0 +1,27 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_3d<rg32sint, read>;
+
+fn textureLoad_e65916() {
+  var arg_1 = vec3<i32>(1i);
+  var res : vec4<i32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_e65916();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_e65916();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_e65916();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/e893d7.wgsl b/test/tint/builtins/gen/var/textureLoad/e893d7.wgsl
new file mode 100644
index 0000000..9860d5e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/e893d7.wgsl
@@ -0,0 +1,49 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d<rgba16float, read>;
+
+// fn textureLoad(texture: texture_storage_2d<rgba16float, read>, coords: vec2<i32>) -> vec4<f32>
+fn textureLoad_e893d7() {
+  var arg_1 = vec2<i32>(1i);
+  var res: vec4<f32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_e893d7();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_e893d7();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_e893d7();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/e893d7.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/e893d7.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..dc7a1fb
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/e893d7.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture2D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_e893d7() {
+  int2 arg_1 = (1).xx;
+  float4 res = arg_0.Load(int3(arg_1, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_e893d7();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_e893d7();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_e893d7();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/e893d7.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/e893d7.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..dc7a1fb
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/e893d7.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture2D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_e893d7() {
+  int2 arg_1 = (1).xx;
+  float4 res = arg_0.Load(int3(arg_1, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_e893d7();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_e893d7();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_e893d7();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/e893d7.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/e893d7.wgsl.expected.glsl
new file mode 100644
index 0000000..1dce56e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/e893d7.wgsl.expected.glsl
@@ -0,0 +1,90 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba16f) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_e893d7() {
+  ivec2 arg_1 = ivec2(1);
+  vec4 res = texelFetch(arg_0, arg_1);
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_e893d7();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba16f' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba16f) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_e893d7() {
+  ivec2 arg_1 = ivec2(1);
+  vec4 res = texelFetch(arg_0, arg_1);
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_e893d7();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba16f' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba16f) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_e893d7() {
+  ivec2 arg_1 = ivec2(1);
+  vec4 res = texelFetch(arg_0, arg_1);
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_e893d7();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba16f' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/e893d7.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/e893d7.wgsl.expected.msl
new file mode 100644
index 0000000..6d56962
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/e893d7.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_e893d7(texture2d<float, access::read> tint_symbol_1, device float4* const tint_symbol_2) {
+  int2 arg_1 = int2(1);
+  float4 res = tint_symbol_1.read(uint2(arg_1));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<float, access::read> tint_symbol_3, device float4* const tint_symbol_4) {
+  textureLoad_e893d7(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<float, access::read> tint_symbol_5 [[texture(0)]], device float4* tint_symbol_6 [[buffer(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::read> tint_symbol_7 [[texture(0)]], device float4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_e893d7(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d<float, access::read> tint_symbol_9 [[texture(0)]], device float4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_e893d7(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/e893d7.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/e893d7.wgsl.expected.spvasm
new file mode 100644
index 0000000..c674be6
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/e893d7.wgsl.expected.spvasm
@@ -0,0 +1,98 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 50
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_e893d7 "textureLoad_e893d7"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 0 0 2 Rgba16f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+%prevent_dce_block = OpTypeStruct %v4float
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %v2int = OpTypeVector %int 2
+      %int_1 = OpConstant %int 1
+         %22 = OpConstantComposite %v2int %int_1 %int_1
+%_ptr_Function_v2int = OpTypePointer Function %v2int
+         %25 = OpConstantNull %v2int
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+       %uint = OpTypeInt 32 0
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
+         %36 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_e893d7 = OpFunction %void None %15
+         %18 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v2int Function %25
+        %res = OpVariable %_ptr_Function_v4float Function %5
+               OpStore %arg_1 %22
+         %27 = OpLoad %11 %arg_0
+         %28 = OpLoad %v2int %arg_1
+         %26 = OpImageRead %v4float %27 %28
+               OpStore %res %26
+         %34 = OpAccessChain %_ptr_StorageBuffer_v4float %prevent_dce %uint_0
+         %35 = OpLoad %v4float %res
+               OpStore %34 %35
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %36
+         %38 = OpLabel
+         %39 = OpFunctionCall %void %textureLoad_e893d7
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %41 = OpLabel
+         %42 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %42
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %45 = OpLabel
+         %46 = OpFunctionCall %void %textureLoad_e893d7
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %48 = OpLabel
+         %49 = OpFunctionCall %void %textureLoad_e893d7
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/e893d7.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/e893d7.wgsl.expected.wgsl
new file mode 100644
index 0000000..743c6b5
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/e893d7.wgsl.expected.wgsl
@@ -0,0 +1,27 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d<rgba16float, read>;
+
+fn textureLoad_e893d7() {
+  var arg_1 = vec2<i32>(1i);
+  var res : vec4<f32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_e893d7();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_e893d7();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_e893d7();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/e92dd0.wgsl b/test/tint/builtins/gen/var/textureLoad/e92dd0.wgsl
new file mode 100644
index 0000000..6190510
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/e92dd0.wgsl
@@ -0,0 +1,49 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_1d<rgba8unorm, read>;
+
+// fn textureLoad(texture: texture_storage_1d<rgba8unorm, read>, coords: u32) -> vec4<f32>
+fn textureLoad_e92dd0() {
+  var arg_1 = 1u;
+  var res: vec4<f32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_e92dd0();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_e92dd0();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_e92dd0();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/e92dd0.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/e92dd0.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..9fa626f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/e92dd0.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture1D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_e92dd0() {
+  uint arg_1 = 1u;
+  float4 res = arg_0.Load(uint2(arg_1, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_e92dd0();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_e92dd0();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_e92dd0();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/e92dd0.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/e92dd0.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..9fa626f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/e92dd0.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture1D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_e92dd0() {
+  uint arg_1 = 1u;
+  float4 res = arg_0.Load(uint2(arg_1, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_e92dd0();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_e92dd0();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_e92dd0();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/e92dd0.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/e92dd0.wgsl.expected.glsl
new file mode 100644
index 0000000..8b42724
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/e92dd0.wgsl.expected.glsl
@@ -0,0 +1,90 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba8) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_e92dd0() {
+  uint arg_1 = 1u;
+  vec4 res = texelFetch(arg_0, ivec2(uvec2(arg_1, 0u)));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_e92dd0();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba8) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_e92dd0() {
+  uint arg_1 = 1u;
+  vec4 res = texelFetch(arg_0, ivec2(uvec2(arg_1, 0u)));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_e92dd0();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba8' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba8) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_e92dd0() {
+  uint arg_1 = 1u;
+  vec4 res = texelFetch(arg_0, ivec2(uvec2(arg_1, 0u)));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_e92dd0();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/e92dd0.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/e92dd0.wgsl.expected.msl
new file mode 100644
index 0000000..3e39dd7
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/e92dd0.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_e92dd0(texture1d<float, access::read> tint_symbol_1, device float4* const tint_symbol_2) {
+  uint arg_1 = 1u;
+  float4 res = tint_symbol_1.read(uint(arg_1));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<float, access::read> tint_symbol_3, device float4* const tint_symbol_4) {
+  textureLoad_e92dd0(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<float, access::read> tint_symbol_5 [[texture(0)]], device float4* tint_symbol_6 [[buffer(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(texture1d<float, access::read> tint_symbol_7 [[texture(0)]], device float4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_e92dd0(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture1d<float, access::read> tint_symbol_9 [[texture(0)]], device float4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_e92dd0(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/e92dd0.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/e92dd0.wgsl.expected.spvasm
new file mode 100644
index 0000000..aff1e70
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/e92dd0.wgsl.expected.spvasm
@@ -0,0 +1,96 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 47
+; Schema: 0
+               OpCapability Shader
+               OpCapability Image1D
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_e92dd0 "textureLoad_e92dd0"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 1D 0 0 0 2 Rgba8
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+%prevent_dce_block = OpTypeStruct %v4float
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %23 = OpConstantNull %uint
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
+         %33 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_e92dd0 = OpFunction %void None %15
+         %18 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_uint Function %23
+        %res = OpVariable %_ptr_Function_v4float Function %5
+               OpStore %arg_1 %uint_1
+         %25 = OpLoad %11 %arg_0
+         %26 = OpLoad %uint %arg_1
+         %24 = OpImageRead %v4float %25 %26
+               OpStore %res %24
+         %31 = OpAccessChain %_ptr_StorageBuffer_v4float %prevent_dce %uint_0
+         %32 = OpLoad %v4float %res
+               OpStore %31 %32
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %33
+         %35 = OpLabel
+         %36 = OpFunctionCall %void %textureLoad_e92dd0
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %38 = OpLabel
+         %39 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %39
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %42 = OpLabel
+         %43 = OpFunctionCall %void %textureLoad_e92dd0
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %45 = OpLabel
+         %46 = OpFunctionCall %void %textureLoad_e92dd0
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/e92dd0.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/e92dd0.wgsl.expected.wgsl
new file mode 100644
index 0000000..d8ad67f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/e92dd0.wgsl.expected.wgsl
@@ -0,0 +1,27 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_1d<rgba8unorm, read>;
+
+fn textureLoad_e92dd0() {
+  var arg_1 = 1u;
+  var res : vec4<f32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_e92dd0();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_e92dd0();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_e92dd0();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/ea2abd.wgsl b/test/tint/builtins/gen/var/textureLoad/ea2abd.wgsl
new file mode 100644
index 0000000..6aac72c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/ea2abd.wgsl
@@ -0,0 +1,49 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d<rgba32float, read>;
+
+// fn textureLoad(texture: texture_storage_2d<rgba32float, read>, coords: vec2<u32>) -> vec4<f32>
+fn textureLoad_ea2abd() {
+  var arg_1 = vec2<u32>(1u);
+  var res: vec4<f32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_ea2abd();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_ea2abd();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_ea2abd();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/ea2abd.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/ea2abd.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..b7a735b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/ea2abd.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture2D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_ea2abd() {
+  uint2 arg_1 = (1u).xx;
+  float4 res = arg_0.Load(uint3(arg_1, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_ea2abd();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_ea2abd();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_ea2abd();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/ea2abd.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/ea2abd.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..b7a735b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/ea2abd.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture2D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_ea2abd() {
+  uint2 arg_1 = (1u).xx;
+  float4 res = arg_0.Load(uint3(arg_1, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_ea2abd();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_ea2abd();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_ea2abd();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/ea2abd.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/ea2abd.wgsl.expected.glsl
new file mode 100644
index 0000000..a8404f3
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/ea2abd.wgsl.expected.glsl
@@ -0,0 +1,90 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba32f) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_ea2abd() {
+  uvec2 arg_1 = uvec2(1u);
+  vec4 res = texelFetch(arg_0, ivec2(arg_1));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_ea2abd();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba32f' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba32f) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_ea2abd() {
+  uvec2 arg_1 = uvec2(1u);
+  vec4 res = texelFetch(arg_0, ivec2(arg_1));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_ea2abd();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba32f' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba32f) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_ea2abd() {
+  uvec2 arg_1 = uvec2(1u);
+  vec4 res = texelFetch(arg_0, ivec2(arg_1));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_ea2abd();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba32f' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/ea2abd.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/ea2abd.wgsl.expected.msl
new file mode 100644
index 0000000..50d3639
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/ea2abd.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_ea2abd(texture2d<float, access::read> tint_symbol_1, device float4* const tint_symbol_2) {
+  uint2 arg_1 = uint2(1u);
+  float4 res = tint_symbol_1.read(uint2(arg_1));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<float, access::read> tint_symbol_3, device float4* const tint_symbol_4) {
+  textureLoad_ea2abd(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<float, access::read> tint_symbol_5 [[texture(0)]], device float4* tint_symbol_6 [[buffer(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::read> tint_symbol_7 [[texture(0)]], device float4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_ea2abd(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d<float, access::read> tint_symbol_9 [[texture(0)]], device float4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_ea2abd(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/ea2abd.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/ea2abd.wgsl.expected.spvasm
new file mode 100644
index 0000000..358b8dd
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/ea2abd.wgsl.expected.spvasm
@@ -0,0 +1,97 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 49
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_ea2abd "textureLoad_ea2abd"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 0 0 2 Rgba32f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+%prevent_dce_block = OpTypeStruct %v4float
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+     %uint_1 = OpConstant %uint 1
+         %22 = OpConstantComposite %v2uint %uint_1 %uint_1
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %25 = OpConstantNull %v2uint
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
+         %35 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_ea2abd = OpFunction %void None %15
+         %18 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v2uint Function %25
+        %res = OpVariable %_ptr_Function_v4float Function %5
+               OpStore %arg_1 %22
+         %27 = OpLoad %11 %arg_0
+         %28 = OpLoad %v2uint %arg_1
+         %26 = OpImageRead %v4float %27 %28
+               OpStore %res %26
+         %33 = OpAccessChain %_ptr_StorageBuffer_v4float %prevent_dce %uint_0
+         %34 = OpLoad %v4float %res
+               OpStore %33 %34
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %35
+         %37 = OpLabel
+         %38 = OpFunctionCall %void %textureLoad_ea2abd
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %40 = OpLabel
+         %41 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %41
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %44 = OpLabel
+         %45 = OpFunctionCall %void %textureLoad_ea2abd
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %47 = OpLabel
+         %48 = OpFunctionCall %void %textureLoad_ea2abd
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/ea2abd.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/ea2abd.wgsl.expected.wgsl
new file mode 100644
index 0000000..10fcda0
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/ea2abd.wgsl.expected.wgsl
@@ -0,0 +1,27 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d<rgba32float, read>;
+
+fn textureLoad_ea2abd() {
+  var arg_1 = vec2<u32>(1u);
+  var res : vec4<f32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_ea2abd();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_ea2abd();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_ea2abd();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/eb573b.wgsl b/test/tint/builtins/gen/var/textureLoad/eb573b.wgsl
new file mode 100644
index 0000000..04398e7
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/eb573b.wgsl
@@ -0,0 +1,49 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d<r32sint, read>;
+
+// fn textureLoad(texture: texture_storage_2d<r32sint, read>, coords: vec2<i32>) -> vec4<i32>
+fn textureLoad_eb573b() {
+  var arg_1 = vec2<i32>(1i);
+  var res: vec4<i32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_eb573b();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_eb573b();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_eb573b();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/eb573b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/eb573b.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..6cfe2e1
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/eb573b.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture2D<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_eb573b() {
+  int2 arg_1 = (1).xx;
+  int4 res = arg_0.Load(int3(arg_1, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_eb573b();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_eb573b();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_eb573b();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/eb573b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/eb573b.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..6cfe2e1
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/eb573b.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture2D<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_eb573b() {
+  int2 arg_1 = (1).xx;
+  int4 res = arg_0.Load(int3(arg_1, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_eb573b();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_eb573b();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_eb573b();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/eb573b.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/eb573b.wgsl.expected.glsl
new file mode 100644
index 0000000..cd38693
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/eb573b.wgsl.expected.glsl
@@ -0,0 +1,96 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(r32i) uniform highp iimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_eb573b() {
+  ivec2 arg_1 = ivec2(1);
+  ivec4 res = texelFetch(arg_0, arg_1);
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_eb573b();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:10: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:10: '=' :  cannot convert from ' const float' to ' temp highp 4-component vector of int'
+ERROR: 0:10: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(r32i) uniform highp iimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_eb573b() {
+  ivec2 arg_1 = ivec2(1);
+  ivec4 res = texelFetch(arg_0, arg_1);
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_eb573b();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:11: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:11: '=' :  cannot convert from ' const float' to ' temp mediump 4-component vector of int'
+ERROR: 0:11: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(r32i) uniform highp iimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_eb573b() {
+  ivec2 arg_1 = ivec2(1);
+  ivec4 res = texelFetch(arg_0, arg_1);
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_eb573b();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:10: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:10: '=' :  cannot convert from ' const float' to ' temp highp 4-component vector of int'
+ERROR: 0:10: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/eb573b.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/eb573b.wgsl.expected.msl
new file mode 100644
index 0000000..fd0eed0
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/eb573b.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_eb573b(texture2d<int, access::read> tint_symbol_1, device int4* const tint_symbol_2) {
+  int2 arg_1 = int2(1);
+  int4 res = tint_symbol_1.read(uint2(arg_1));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<int, access::read> tint_symbol_3, device int4* const tint_symbol_4) {
+  textureLoad_eb573b(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<int, access::read> tint_symbol_5 [[texture(0)]], device int4* tint_symbol_6 [[buffer(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<int, access::read> tint_symbol_7 [[texture(0)]], device int4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_eb573b(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d<int, access::read> tint_symbol_9 [[texture(0)]], device int4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_eb573b(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/eb573b.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/eb573b.wgsl.expected.spvasm
new file mode 100644
index 0000000..a12a86e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/eb573b.wgsl.expected.spvasm
@@ -0,0 +1,100 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 52
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_eb573b "textureLoad_eb573b"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 2D 0 0 0 2 R32i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+      %v4int = OpTypeVector %int 4
+%prevent_dce_block = OpTypeStruct %v4int
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+      %v2int = OpTypeVector %int 2
+      %int_1 = OpConstant %int 1
+         %23 = OpConstantComposite %v2int %int_1 %int_1
+%_ptr_Function_v2int = OpTypePointer Function %v2int
+         %26 = OpConstantNull %v2int
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+         %32 = OpConstantNull %v4int
+       %uint = OpTypeInt 32 0
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4int = OpTypePointer StorageBuffer %v4int
+         %38 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_eb573b = OpFunction %void None %17
+         %20 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v2int Function %26
+        %res = OpVariable %_ptr_Function_v4int Function %32
+               OpStore %arg_1 %23
+         %28 = OpLoad %11 %arg_0
+         %29 = OpLoad %v2int %arg_1
+         %27 = OpImageRead %v4int %28 %29
+               OpStore %res %27
+         %36 = OpAccessChain %_ptr_StorageBuffer_v4int %prevent_dce %uint_0
+         %37 = OpLoad %v4int %res
+               OpStore %36 %37
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %38
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %textureLoad_eb573b
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %43 = OpLabel
+         %44 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %44
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %47 = OpLabel
+         %48 = OpFunctionCall %void %textureLoad_eb573b
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %50 = OpLabel
+         %51 = OpFunctionCall %void %textureLoad_eb573b
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/eb573b.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/eb573b.wgsl.expected.wgsl
new file mode 100644
index 0000000..eab04d3
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/eb573b.wgsl.expected.wgsl
@@ -0,0 +1,27 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d<r32sint, read>;
+
+fn textureLoad_eb573b() {
+  var arg_1 = vec2<i32>(1i);
+  var res : vec4<i32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_eb573b();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_eb573b();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_eb573b();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/ecc823.wgsl b/test/tint/builtins/gen/var/textureLoad/ecc823.wgsl
new file mode 100644
index 0000000..ac92eff
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/ecc823.wgsl
@@ -0,0 +1,49 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d<rgba16uint, read>;
+
+// fn textureLoad(texture: texture_storage_2d<rgba16uint, read>, coords: vec2<i32>) -> vec4<u32>
+fn textureLoad_ecc823() {
+  var arg_1 = vec2<i32>(1i);
+  var res: vec4<u32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_ecc823();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_ecc823();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_ecc823();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/ecc823.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/ecc823.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..da8e297
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/ecc823.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture2D<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_ecc823() {
+  int2 arg_1 = (1).xx;
+  uint4 res = arg_0.Load(int3(arg_1, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_ecc823();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_ecc823();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_ecc823();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/ecc823.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/ecc823.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..da8e297
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/ecc823.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture2D<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_ecc823() {
+  int2 arg_1 = (1).xx;
+  uint4 res = arg_0.Load(int3(arg_1, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_ecc823();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_ecc823();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_ecc823();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/ecc823.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/ecc823.wgsl.expected.glsl
new file mode 100644
index 0000000..18486a6
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/ecc823.wgsl.expected.glsl
@@ -0,0 +1,90 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba16ui) uniform highp uimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_ecc823() {
+  ivec2 arg_1 = ivec2(1);
+  uvec4 res = texelFetch(arg_0, arg_1);
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_ecc823();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba16ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba16ui) uniform highp uimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_ecc823() {
+  ivec2 arg_1 = ivec2(1);
+  uvec4 res = texelFetch(arg_0, arg_1);
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_ecc823();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba16ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba16ui) uniform highp uimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_ecc823() {
+  ivec2 arg_1 = ivec2(1);
+  uvec4 res = texelFetch(arg_0, arg_1);
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_ecc823();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba16ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/ecc823.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/ecc823.wgsl.expected.msl
new file mode 100644
index 0000000..93fb35b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/ecc823.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_ecc823(texture2d<uint, access::read> tint_symbol_1, device uint4* const tint_symbol_2) {
+  int2 arg_1 = int2(1);
+  uint4 res = tint_symbol_1.read(uint2(arg_1));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<uint, access::read> tint_symbol_3, device uint4* const tint_symbol_4) {
+  textureLoad_ecc823(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<uint, access::read> tint_symbol_5 [[texture(0)]], device uint4* tint_symbol_6 [[buffer(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<uint, access::read> tint_symbol_7 [[texture(0)]], device uint4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_ecc823(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d<uint, access::read> tint_symbol_9 [[texture(0)]], device uint4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_ecc823(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/ecc823.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/ecc823.wgsl.expected.spvasm
new file mode 100644
index 0000000..54de86b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/ecc823.wgsl.expected.spvasm
@@ -0,0 +1,100 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 52
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_ecc823 "textureLoad_ecc823"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 2D 0 0 0 2 Rgba16ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+     %v4uint = OpTypeVector %uint 4
+%prevent_dce_block = OpTypeStruct %v4uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %v2int = OpTypeVector %int 2
+      %int_1 = OpConstant %int 1
+         %24 = OpConstantComposite %v2int %int_1 %int_1
+%_ptr_Function_v2int = OpTypePointer Function %v2int
+         %27 = OpConstantNull %v2int
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+         %33 = OpConstantNull %v4uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4uint = OpTypePointer StorageBuffer %v4uint
+         %38 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_ecc823 = OpFunction %void None %17
+         %20 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v2int Function %27
+        %res = OpVariable %_ptr_Function_v4uint Function %33
+               OpStore %arg_1 %24
+         %29 = OpLoad %11 %arg_0
+         %30 = OpLoad %v2int %arg_1
+         %28 = OpImageRead %v4uint %29 %30
+               OpStore %res %28
+         %36 = OpAccessChain %_ptr_StorageBuffer_v4uint %prevent_dce %uint_0
+         %37 = OpLoad %v4uint %res
+               OpStore %36 %37
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %38
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %textureLoad_ecc823
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %43 = OpLabel
+         %44 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %44
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %47 = OpLabel
+         %48 = OpFunctionCall %void %textureLoad_ecc823
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %50 = OpLabel
+         %51 = OpFunctionCall %void %textureLoad_ecc823
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/ecc823.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/ecc823.wgsl.expected.wgsl
new file mode 100644
index 0000000..bd380a9
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/ecc823.wgsl.expected.wgsl
@@ -0,0 +1,27 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d<rgba16uint, read>;
+
+fn textureLoad_ecc823() {
+  var arg_1 = vec2<i32>(1i);
+  var res : vec4<u32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_ecc823();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_ecc823();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_ecc823();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/ee33c5.wgsl b/test/tint/builtins/gen/var/textureLoad/ee33c5.wgsl
new file mode 100644
index 0000000..c71a601
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/ee33c5.wgsl
@@ -0,0 +1,49 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_3d<rgba16sint, read>;
+
+// fn textureLoad(texture: texture_storage_3d<rgba16sint, read>, coords: vec3<u32>) -> vec4<i32>
+fn textureLoad_ee33c5() {
+  var arg_1 = vec3<u32>(1u);
+  var res: vec4<i32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_ee33c5();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_ee33c5();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_ee33c5();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/ee33c5.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/ee33c5.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..c91b15b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/ee33c5.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture3D<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_ee33c5() {
+  uint3 arg_1 = (1u).xxx;
+  int4 res = arg_0.Load(uint4(arg_1, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_ee33c5();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_ee33c5();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_ee33c5();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/ee33c5.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/ee33c5.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..c91b15b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/ee33c5.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture3D<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_ee33c5() {
+  uint3 arg_1 = (1u).xxx;
+  int4 res = arg_0.Load(uint4(arg_1, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_ee33c5();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_ee33c5();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_ee33c5();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/ee33c5.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/ee33c5.wgsl.expected.glsl
new file mode 100644
index 0000000..af0f785
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/ee33c5.wgsl.expected.glsl
@@ -0,0 +1,90 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba16i) uniform highp iimage3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_ee33c5() {
+  uvec3 arg_1 = uvec3(1u);
+  ivec4 res = texelFetch(arg_0, ivec3(arg_1));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_ee33c5();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba16i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba16i) uniform highp iimage3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_ee33c5() {
+  uvec3 arg_1 = uvec3(1u);
+  ivec4 res = texelFetch(arg_0, ivec3(arg_1));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_ee33c5();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba16i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba16i) uniform highp iimage3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_ee33c5() {
+  uvec3 arg_1 = uvec3(1u);
+  ivec4 res = texelFetch(arg_0, ivec3(arg_1));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_ee33c5();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba16i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/ee33c5.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/ee33c5.wgsl.expected.msl
new file mode 100644
index 0000000..c85e75b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/ee33c5.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_ee33c5(texture3d<int, access::read> tint_symbol_1, device int4* const tint_symbol_2) {
+  uint3 arg_1 = uint3(1u);
+  int4 res = tint_symbol_1.read(uint3(arg_1));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<int, access::read> tint_symbol_3, device int4* const tint_symbol_4) {
+  textureLoad_ee33c5(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<int, access::read> tint_symbol_5 [[texture(0)]], device int4* tint_symbol_6 [[buffer(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<int, access::read> tint_symbol_7 [[texture(0)]], device int4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_ee33c5(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture3d<int, access::read> tint_symbol_9 [[texture(0)]], device int4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_ee33c5(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/ee33c5.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/ee33c5.wgsl.expected.spvasm
new file mode 100644
index 0000000..7625f74
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/ee33c5.wgsl.expected.spvasm
@@ -0,0 +1,100 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 52
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_ee33c5 "textureLoad_ee33c5"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 3D 0 0 0 2 Rgba16i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+      %v4int = OpTypeVector %int 4
+%prevent_dce_block = OpTypeStruct %v4int
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v3uint = OpTypeVector %uint 3
+     %uint_1 = OpConstant %uint 1
+         %24 = OpConstantComposite %v3uint %uint_1 %uint_1 %uint_1
+%_ptr_Function_v3uint = OpTypePointer Function %v3uint
+         %27 = OpConstantNull %v3uint
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+         %33 = OpConstantNull %v4int
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4int = OpTypePointer StorageBuffer %v4int
+         %38 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_ee33c5 = OpFunction %void None %17
+         %20 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v3uint Function %27
+        %res = OpVariable %_ptr_Function_v4int Function %33
+               OpStore %arg_1 %24
+         %29 = OpLoad %11 %arg_0
+         %30 = OpLoad %v3uint %arg_1
+         %28 = OpImageRead %v4int %29 %30
+               OpStore %res %28
+         %36 = OpAccessChain %_ptr_StorageBuffer_v4int %prevent_dce %uint_0
+         %37 = OpLoad %v4int %res
+               OpStore %36 %37
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %38
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %textureLoad_ee33c5
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %43 = OpLabel
+         %44 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %44
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %47 = OpLabel
+         %48 = OpFunctionCall %void %textureLoad_ee33c5
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %50 = OpLabel
+         %51 = OpFunctionCall %void %textureLoad_ee33c5
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/ee33c5.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/ee33c5.wgsl.expected.wgsl
new file mode 100644
index 0000000..8c10284
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/ee33c5.wgsl.expected.wgsl
@@ -0,0 +1,27 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_3d<rgba16sint, read>;
+
+fn textureLoad_ee33c5() {
+  var arg_1 = vec3<u32>(1u);
+  var res : vec4<i32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_ee33c5();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_ee33c5();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_ee33c5();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/eecf7d.wgsl b/test/tint/builtins/gen/var/textureLoad/eecf7d.wgsl
new file mode 100644
index 0000000..34f0d7e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/eecf7d.wgsl
@@ -0,0 +1,50 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rg32uint, read>;
+
+// fn textureLoad(texture: texture_storage_2d_array<rg32uint, read>, coords: vec2<i32>, array_index: u32) -> vec4<u32>
+fn textureLoad_eecf7d() {
+  var arg_1 = vec2<i32>(1i);
+  var arg_2 = 1u;
+  var res: vec4<u32> = textureLoad(arg_0, arg_1, arg_2);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_eecf7d();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_eecf7d();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_eecf7d();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/eecf7d.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/eecf7d.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..7179ee3
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/eecf7d.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_eecf7d() {
+  int2 arg_1 = (1).xx;
+  uint arg_2 = 1u;
+  uint4 res = arg_0.Load(int4(int3(arg_1, int(arg_2)), 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_eecf7d();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_eecf7d();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_eecf7d();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/eecf7d.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/eecf7d.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..7179ee3
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/eecf7d.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_eecf7d() {
+  int2 arg_1 = (1).xx;
+  uint arg_2 = 1u;
+  uint4 res = arg_0.Load(int4(int3(arg_1, int(arg_2)), 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_eecf7d();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_eecf7d();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_eecf7d();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/eecf7d.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/eecf7d.wgsl.expected.glsl
new file mode 100644
index 0000000..8151823
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/eecf7d.wgsl.expected.glsl
@@ -0,0 +1,96 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rg32ui) uniform highp uimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_eecf7d() {
+  ivec2 arg_1 = ivec2(1);
+  uint arg_2 = 1u;
+  uvec4 res = texelFetch(arg_0, ivec3(arg_1, int(arg_2)));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_eecf7d();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rg32ui) uniform highp uimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_eecf7d() {
+  ivec2 arg_1 = ivec2(1);
+  uint arg_2 = 1u;
+  uvec4 res = texelFetch(arg_0, ivec3(arg_1, int(arg_2)));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_eecf7d();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'image load-store format' : not supported with this profile: es
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rg32ui) uniform highp uimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_eecf7d() {
+  ivec2 arg_1 = ivec2(1);
+  uint arg_2 = 1u;
+  uvec4 res = texelFetch(arg_0, ivec3(arg_1, int(arg_2)));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_eecf7d();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/eecf7d.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/eecf7d.wgsl.expected.msl
new file mode 100644
index 0000000..965f550
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/eecf7d.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_eecf7d(texture2d_array<uint, access::read> tint_symbol_1, device uint4* const tint_symbol_2) {
+  int2 arg_1 = int2(1);
+  uint arg_2 = 1u;
+  uint4 res = tint_symbol_1.read(uint2(arg_1), arg_2);
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<uint, access::read> tint_symbol_3, device uint4* const tint_symbol_4) {
+  textureLoad_eecf7d(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<uint, access::read> tint_symbol_5 [[texture(0)]], device uint4* tint_symbol_6 [[buffer(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<uint, access::read> tint_symbol_7 [[texture(0)]], device uint4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_eecf7d(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<uint, access::read> tint_symbol_9 [[texture(0)]], device uint4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_eecf7d(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/eecf7d.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/eecf7d.wgsl.expected.spvasm
new file mode 100644
index 0000000..89ac24e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/eecf7d.wgsl.expected.spvasm
@@ -0,0 +1,113 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 62
+; Schema: 0
+               OpCapability Shader
+               OpCapability StorageImageExtendedFormats
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_eecf7d "textureLoad_eecf7d"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 2D 0 1 0 2 Rg32ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+     %v4uint = OpTypeVector %uint 4
+%prevent_dce_block = OpTypeStruct %v4uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %v2int = OpTypeVector %int 2
+      %int_1 = OpConstant %int 1
+         %24 = OpConstantComposite %v2int %int_1 %int_1
+%_ptr_Function_v2int = OpTypePointer Function %v2int
+         %27 = OpConstantNull %v2int
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %31 = OpConstantNull %uint
+      %v3int = OpTypeVector %int 3
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+         %43 = OpConstantNull %v4uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4uint = OpTypePointer StorageBuffer %v4uint
+         %48 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_eecf7d = OpFunction %void None %17
+         %20 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v2int Function %27
+      %arg_2 = OpVariable %_ptr_Function_uint Function %31
+        %res = OpVariable %_ptr_Function_v4uint Function %43
+               OpStore %arg_1 %24
+               OpStore %arg_2 %uint_1
+         %33 = OpLoad %11 %arg_0
+         %35 = OpLoad %v2int %arg_1
+         %36 = OpCompositeExtract %int %35 0
+         %37 = OpCompositeExtract %int %35 1
+         %39 = OpLoad %uint %arg_2
+         %38 = OpBitcast %int %39
+         %40 = OpCompositeConstruct %v3int %36 %37 %38
+         %32 = OpImageRead %v4uint %33 %40
+               OpStore %res %32
+         %46 = OpAccessChain %_ptr_StorageBuffer_v4uint %prevent_dce %uint_0
+         %47 = OpLoad %v4uint %res
+               OpStore %46 %47
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %48
+         %50 = OpLabel
+         %51 = OpFunctionCall %void %textureLoad_eecf7d
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %53 = OpLabel
+         %54 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %54
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %57 = OpLabel
+         %58 = OpFunctionCall %void %textureLoad_eecf7d
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %60 = OpLabel
+         %61 = OpFunctionCall %void %textureLoad_eecf7d
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/eecf7d.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/eecf7d.wgsl.expected.wgsl
new file mode 100644
index 0000000..883ec36
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/eecf7d.wgsl.expected.wgsl
@@ -0,0 +1,28 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rg32uint, read>;
+
+fn textureLoad_eecf7d() {
+  var arg_1 = vec2<i32>(1i);
+  var arg_2 = 1u;
+  var res : vec4<u32> = textureLoad(arg_0, arg_1, arg_2);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_eecf7d();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_eecf7d();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_eecf7d();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/ef5405.wgsl b/test/tint/builtins/gen/var/textureLoad/ef5405.wgsl
new file mode 100644
index 0000000..5409856
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/ef5405.wgsl
@@ -0,0 +1,49 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_3d<rg32uint, read>;
+
+// fn textureLoad(texture: texture_storage_3d<rg32uint, read>, coords: vec3<i32>) -> vec4<u32>
+fn textureLoad_ef5405() {
+  var arg_1 = vec3<i32>(1i);
+  var res: vec4<u32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_ef5405();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_ef5405();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_ef5405();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/ef5405.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/ef5405.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..eb7bcdc
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/ef5405.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture3D<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_ef5405() {
+  int3 arg_1 = (1).xxx;
+  uint4 res = arg_0.Load(int4(arg_1, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_ef5405();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_ef5405();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_ef5405();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/ef5405.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/ef5405.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..eb7bcdc
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/ef5405.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture3D<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_ef5405() {
+  int3 arg_1 = (1).xxx;
+  uint4 res = arg_0.Load(int4(arg_1, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_ef5405();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_ef5405();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_ef5405();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/ef5405.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/ef5405.wgsl.expected.glsl
new file mode 100644
index 0000000..6058a0d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/ef5405.wgsl.expected.glsl
@@ -0,0 +1,93 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rg32ui) uniform highp uimage3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_ef5405() {
+  ivec3 arg_1 = ivec3(1);
+  uvec4 res = texelFetch(arg_0, arg_1);
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_ef5405();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rg32ui) uniform highp uimage3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_ef5405() {
+  ivec3 arg_1 = ivec3(1);
+  uvec4 res = texelFetch(arg_0, arg_1);
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_ef5405();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'image load-store format' : not supported with this profile: es
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rg32ui) uniform highp uimage3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_ef5405() {
+  ivec3 arg_1 = ivec3(1);
+  uvec4 res = texelFetch(arg_0, arg_1);
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_ef5405();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/ef5405.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/ef5405.wgsl.expected.msl
new file mode 100644
index 0000000..e8967d3
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/ef5405.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_ef5405(texture3d<uint, access::read> tint_symbol_1, device uint4* const tint_symbol_2) {
+  int3 arg_1 = int3(1);
+  uint4 res = tint_symbol_1.read(uint3(arg_1));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<uint, access::read> tint_symbol_3, device uint4* const tint_symbol_4) {
+  textureLoad_ef5405(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<uint, access::read> tint_symbol_5 [[texture(0)]], device uint4* tint_symbol_6 [[buffer(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<uint, access::read> tint_symbol_7 [[texture(0)]], device uint4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_ef5405(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture3d<uint, access::read> tint_symbol_9 [[texture(0)]], device uint4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_ef5405(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/ef5405.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/ef5405.wgsl.expected.spvasm
new file mode 100644
index 0000000..acf7533
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/ef5405.wgsl.expected.spvasm
@@ -0,0 +1,101 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 52
+; Schema: 0
+               OpCapability Shader
+               OpCapability StorageImageExtendedFormats
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_ef5405 "textureLoad_ef5405"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 3D 0 0 0 2 Rg32ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+     %v4uint = OpTypeVector %uint 4
+%prevent_dce_block = OpTypeStruct %v4uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %v3int = OpTypeVector %int 3
+      %int_1 = OpConstant %int 1
+         %24 = OpConstantComposite %v3int %int_1 %int_1 %int_1
+%_ptr_Function_v3int = OpTypePointer Function %v3int
+         %27 = OpConstantNull %v3int
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+         %33 = OpConstantNull %v4uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4uint = OpTypePointer StorageBuffer %v4uint
+         %38 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_ef5405 = OpFunction %void None %17
+         %20 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v3int Function %27
+        %res = OpVariable %_ptr_Function_v4uint Function %33
+               OpStore %arg_1 %24
+         %29 = OpLoad %11 %arg_0
+         %30 = OpLoad %v3int %arg_1
+         %28 = OpImageRead %v4uint %29 %30
+               OpStore %res %28
+         %36 = OpAccessChain %_ptr_StorageBuffer_v4uint %prevent_dce %uint_0
+         %37 = OpLoad %v4uint %res
+               OpStore %36 %37
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %38
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %textureLoad_ef5405
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %43 = OpLabel
+         %44 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %44
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %47 = OpLabel
+         %48 = OpFunctionCall %void %textureLoad_ef5405
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %50 = OpLabel
+         %51 = OpFunctionCall %void %textureLoad_ef5405
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/ef5405.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/ef5405.wgsl.expected.wgsl
new file mode 100644
index 0000000..45fe824
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/ef5405.wgsl.expected.wgsl
@@ -0,0 +1,27 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_3d<rg32uint, read>;
+
+fn textureLoad_ef5405() {
+  var arg_1 = vec3<i32>(1i);
+  var res : vec4<u32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_ef5405();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_ef5405();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_ef5405();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/efa787.wgsl b/test/tint/builtins/gen/var/textureLoad/efa787.wgsl
new file mode 100644
index 0000000..5b7793e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/efa787.wgsl
@@ -0,0 +1,50 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba8unorm, read>;
+
+// fn textureLoad(texture: texture_storage_2d_array<rgba8unorm, read>, coords: vec2<u32>, array_index: u32) -> vec4<f32>
+fn textureLoad_efa787() {
+  var arg_1 = vec2<u32>(1u);
+  var arg_2 = 1u;
+  var res: vec4<f32> = textureLoad(arg_0, arg_1, arg_2);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_efa787();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_efa787();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_efa787();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/efa787.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/efa787.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..271ab12
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/efa787.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_efa787() {
+  uint2 arg_1 = (1u).xx;
+  uint arg_2 = 1u;
+  float4 res = arg_0.Load(uint4(uint3(arg_1, arg_2), uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_efa787();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_efa787();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_efa787();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/efa787.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/efa787.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..271ab12
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/efa787.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_efa787() {
+  uint2 arg_1 = (1u).xx;
+  uint arg_2 = 1u;
+  float4 res = arg_0.Load(uint4(uint3(arg_1, arg_2), uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_efa787();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_efa787();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_efa787();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/efa787.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/efa787.wgsl.expected.glsl
new file mode 100644
index 0000000..8262d16
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/efa787.wgsl.expected.glsl
@@ -0,0 +1,93 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba8) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_efa787() {
+  uvec2 arg_1 = uvec2(1u);
+  uint arg_2 = 1u;
+  vec4 res = texelFetch(arg_0, ivec3(uvec3(arg_1, arg_2)));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_efa787();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba8) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_efa787() {
+  uvec2 arg_1 = uvec2(1u);
+  uint arg_2 = 1u;
+  vec4 res = texelFetch(arg_0, ivec3(uvec3(arg_1, arg_2)));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_efa787();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba8' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba8) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_efa787() {
+  uvec2 arg_1 = uvec2(1u);
+  uint arg_2 = 1u;
+  vec4 res = texelFetch(arg_0, ivec3(uvec3(arg_1, arg_2)));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_efa787();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/efa787.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/efa787.wgsl.expected.msl
new file mode 100644
index 0000000..f3aadaa
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/efa787.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_efa787(texture2d_array<float, access::read> tint_symbol_1, device float4* const tint_symbol_2) {
+  uint2 arg_1 = uint2(1u);
+  uint arg_2 = 1u;
+  float4 res = tint_symbol_1.read(uint2(arg_1), arg_2);
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<float, access::read> tint_symbol_3, device float4* const tint_symbol_4) {
+  textureLoad_efa787(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<float, access::read> tint_symbol_5 [[texture(0)]], device float4* tint_symbol_6 [[buffer(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::read> tint_symbol_7 [[texture(0)]], device float4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_efa787(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<float, access::read> tint_symbol_9 [[texture(0)]], device float4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_efa787(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/efa787.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/efa787.wgsl.expected.spvasm
new file mode 100644
index 0000000..82995b4
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/efa787.wgsl.expected.spvasm
@@ -0,0 +1,107 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 57
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_efa787 "textureLoad_efa787"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 1 0 2 Rgba8
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+%prevent_dce_block = OpTypeStruct %v4float
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+     %uint_1 = OpConstant %uint 1
+         %22 = OpConstantComposite %v2uint %uint_1 %uint_1
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %25 = OpConstantNull %v2uint
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %28 = OpConstantNull %uint
+     %v3uint = OpTypeVector %uint 3
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
+         %43 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_efa787 = OpFunction %void None %15
+         %18 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v2uint Function %25
+      %arg_2 = OpVariable %_ptr_Function_uint Function %28
+        %res = OpVariable %_ptr_Function_v4float Function %5
+               OpStore %arg_1 %22
+               OpStore %arg_2 %uint_1
+         %30 = OpLoad %11 %arg_0
+         %32 = OpLoad %v2uint %arg_1
+         %33 = OpCompositeExtract %uint %32 0
+         %34 = OpCompositeExtract %uint %32 1
+         %35 = OpLoad %uint %arg_2
+         %36 = OpCompositeConstruct %v3uint %33 %34 %35
+         %29 = OpImageRead %v4float %30 %36
+               OpStore %res %29
+         %41 = OpAccessChain %_ptr_StorageBuffer_v4float %prevent_dce %uint_0
+         %42 = OpLoad %v4float %res
+               OpStore %41 %42
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %43
+         %45 = OpLabel
+         %46 = OpFunctionCall %void %textureLoad_efa787
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %48 = OpLabel
+         %49 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %49
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %52 = OpLabel
+         %53 = OpFunctionCall %void %textureLoad_efa787
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %55 = OpLabel
+         %56 = OpFunctionCall %void %textureLoad_efa787
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/efa787.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/efa787.wgsl.expected.wgsl
new file mode 100644
index 0000000..849ddbf
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/efa787.wgsl.expected.wgsl
@@ -0,0 +1,28 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba8unorm, read>;
+
+fn textureLoad_efa787() {
+  var arg_1 = vec2<u32>(1u);
+  var arg_2 = 1u;
+  var res : vec4<f32> = textureLoad(arg_0, arg_1, arg_2);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_efa787();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_efa787();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_efa787();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/f06b69.wgsl b/test/tint/builtins/gen/var/textureLoad/f06b69.wgsl
new file mode 100644
index 0000000..2f5af89
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/f06b69.wgsl
@@ -0,0 +1,49 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_1d<r32sint, read>;
+
+// fn textureLoad(texture: texture_storage_1d<r32sint, read>, coords: i32) -> vec4<i32>
+fn textureLoad_f06b69() {
+  var arg_1 = 1i;
+  var res: vec4<i32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_f06b69();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_f06b69();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_f06b69();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/f06b69.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/f06b69.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..79862a8
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/f06b69.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture1D<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_f06b69() {
+  int arg_1 = 1;
+  int4 res = arg_0.Load(int2(arg_1, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_f06b69();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_f06b69();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_f06b69();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/f06b69.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/f06b69.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..79862a8
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/f06b69.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture1D<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_f06b69() {
+  int arg_1 = 1;
+  int4 res = arg_0.Load(int2(arg_1, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_f06b69();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_f06b69();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_f06b69();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/f06b69.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/f06b69.wgsl.expected.glsl
new file mode 100644
index 0000000..94aed8e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/f06b69.wgsl.expected.glsl
@@ -0,0 +1,96 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(r32i) uniform highp iimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_f06b69() {
+  int arg_1 = 1;
+  ivec4 res = texelFetch(arg_0, ivec2(arg_1, 0));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_f06b69();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:10: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:10: '=' :  cannot convert from ' const float' to ' temp highp 4-component vector of int'
+ERROR: 0:10: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(r32i) uniform highp iimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_f06b69() {
+  int arg_1 = 1;
+  ivec4 res = texelFetch(arg_0, ivec2(arg_1, 0));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_f06b69();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:11: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:11: '=' :  cannot convert from ' const float' to ' temp mediump 4-component vector of int'
+ERROR: 0:11: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(r32i) uniform highp iimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_f06b69() {
+  int arg_1 = 1;
+  ivec4 res = texelFetch(arg_0, ivec2(arg_1, 0));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_f06b69();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:10: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:10: '=' :  cannot convert from ' const float' to ' temp highp 4-component vector of int'
+ERROR: 0:10: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/f06b69.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/f06b69.wgsl.expected.msl
new file mode 100644
index 0000000..251203f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/f06b69.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_f06b69(texture1d<int, access::read> tint_symbol_1, device int4* const tint_symbol_2) {
+  int arg_1 = 1;
+  int4 res = tint_symbol_1.read(uint(arg_1));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<int, access::read> tint_symbol_3, device int4* const tint_symbol_4) {
+  textureLoad_f06b69(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<int, access::read> tint_symbol_5 [[texture(0)]], device int4* tint_symbol_6 [[buffer(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(texture1d<int, access::read> tint_symbol_7 [[texture(0)]], device int4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_f06b69(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture1d<int, access::read> tint_symbol_9 [[texture(0)]], device int4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_f06b69(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/f06b69.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/f06b69.wgsl.expected.spvasm
new file mode 100644
index 0000000..c688ba8
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/f06b69.wgsl.expected.spvasm
@@ -0,0 +1,99 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 50
+; Schema: 0
+               OpCapability Shader
+               OpCapability Image1D
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_f06b69 "textureLoad_f06b69"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 1D 0 0 0 2 R32i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+      %v4int = OpTypeVector %int 4
+%prevent_dce_block = OpTypeStruct %v4int
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+      %int_1 = OpConstant %int 1
+%_ptr_Function_int = OpTypePointer Function %int
+         %24 = OpConstantNull %int
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+         %30 = OpConstantNull %v4int
+       %uint = OpTypeInt 32 0
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4int = OpTypePointer StorageBuffer %v4int
+         %36 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_f06b69 = OpFunction %void None %17
+         %20 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_int Function %24
+        %res = OpVariable %_ptr_Function_v4int Function %30
+               OpStore %arg_1 %int_1
+         %26 = OpLoad %11 %arg_0
+         %27 = OpLoad %int %arg_1
+         %25 = OpImageRead %v4int %26 %27
+               OpStore %res %25
+         %34 = OpAccessChain %_ptr_StorageBuffer_v4int %prevent_dce %uint_0
+         %35 = OpLoad %v4int %res
+               OpStore %34 %35
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %36
+         %38 = OpLabel
+         %39 = OpFunctionCall %void %textureLoad_f06b69
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %41 = OpLabel
+         %42 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %42
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %45 = OpLabel
+         %46 = OpFunctionCall %void %textureLoad_f06b69
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %48 = OpLabel
+         %49 = OpFunctionCall %void %textureLoad_f06b69
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/f06b69.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/f06b69.wgsl.expected.wgsl
new file mode 100644
index 0000000..cd73691
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/f06b69.wgsl.expected.wgsl
@@ -0,0 +1,27 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_1d<r32sint, read>;
+
+fn textureLoad_f06b69() {
+  var arg_1 = 1i;
+  var res : vec4<i32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_f06b69();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_f06b69();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_f06b69();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/f2a7ff.wgsl b/test/tint/builtins/gen/var/textureLoad/f2a7ff.wgsl
new file mode 100644
index 0000000..fa799bf
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/f2a7ff.wgsl
@@ -0,0 +1,49 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d<rgba8unorm, read>;
+
+// fn textureLoad(texture: texture_storage_2d<rgba8unorm, read>, coords: vec2<u32>) -> vec4<f32>
+fn textureLoad_f2a7ff() {
+  var arg_1 = vec2<u32>(1u);
+  var res: vec4<f32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_f2a7ff();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_f2a7ff();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_f2a7ff();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/f2a7ff.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/f2a7ff.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..9a01837
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/f2a7ff.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture2D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_f2a7ff() {
+  uint2 arg_1 = (1u).xx;
+  float4 res = arg_0.Load(uint3(arg_1, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_f2a7ff();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_f2a7ff();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_f2a7ff();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/f2a7ff.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/f2a7ff.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..9a01837
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/f2a7ff.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture2D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_f2a7ff() {
+  uint2 arg_1 = (1u).xx;
+  float4 res = arg_0.Load(uint3(arg_1, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_f2a7ff();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_f2a7ff();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_f2a7ff();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/f2a7ff.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/f2a7ff.wgsl.expected.glsl
new file mode 100644
index 0000000..bca0175
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/f2a7ff.wgsl.expected.glsl
@@ -0,0 +1,90 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba8) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_f2a7ff() {
+  uvec2 arg_1 = uvec2(1u);
+  vec4 res = texelFetch(arg_0, ivec2(arg_1));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_f2a7ff();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba8) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_f2a7ff() {
+  uvec2 arg_1 = uvec2(1u);
+  vec4 res = texelFetch(arg_0, ivec2(arg_1));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_f2a7ff();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba8' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba8) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_f2a7ff() {
+  uvec2 arg_1 = uvec2(1u);
+  vec4 res = texelFetch(arg_0, ivec2(arg_1));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_f2a7ff();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/f2a7ff.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/f2a7ff.wgsl.expected.msl
new file mode 100644
index 0000000..a13aafa
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/f2a7ff.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_f2a7ff(texture2d<float, access::read> tint_symbol_1, device float4* const tint_symbol_2) {
+  uint2 arg_1 = uint2(1u);
+  float4 res = tint_symbol_1.read(uint2(arg_1));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<float, access::read> tint_symbol_3, device float4* const tint_symbol_4) {
+  textureLoad_f2a7ff(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<float, access::read> tint_symbol_5 [[texture(0)]], device float4* tint_symbol_6 [[buffer(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::read> tint_symbol_7 [[texture(0)]], device float4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_f2a7ff(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d<float, access::read> tint_symbol_9 [[texture(0)]], device float4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_f2a7ff(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/f2a7ff.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/f2a7ff.wgsl.expected.spvasm
new file mode 100644
index 0000000..5c5410b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/f2a7ff.wgsl.expected.spvasm
@@ -0,0 +1,97 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 49
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_f2a7ff "textureLoad_f2a7ff"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 0 0 2 Rgba8
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+%prevent_dce_block = OpTypeStruct %v4float
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+     %uint_1 = OpConstant %uint 1
+         %22 = OpConstantComposite %v2uint %uint_1 %uint_1
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %25 = OpConstantNull %v2uint
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
+         %35 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_f2a7ff = OpFunction %void None %15
+         %18 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v2uint Function %25
+        %res = OpVariable %_ptr_Function_v4float Function %5
+               OpStore %arg_1 %22
+         %27 = OpLoad %11 %arg_0
+         %28 = OpLoad %v2uint %arg_1
+         %26 = OpImageRead %v4float %27 %28
+               OpStore %res %26
+         %33 = OpAccessChain %_ptr_StorageBuffer_v4float %prevent_dce %uint_0
+         %34 = OpLoad %v4float %res
+               OpStore %33 %34
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %35
+         %37 = OpLabel
+         %38 = OpFunctionCall %void %textureLoad_f2a7ff
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %40 = OpLabel
+         %41 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %41
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %44 = OpLabel
+         %45 = OpFunctionCall %void %textureLoad_f2a7ff
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %47 = OpLabel
+         %48 = OpFunctionCall %void %textureLoad_f2a7ff
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/f2a7ff.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/f2a7ff.wgsl.expected.wgsl
new file mode 100644
index 0000000..e0db5a5
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/f2a7ff.wgsl.expected.wgsl
@@ -0,0 +1,27 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d<rgba8unorm, read>;
+
+fn textureLoad_f2a7ff() {
+  var arg_1 = vec2<u32>(1u);
+  var res : vec4<f32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_f2a7ff();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_f2a7ff();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_f2a7ff();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/f35ac7.wgsl b/test/tint/builtins/gen/var/textureLoad/f35ac7.wgsl
new file mode 100644
index 0000000..795f342
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/f35ac7.wgsl
@@ -0,0 +1,49 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_1d<rgba8sint, read>;
+
+// fn textureLoad(texture: texture_storage_1d<rgba8sint, read>, coords: u32) -> vec4<i32>
+fn textureLoad_f35ac7() {
+  var arg_1 = 1u;
+  var res: vec4<i32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_f35ac7();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_f35ac7();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_f35ac7();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/f35ac7.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/f35ac7.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..7acf725
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/f35ac7.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture1D<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_f35ac7() {
+  uint arg_1 = 1u;
+  int4 res = arg_0.Load(uint2(arg_1, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_f35ac7();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_f35ac7();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_f35ac7();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/f35ac7.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/f35ac7.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..7acf725
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/f35ac7.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture1D<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_f35ac7() {
+  uint arg_1 = 1u;
+  int4 res = arg_0.Load(uint2(arg_1, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_f35ac7();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_f35ac7();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_f35ac7();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/f35ac7.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/f35ac7.wgsl.expected.glsl
new file mode 100644
index 0000000..f9c735b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/f35ac7.wgsl.expected.glsl
@@ -0,0 +1,90 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba8i) uniform highp iimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_f35ac7() {
+  uint arg_1 = 1u;
+  ivec4 res = texelFetch(arg_0, ivec2(uvec2(arg_1, 0u)));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_f35ac7();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba8i) uniform highp iimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_f35ac7() {
+  uint arg_1 = 1u;
+  ivec4 res = texelFetch(arg_0, ivec2(uvec2(arg_1, 0u)));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_f35ac7();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba8i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba8i) uniform highp iimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_f35ac7() {
+  uint arg_1 = 1u;
+  ivec4 res = texelFetch(arg_0, ivec2(uvec2(arg_1, 0u)));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_f35ac7();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/f35ac7.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/f35ac7.wgsl.expected.msl
new file mode 100644
index 0000000..39dd786
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/f35ac7.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_f35ac7(texture1d<int, access::read> tint_symbol_1, device int4* const tint_symbol_2) {
+  uint arg_1 = 1u;
+  int4 res = tint_symbol_1.read(uint(arg_1));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<int, access::read> tint_symbol_3, device int4* const tint_symbol_4) {
+  textureLoad_f35ac7(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<int, access::read> tint_symbol_5 [[texture(0)]], device int4* tint_symbol_6 [[buffer(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(texture1d<int, access::read> tint_symbol_7 [[texture(0)]], device int4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_f35ac7(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture1d<int, access::read> tint_symbol_9 [[texture(0)]], device int4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_f35ac7(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/f35ac7.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/f35ac7.wgsl.expected.spvasm
new file mode 100644
index 0000000..c3ad7cf
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/f35ac7.wgsl.expected.spvasm
@@ -0,0 +1,99 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 50
+; Schema: 0
+               OpCapability Shader
+               OpCapability Image1D
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_f35ac7 "textureLoad_f35ac7"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 1D 0 0 0 2 Rgba8i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+      %v4int = OpTypeVector %int 4
+%prevent_dce_block = OpTypeStruct %v4int
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %25 = OpConstantNull %uint
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+         %31 = OpConstantNull %v4int
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4int = OpTypePointer StorageBuffer %v4int
+         %36 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_f35ac7 = OpFunction %void None %17
+         %20 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_uint Function %25
+        %res = OpVariable %_ptr_Function_v4int Function %31
+               OpStore %arg_1 %uint_1
+         %27 = OpLoad %11 %arg_0
+         %28 = OpLoad %uint %arg_1
+         %26 = OpImageRead %v4int %27 %28
+               OpStore %res %26
+         %34 = OpAccessChain %_ptr_StorageBuffer_v4int %prevent_dce %uint_0
+         %35 = OpLoad %v4int %res
+               OpStore %34 %35
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %36
+         %38 = OpLabel
+         %39 = OpFunctionCall %void %textureLoad_f35ac7
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %41 = OpLabel
+         %42 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %42
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %45 = OpLabel
+         %46 = OpFunctionCall %void %textureLoad_f35ac7
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %48 = OpLabel
+         %49 = OpFunctionCall %void %textureLoad_f35ac7
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/f35ac7.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/f35ac7.wgsl.expected.wgsl
new file mode 100644
index 0000000..64cdd78
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/f35ac7.wgsl.expected.wgsl
@@ -0,0 +1,27 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_1d<rgba8sint, read>;
+
+fn textureLoad_f35ac7() {
+  var arg_1 = 1u;
+  var res : vec4<i32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_f35ac7();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_f35ac7();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_f35ac7();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/f379e2.wgsl b/test/tint/builtins/gen/var/textureLoad/f379e2.wgsl
new file mode 100644
index 0000000..04994d7
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/f379e2.wgsl
@@ -0,0 +1,50 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba8unorm, read>;
+
+// fn textureLoad(texture: texture_storage_2d_array<rgba8unorm, read>, coords: vec2<i32>, array_index: i32) -> vec4<f32>
+fn textureLoad_f379e2() {
+  var arg_1 = vec2<i32>(1i);
+  var arg_2 = 1i;
+  var res: vec4<f32> = textureLoad(arg_0, arg_1, arg_2);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_f379e2();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_f379e2();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_f379e2();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/f379e2.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/f379e2.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..9f6e36f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/f379e2.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_f379e2() {
+  int2 arg_1 = (1).xx;
+  int arg_2 = 1;
+  float4 res = arg_0.Load(int4(int3(arg_1, arg_2), 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_f379e2();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_f379e2();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_f379e2();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/f379e2.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/f379e2.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..9f6e36f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/f379e2.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_f379e2() {
+  int2 arg_1 = (1).xx;
+  int arg_2 = 1;
+  float4 res = arg_0.Load(int4(int3(arg_1, arg_2), 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_f379e2();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_f379e2();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_f379e2();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/f379e2.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/f379e2.wgsl.expected.glsl
new file mode 100644
index 0000000..fec423f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/f379e2.wgsl.expected.glsl
@@ -0,0 +1,93 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba8) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_f379e2() {
+  ivec2 arg_1 = ivec2(1);
+  int arg_2 = 1;
+  vec4 res = texelFetch(arg_0, ivec3(arg_1, arg_2));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_f379e2();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba8) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_f379e2() {
+  ivec2 arg_1 = ivec2(1);
+  int arg_2 = 1;
+  vec4 res = texelFetch(arg_0, ivec3(arg_1, arg_2));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_f379e2();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba8' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba8) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_f379e2() {
+  ivec2 arg_1 = ivec2(1);
+  int arg_2 = 1;
+  vec4 res = texelFetch(arg_0, ivec3(arg_1, arg_2));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_f379e2();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/f379e2.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/f379e2.wgsl.expected.msl
new file mode 100644
index 0000000..cfa993a
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/f379e2.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_f379e2(texture2d_array<float, access::read> tint_symbol_1, device float4* const tint_symbol_2) {
+  int2 arg_1 = int2(1);
+  int arg_2 = 1;
+  float4 res = tint_symbol_1.read(uint2(arg_1), arg_2);
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<float, access::read> tint_symbol_3, device float4* const tint_symbol_4) {
+  textureLoad_f379e2(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<float, access::read> tint_symbol_5 [[texture(0)]], device float4* tint_symbol_6 [[buffer(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::read> tint_symbol_7 [[texture(0)]], device float4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_f379e2(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<float, access::read> tint_symbol_9 [[texture(0)]], device float4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_f379e2(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/f379e2.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/f379e2.wgsl.expected.spvasm
new file mode 100644
index 0000000..9aeec03
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/f379e2.wgsl.expected.spvasm
@@ -0,0 +1,108 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 58
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_f379e2 "textureLoad_f379e2"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 1 0 2 Rgba8
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+%prevent_dce_block = OpTypeStruct %v4float
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %v2int = OpTypeVector %int 2
+      %int_1 = OpConstant %int 1
+         %22 = OpConstantComposite %v2int %int_1 %int_1
+%_ptr_Function_v2int = OpTypePointer Function %v2int
+         %25 = OpConstantNull %v2int
+%_ptr_Function_int = OpTypePointer Function %int
+         %28 = OpConstantNull %int
+      %v3int = OpTypeVector %int 3
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+       %uint = OpTypeInt 32 0
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
+         %44 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_f379e2 = OpFunction %void None %15
+         %18 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v2int Function %25
+      %arg_2 = OpVariable %_ptr_Function_int Function %28
+        %res = OpVariable %_ptr_Function_v4float Function %5
+               OpStore %arg_1 %22
+               OpStore %arg_2 %int_1
+         %30 = OpLoad %11 %arg_0
+         %32 = OpLoad %v2int %arg_1
+         %33 = OpCompositeExtract %int %32 0
+         %34 = OpCompositeExtract %int %32 1
+         %35 = OpLoad %int %arg_2
+         %36 = OpCompositeConstruct %v3int %33 %34 %35
+         %29 = OpImageRead %v4float %30 %36
+               OpStore %res %29
+         %42 = OpAccessChain %_ptr_StorageBuffer_v4float %prevent_dce %uint_0
+         %43 = OpLoad %v4float %res
+               OpStore %42 %43
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %44
+         %46 = OpLabel
+         %47 = OpFunctionCall %void %textureLoad_f379e2
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %49 = OpLabel
+         %50 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %50
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %53 = OpLabel
+         %54 = OpFunctionCall %void %textureLoad_f379e2
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %56 = OpLabel
+         %57 = OpFunctionCall %void %textureLoad_f379e2
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/f379e2.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/f379e2.wgsl.expected.wgsl
new file mode 100644
index 0000000..71b70d0
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/f379e2.wgsl.expected.wgsl
@@ -0,0 +1,28 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba8unorm, read>;
+
+fn textureLoad_f379e2() {
+  var arg_1 = vec2<i32>(1i);
+  var arg_2 = 1i;
+  var res : vec4<f32> = textureLoad(arg_0, arg_1, arg_2);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_f379e2();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_f379e2();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_f379e2();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/f56e6f.wgsl b/test/tint/builtins/gen/var/textureLoad/f56e6f.wgsl
new file mode 100644
index 0000000..7aab5f9
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/f56e6f.wgsl
@@ -0,0 +1,49 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_3d<rgba16uint, read>;
+
+// fn textureLoad(texture: texture_storage_3d<rgba16uint, read>, coords: vec3<i32>) -> vec4<u32>
+fn textureLoad_f56e6f() {
+  var arg_1 = vec3<i32>(1i);
+  var res: vec4<u32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_f56e6f();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_f56e6f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_f56e6f();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/f56e6f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/f56e6f.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..1bd94a3
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/f56e6f.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture3D<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_f56e6f() {
+  int3 arg_1 = (1).xxx;
+  uint4 res = arg_0.Load(int4(arg_1, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_f56e6f();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_f56e6f();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_f56e6f();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/f56e6f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/f56e6f.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..1bd94a3
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/f56e6f.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture3D<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_f56e6f() {
+  int3 arg_1 = (1).xxx;
+  uint4 res = arg_0.Load(int4(arg_1, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_f56e6f();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_f56e6f();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_f56e6f();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/f56e6f.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/f56e6f.wgsl.expected.glsl
new file mode 100644
index 0000000..df088db
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/f56e6f.wgsl.expected.glsl
@@ -0,0 +1,90 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba16ui) uniform highp uimage3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_f56e6f() {
+  ivec3 arg_1 = ivec3(1);
+  uvec4 res = texelFetch(arg_0, arg_1);
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_f56e6f();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba16ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba16ui) uniform highp uimage3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_f56e6f() {
+  ivec3 arg_1 = ivec3(1);
+  uvec4 res = texelFetch(arg_0, arg_1);
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_f56e6f();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba16ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba16ui) uniform highp uimage3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_f56e6f() {
+  ivec3 arg_1 = ivec3(1);
+  uvec4 res = texelFetch(arg_0, arg_1);
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_f56e6f();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba16ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/f56e6f.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/f56e6f.wgsl.expected.msl
new file mode 100644
index 0000000..991040b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/f56e6f.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_f56e6f(texture3d<uint, access::read> tint_symbol_1, device uint4* const tint_symbol_2) {
+  int3 arg_1 = int3(1);
+  uint4 res = tint_symbol_1.read(uint3(arg_1));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<uint, access::read> tint_symbol_3, device uint4* const tint_symbol_4) {
+  textureLoad_f56e6f(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<uint, access::read> tint_symbol_5 [[texture(0)]], device uint4* tint_symbol_6 [[buffer(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<uint, access::read> tint_symbol_7 [[texture(0)]], device uint4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_f56e6f(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture3d<uint, access::read> tint_symbol_9 [[texture(0)]], device uint4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_f56e6f(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/f56e6f.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/f56e6f.wgsl.expected.spvasm
new file mode 100644
index 0000000..77d0402
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/f56e6f.wgsl.expected.spvasm
@@ -0,0 +1,100 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 52
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_f56e6f "textureLoad_f56e6f"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 3D 0 0 0 2 Rgba16ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+     %v4uint = OpTypeVector %uint 4
+%prevent_dce_block = OpTypeStruct %v4uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %v3int = OpTypeVector %int 3
+      %int_1 = OpConstant %int 1
+         %24 = OpConstantComposite %v3int %int_1 %int_1 %int_1
+%_ptr_Function_v3int = OpTypePointer Function %v3int
+         %27 = OpConstantNull %v3int
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+         %33 = OpConstantNull %v4uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4uint = OpTypePointer StorageBuffer %v4uint
+         %38 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_f56e6f = OpFunction %void None %17
+         %20 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v3int Function %27
+        %res = OpVariable %_ptr_Function_v4uint Function %33
+               OpStore %arg_1 %24
+         %29 = OpLoad %11 %arg_0
+         %30 = OpLoad %v3int %arg_1
+         %28 = OpImageRead %v4uint %29 %30
+               OpStore %res %28
+         %36 = OpAccessChain %_ptr_StorageBuffer_v4uint %prevent_dce %uint_0
+         %37 = OpLoad %v4uint %res
+               OpStore %36 %37
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %38
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %textureLoad_f56e6f
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %43 = OpLabel
+         %44 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %44
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %47 = OpLabel
+         %48 = OpFunctionCall %void %textureLoad_f56e6f
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %50 = OpLabel
+         %51 = OpFunctionCall %void %textureLoad_f56e6f
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/f56e6f.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/f56e6f.wgsl.expected.wgsl
new file mode 100644
index 0000000..a9bc003
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/f56e6f.wgsl.expected.wgsl
@@ -0,0 +1,27 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_3d<rgba16uint, read>;
+
+fn textureLoad_f56e6f() {
+  var arg_1 = vec3<i32>(1i);
+  var res : vec4<u32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_f56e6f();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_f56e6f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_f56e6f();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/f74bd8.wgsl b/test/tint/builtins/gen/var/textureLoad/f74bd8.wgsl
new file mode 100644
index 0000000..8e80554
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/f74bd8.wgsl
@@ -0,0 +1,49 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_3d<rg32float, read>;
+
+// fn textureLoad(texture: texture_storage_3d<rg32float, read>, coords: vec3<i32>) -> vec4<f32>
+fn textureLoad_f74bd8() {
+  var arg_1 = vec3<i32>(1i);
+  var res: vec4<f32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_f74bd8();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_f74bd8();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_f74bd8();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/f74bd8.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/f74bd8.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..133857a
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/f74bd8.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture3D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_f74bd8() {
+  int3 arg_1 = (1).xxx;
+  float4 res = arg_0.Load(int4(arg_1, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_f74bd8();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_f74bd8();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_f74bd8();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/f74bd8.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/f74bd8.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..133857a
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/f74bd8.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture3D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_f74bd8() {
+  int3 arg_1 = (1).xxx;
+  float4 res = arg_0.Load(int4(arg_1, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_f74bd8();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_f74bd8();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_f74bd8();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/f74bd8.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/f74bd8.wgsl.expected.glsl
new file mode 100644
index 0000000..830fb3f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/f74bd8.wgsl.expected.glsl
@@ -0,0 +1,93 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rg32f) uniform highp image3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_f74bd8() {
+  ivec3 arg_1 = ivec3(1);
+  vec4 res = texelFetch(arg_0, arg_1);
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_f74bd8();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rg32f) uniform highp image3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_f74bd8() {
+  ivec3 arg_1 = ivec3(1);
+  vec4 res = texelFetch(arg_0, arg_1);
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_f74bd8();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'image load-store format' : not supported with this profile: es
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rg32f) uniform highp image3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_f74bd8() {
+  ivec3 arg_1 = ivec3(1);
+  vec4 res = texelFetch(arg_0, arg_1);
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_f74bd8();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/f74bd8.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/f74bd8.wgsl.expected.msl
new file mode 100644
index 0000000..ccaf136
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/f74bd8.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_f74bd8(texture3d<float, access::read> tint_symbol_1, device float4* const tint_symbol_2) {
+  int3 arg_1 = int3(1);
+  float4 res = tint_symbol_1.read(uint3(arg_1));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<float, access::read> tint_symbol_3, device float4* const tint_symbol_4) {
+  textureLoad_f74bd8(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<float, access::read> tint_symbol_5 [[texture(0)]], device float4* tint_symbol_6 [[buffer(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::read> tint_symbol_7 [[texture(0)]], device float4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_f74bd8(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture3d<float, access::read> tint_symbol_9 [[texture(0)]], device float4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_f74bd8(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/f74bd8.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/f74bd8.wgsl.expected.spvasm
new file mode 100644
index 0000000..01b2dd7
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/f74bd8.wgsl.expected.spvasm
@@ -0,0 +1,99 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 50
+; Schema: 0
+               OpCapability Shader
+               OpCapability StorageImageExtendedFormats
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_f74bd8 "textureLoad_f74bd8"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 3D 0 0 0 2 Rg32f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+%prevent_dce_block = OpTypeStruct %v4float
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %v3int = OpTypeVector %int 3
+      %int_1 = OpConstant %int 1
+         %22 = OpConstantComposite %v3int %int_1 %int_1 %int_1
+%_ptr_Function_v3int = OpTypePointer Function %v3int
+         %25 = OpConstantNull %v3int
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+       %uint = OpTypeInt 32 0
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
+         %36 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_f74bd8 = OpFunction %void None %15
+         %18 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v3int Function %25
+        %res = OpVariable %_ptr_Function_v4float Function %5
+               OpStore %arg_1 %22
+         %27 = OpLoad %11 %arg_0
+         %28 = OpLoad %v3int %arg_1
+         %26 = OpImageRead %v4float %27 %28
+               OpStore %res %26
+         %34 = OpAccessChain %_ptr_StorageBuffer_v4float %prevent_dce %uint_0
+         %35 = OpLoad %v4float %res
+               OpStore %34 %35
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %36
+         %38 = OpLabel
+         %39 = OpFunctionCall %void %textureLoad_f74bd8
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %41 = OpLabel
+         %42 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %42
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %45 = OpLabel
+         %46 = OpFunctionCall %void %textureLoad_f74bd8
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %48 = OpLabel
+         %49 = OpFunctionCall %void %textureLoad_f74bd8
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/f74bd8.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/f74bd8.wgsl.expected.wgsl
new file mode 100644
index 0000000..e7c1786
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/f74bd8.wgsl.expected.wgsl
@@ -0,0 +1,27 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_3d<rg32float, read>;
+
+fn textureLoad_f74bd8() {
+  var arg_1 = vec3<i32>(1i);
+  var res : vec4<f32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_f74bd8();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_f74bd8();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_f74bd8();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/f7f936.wgsl b/test/tint/builtins/gen/var/textureLoad/f7f936.wgsl
new file mode 100644
index 0000000..39135c8
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/f7f936.wgsl
@@ -0,0 +1,50 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba8snorm, read>;
+
+// fn textureLoad(texture: texture_storage_2d_array<rgba8snorm, read>, coords: vec2<u32>, array_index: u32) -> vec4<f32>
+fn textureLoad_f7f936() {
+  var arg_1 = vec2<u32>(1u);
+  var arg_2 = 1u;
+  var res: vec4<f32> = textureLoad(arg_0, arg_1, arg_2);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_f7f936();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_f7f936();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_f7f936();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/f7f936.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/f7f936.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..9aef33b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/f7f936.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_f7f936() {
+  uint2 arg_1 = (1u).xx;
+  uint arg_2 = 1u;
+  float4 res = arg_0.Load(uint4(uint3(arg_1, arg_2), uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_f7f936();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_f7f936();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_f7f936();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/f7f936.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/f7f936.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..9aef33b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/f7f936.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_f7f936() {
+  uint2 arg_1 = (1u).xx;
+  uint arg_2 = 1u;
+  float4 res = arg_0.Load(uint4(uint3(arg_1, arg_2), uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_f7f936();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_f7f936();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_f7f936();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/f7f936.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/f7f936.wgsl.expected.glsl
new file mode 100644
index 0000000..31db0de
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/f7f936.wgsl.expected.glsl
@@ -0,0 +1,93 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba8_snorm) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_f7f936() {
+  uvec2 arg_1 = uvec2(1u);
+  uint arg_2 = 1u;
+  vec4 res = texelFetch(arg_0, ivec3(uvec3(arg_1, arg_2)));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_f7f936();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8_snorm' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba8_snorm) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_f7f936() {
+  uvec2 arg_1 = uvec2(1u);
+  uint arg_2 = 1u;
+  vec4 res = texelFetch(arg_0, ivec3(uvec3(arg_1, arg_2)));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_f7f936();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba8_snorm' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba8_snorm) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_f7f936() {
+  uvec2 arg_1 = uvec2(1u);
+  uint arg_2 = 1u;
+  vec4 res = texelFetch(arg_0, ivec3(uvec3(arg_1, arg_2)));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_f7f936();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8_snorm' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/f7f936.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/f7f936.wgsl.expected.msl
new file mode 100644
index 0000000..4c368e9
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/f7f936.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_f7f936(texture2d_array<float, access::read> tint_symbol_1, device float4* const tint_symbol_2) {
+  uint2 arg_1 = uint2(1u);
+  uint arg_2 = 1u;
+  float4 res = tint_symbol_1.read(uint2(arg_1), arg_2);
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<float, access::read> tint_symbol_3, device float4* const tint_symbol_4) {
+  textureLoad_f7f936(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<float, access::read> tint_symbol_5 [[texture(0)]], device float4* tint_symbol_6 [[buffer(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::read> tint_symbol_7 [[texture(0)]], device float4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_f7f936(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<float, access::read> tint_symbol_9 [[texture(0)]], device float4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_f7f936(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/f7f936.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/f7f936.wgsl.expected.spvasm
new file mode 100644
index 0000000..b9f01bc
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/f7f936.wgsl.expected.spvasm
@@ -0,0 +1,107 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 57
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_f7f936 "textureLoad_f7f936"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 1 0 2 Rgba8Snorm
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+%prevent_dce_block = OpTypeStruct %v4float
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+     %uint_1 = OpConstant %uint 1
+         %22 = OpConstantComposite %v2uint %uint_1 %uint_1
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %25 = OpConstantNull %v2uint
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %28 = OpConstantNull %uint
+     %v3uint = OpTypeVector %uint 3
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
+         %43 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_f7f936 = OpFunction %void None %15
+         %18 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v2uint Function %25
+      %arg_2 = OpVariable %_ptr_Function_uint Function %28
+        %res = OpVariable %_ptr_Function_v4float Function %5
+               OpStore %arg_1 %22
+               OpStore %arg_2 %uint_1
+         %30 = OpLoad %11 %arg_0
+         %32 = OpLoad %v2uint %arg_1
+         %33 = OpCompositeExtract %uint %32 0
+         %34 = OpCompositeExtract %uint %32 1
+         %35 = OpLoad %uint %arg_2
+         %36 = OpCompositeConstruct %v3uint %33 %34 %35
+         %29 = OpImageRead %v4float %30 %36
+               OpStore %res %29
+         %41 = OpAccessChain %_ptr_StorageBuffer_v4float %prevent_dce %uint_0
+         %42 = OpLoad %v4float %res
+               OpStore %41 %42
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %43
+         %45 = OpLabel
+         %46 = OpFunctionCall %void %textureLoad_f7f936
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %48 = OpLabel
+         %49 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %49
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %52 = OpLabel
+         %53 = OpFunctionCall %void %textureLoad_f7f936
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %55 = OpLabel
+         %56 = OpFunctionCall %void %textureLoad_f7f936
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/f7f936.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/f7f936.wgsl.expected.wgsl
new file mode 100644
index 0000000..a3cac01
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/f7f936.wgsl.expected.wgsl
@@ -0,0 +1,28 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba8snorm, read>;
+
+fn textureLoad_f7f936() {
+  var arg_1 = vec2<u32>(1u);
+  var arg_2 = 1u;
+  var res : vec4<f32> = textureLoad(arg_0, arg_1, arg_2);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_f7f936();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_f7f936();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_f7f936();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/f8a2e8.wgsl b/test/tint/builtins/gen/var/textureLoad/f8a2e8.wgsl
new file mode 100644
index 0000000..5727e5a
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/f8a2e8.wgsl
@@ -0,0 +1,49 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_3d<bgra8unorm, read>;
+
+// fn textureLoad(texture: texture_storage_3d<bgra8unorm, read>, coords: vec3<i32>) -> vec4<f32>
+fn textureLoad_f8a2e8() {
+  var arg_1 = vec3<i32>(1i);
+  var res: vec4<f32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_f8a2e8();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_f8a2e8();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_f8a2e8();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/f8a2e8.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/f8a2e8.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..819c2dc
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/f8a2e8.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture3D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_f8a2e8() {
+  int3 arg_1 = (1).xxx;
+  float4 res = arg_0.Load(int4(arg_1, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_f8a2e8();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_f8a2e8();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_f8a2e8();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/f8a2e8.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/f8a2e8.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..819c2dc
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/f8a2e8.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture3D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_f8a2e8() {
+  int3 arg_1 = (1).xxx;
+  float4 res = arg_0.Load(int4(arg_1, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_f8a2e8();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_f8a2e8();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_f8a2e8();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/f8a2e8.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/f8a2e8.wgsl.expected.glsl
new file mode 100644
index 0000000..2ebc8f0
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/f8a2e8.wgsl.expected.glsl
@@ -0,0 +1,90 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba8) uniform highp image3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_f8a2e8() {
+  ivec3 arg_1 = ivec3(1);
+  vec4 res = texelFetch(arg_0, arg_1);
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_f8a2e8();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba8) uniform highp image3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_f8a2e8() {
+  ivec3 arg_1 = ivec3(1);
+  vec4 res = texelFetch(arg_0, arg_1);
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_f8a2e8();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba8' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba8) uniform highp image3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_f8a2e8() {
+  ivec3 arg_1 = ivec3(1);
+  vec4 res = texelFetch(arg_0, arg_1);
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_f8a2e8();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/f8a2e8.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/f8a2e8.wgsl.expected.msl
new file mode 100644
index 0000000..6a86dee
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/f8a2e8.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_f8a2e8(texture3d<float, access::read> tint_symbol_1, device float4* const tint_symbol_2) {
+  int3 arg_1 = int3(1);
+  float4 res = tint_symbol_1.read(uint3(arg_1));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<float, access::read> tint_symbol_3, device float4* const tint_symbol_4) {
+  textureLoad_f8a2e8(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<float, access::read> tint_symbol_5 [[texture(0)]], device float4* tint_symbol_6 [[buffer(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::read> tint_symbol_7 [[texture(0)]], device float4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_f8a2e8(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture3d<float, access::read> tint_symbol_9 [[texture(0)]], device float4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_f8a2e8(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/f8a2e8.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/f8a2e8.wgsl.expected.spvasm
new file mode 100644
index 0000000..cccac05
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/f8a2e8.wgsl.expected.spvasm
@@ -0,0 +1,98 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 50
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_f8a2e8 "textureLoad_f8a2e8"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 3D 0 0 0 2 Rgba8
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+%prevent_dce_block = OpTypeStruct %v4float
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %v3int = OpTypeVector %int 3
+      %int_1 = OpConstant %int 1
+         %22 = OpConstantComposite %v3int %int_1 %int_1 %int_1
+%_ptr_Function_v3int = OpTypePointer Function %v3int
+         %25 = OpConstantNull %v3int
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+       %uint = OpTypeInt 32 0
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
+         %36 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_f8a2e8 = OpFunction %void None %15
+         %18 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v3int Function %25
+        %res = OpVariable %_ptr_Function_v4float Function %5
+               OpStore %arg_1 %22
+         %27 = OpLoad %11 %arg_0
+         %28 = OpLoad %v3int %arg_1
+         %26 = OpImageRead %v4float %27 %28
+               OpStore %res %26
+         %34 = OpAccessChain %_ptr_StorageBuffer_v4float %prevent_dce %uint_0
+         %35 = OpLoad %v4float %res
+               OpStore %34 %35
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %36
+         %38 = OpLabel
+         %39 = OpFunctionCall %void %textureLoad_f8a2e8
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %41 = OpLabel
+         %42 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %42
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %45 = OpLabel
+         %46 = OpFunctionCall %void %textureLoad_f8a2e8
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %48 = OpLabel
+         %49 = OpFunctionCall %void %textureLoad_f8a2e8
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/f8a2e8.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/f8a2e8.wgsl.expected.wgsl
new file mode 100644
index 0000000..cee4553
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/f8a2e8.wgsl.expected.wgsl
@@ -0,0 +1,27 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_3d<bgra8unorm, read>;
+
+fn textureLoad_f8a2e8() {
+  var arg_1 = vec3<i32>(1i);
+  var res : vec4<f32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_f8a2e8();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_f8a2e8();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_f8a2e8();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/f9eaaf.wgsl b/test/tint/builtins/gen/var/textureLoad/f9eaaf.wgsl
new file mode 100644
index 0000000..fb12cd5
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/f9eaaf.wgsl
@@ -0,0 +1,49 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_1d<rgba16sint, read>;
+
+// fn textureLoad(texture: texture_storage_1d<rgba16sint, read>, coords: u32) -> vec4<i32>
+fn textureLoad_f9eaaf() {
+  var arg_1 = 1u;
+  var res: vec4<i32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_f9eaaf();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_f9eaaf();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_f9eaaf();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/f9eaaf.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/f9eaaf.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..5c4694f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/f9eaaf.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture1D<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_f9eaaf() {
+  uint arg_1 = 1u;
+  int4 res = arg_0.Load(uint2(arg_1, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_f9eaaf();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_f9eaaf();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_f9eaaf();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/f9eaaf.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/f9eaaf.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..5c4694f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/f9eaaf.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture1D<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_f9eaaf() {
+  uint arg_1 = 1u;
+  int4 res = arg_0.Load(uint2(arg_1, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_f9eaaf();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_f9eaaf();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_f9eaaf();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/f9eaaf.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/f9eaaf.wgsl.expected.glsl
new file mode 100644
index 0000000..2667c9a
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/f9eaaf.wgsl.expected.glsl
@@ -0,0 +1,90 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba16i) uniform highp iimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_f9eaaf() {
+  uint arg_1 = 1u;
+  ivec4 res = texelFetch(arg_0, ivec2(uvec2(arg_1, 0u)));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_f9eaaf();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba16i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba16i) uniform highp iimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_f9eaaf() {
+  uint arg_1 = 1u;
+  ivec4 res = texelFetch(arg_0, ivec2(uvec2(arg_1, 0u)));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_f9eaaf();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba16i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba16i) uniform highp iimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_f9eaaf() {
+  uint arg_1 = 1u;
+  ivec4 res = texelFetch(arg_0, ivec2(uvec2(arg_1, 0u)));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_f9eaaf();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba16i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/f9eaaf.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/f9eaaf.wgsl.expected.msl
new file mode 100644
index 0000000..7a8ab84
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/f9eaaf.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_f9eaaf(texture1d<int, access::read> tint_symbol_1, device int4* const tint_symbol_2) {
+  uint arg_1 = 1u;
+  int4 res = tint_symbol_1.read(uint(arg_1));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<int, access::read> tint_symbol_3, device int4* const tint_symbol_4) {
+  textureLoad_f9eaaf(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<int, access::read> tint_symbol_5 [[texture(0)]], device int4* tint_symbol_6 [[buffer(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(texture1d<int, access::read> tint_symbol_7 [[texture(0)]], device int4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_f9eaaf(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture1d<int, access::read> tint_symbol_9 [[texture(0)]], device int4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_f9eaaf(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/f9eaaf.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/f9eaaf.wgsl.expected.spvasm
new file mode 100644
index 0000000..bdaef3b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/f9eaaf.wgsl.expected.spvasm
@@ -0,0 +1,99 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 50
+; Schema: 0
+               OpCapability Shader
+               OpCapability Image1D
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_f9eaaf "textureLoad_f9eaaf"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 1D 0 0 0 2 Rgba16i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+      %v4int = OpTypeVector %int 4
+%prevent_dce_block = OpTypeStruct %v4int
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %25 = OpConstantNull %uint
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+         %31 = OpConstantNull %v4int
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4int = OpTypePointer StorageBuffer %v4int
+         %36 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_f9eaaf = OpFunction %void None %17
+         %20 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_uint Function %25
+        %res = OpVariable %_ptr_Function_v4int Function %31
+               OpStore %arg_1 %uint_1
+         %27 = OpLoad %11 %arg_0
+         %28 = OpLoad %uint %arg_1
+         %26 = OpImageRead %v4int %27 %28
+               OpStore %res %26
+         %34 = OpAccessChain %_ptr_StorageBuffer_v4int %prevent_dce %uint_0
+         %35 = OpLoad %v4int %res
+               OpStore %34 %35
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %36
+         %38 = OpLabel
+         %39 = OpFunctionCall %void %textureLoad_f9eaaf
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %41 = OpLabel
+         %42 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %42
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %45 = OpLabel
+         %46 = OpFunctionCall %void %textureLoad_f9eaaf
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %48 = OpLabel
+         %49 = OpFunctionCall %void %textureLoad_f9eaaf
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/f9eaaf.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/f9eaaf.wgsl.expected.wgsl
new file mode 100644
index 0000000..9a23e09
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/f9eaaf.wgsl.expected.wgsl
@@ -0,0 +1,27 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_1d<rgba16sint, read>;
+
+fn textureLoad_f9eaaf() {
+  var arg_1 = 1u;
+  var res : vec4<i32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_f9eaaf();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_f9eaaf();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_f9eaaf();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/fc6d36.wgsl b/test/tint/builtins/gen/var/textureLoad/fc6d36.wgsl
new file mode 100644
index 0000000..bd4f5b0
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/fc6d36.wgsl
@@ -0,0 +1,50 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba16sint, read>;
+
+// fn textureLoad(texture: texture_storage_2d_array<rgba16sint, read>, coords: vec2<i32>, array_index: i32) -> vec4<i32>
+fn textureLoad_fc6d36() {
+  var arg_1 = vec2<i32>(1i);
+  var arg_2 = 1i;
+  var res: vec4<i32> = textureLoad(arg_0, arg_1, arg_2);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_fc6d36();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_fc6d36();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_fc6d36();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/fc6d36.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/fc6d36.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..08d83fc
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/fc6d36.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_fc6d36() {
+  int2 arg_1 = (1).xx;
+  int arg_2 = 1;
+  int4 res = arg_0.Load(int4(int3(arg_1, arg_2), 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_fc6d36();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_fc6d36();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_fc6d36();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/fc6d36.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/fc6d36.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..08d83fc
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/fc6d36.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_fc6d36() {
+  int2 arg_1 = (1).xx;
+  int arg_2 = 1;
+  int4 res = arg_0.Load(int4(int3(arg_1, arg_2), 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_fc6d36();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_fc6d36();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_fc6d36();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/fc6d36.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/fc6d36.wgsl.expected.glsl
new file mode 100644
index 0000000..3b102bb
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/fc6d36.wgsl.expected.glsl
@@ -0,0 +1,93 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba16i) uniform highp iimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_fc6d36() {
+  ivec2 arg_1 = ivec2(1);
+  int arg_2 = 1;
+  ivec4 res = texelFetch(arg_0, ivec3(arg_1, arg_2));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_fc6d36();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba16i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba16i) uniform highp iimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_fc6d36() {
+  ivec2 arg_1 = ivec2(1);
+  int arg_2 = 1;
+  ivec4 res = texelFetch(arg_0, ivec3(arg_1, arg_2));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_fc6d36();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba16i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba16i) uniform highp iimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_fc6d36() {
+  ivec2 arg_1 = ivec2(1);
+  int arg_2 = 1;
+  ivec4 res = texelFetch(arg_0, ivec3(arg_1, arg_2));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_fc6d36();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba16i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/fc6d36.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/fc6d36.wgsl.expected.msl
new file mode 100644
index 0000000..25e6146
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/fc6d36.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_fc6d36(texture2d_array<int, access::read> tint_symbol_1, device int4* const tint_symbol_2) {
+  int2 arg_1 = int2(1);
+  int arg_2 = 1;
+  int4 res = tint_symbol_1.read(uint2(arg_1), arg_2);
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<int, access::read> tint_symbol_3, device int4* const tint_symbol_4) {
+  textureLoad_fc6d36(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<int, access::read> tint_symbol_5 [[texture(0)]], device int4* tint_symbol_6 [[buffer(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<int, access::read> tint_symbol_7 [[texture(0)]], device int4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_fc6d36(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<int, access::read> tint_symbol_9 [[texture(0)]], device int4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_fc6d36(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/fc6d36.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/fc6d36.wgsl.expected.spvasm
new file mode 100644
index 0000000..9e60bd7
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/fc6d36.wgsl.expected.spvasm
@@ -0,0 +1,110 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 60
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_fc6d36 "textureLoad_fc6d36"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 2D 0 1 0 2 Rgba16i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+      %v4int = OpTypeVector %int 4
+%prevent_dce_block = OpTypeStruct %v4int
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+      %v2int = OpTypeVector %int 2
+      %int_1 = OpConstant %int 1
+         %23 = OpConstantComposite %v2int %int_1 %int_1
+%_ptr_Function_v2int = OpTypePointer Function %v2int
+         %26 = OpConstantNull %v2int
+%_ptr_Function_int = OpTypePointer Function %int
+         %29 = OpConstantNull %int
+      %v3int = OpTypeVector %int 3
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+         %40 = OpConstantNull %v4int
+       %uint = OpTypeInt 32 0
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4int = OpTypePointer StorageBuffer %v4int
+         %46 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_fc6d36 = OpFunction %void None %17
+         %20 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v2int Function %26
+      %arg_2 = OpVariable %_ptr_Function_int Function %29
+        %res = OpVariable %_ptr_Function_v4int Function %40
+               OpStore %arg_1 %23
+               OpStore %arg_2 %int_1
+         %31 = OpLoad %11 %arg_0
+         %33 = OpLoad %v2int %arg_1
+         %34 = OpCompositeExtract %int %33 0
+         %35 = OpCompositeExtract %int %33 1
+         %36 = OpLoad %int %arg_2
+         %37 = OpCompositeConstruct %v3int %34 %35 %36
+         %30 = OpImageRead %v4int %31 %37
+               OpStore %res %30
+         %44 = OpAccessChain %_ptr_StorageBuffer_v4int %prevent_dce %uint_0
+         %45 = OpLoad %v4int %res
+               OpStore %44 %45
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %46
+         %48 = OpLabel
+         %49 = OpFunctionCall %void %textureLoad_fc6d36
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %51 = OpLabel
+         %52 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %52
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %55 = OpLabel
+         %56 = OpFunctionCall %void %textureLoad_fc6d36
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %58 = OpLabel
+         %59 = OpFunctionCall %void %textureLoad_fc6d36
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/fc6d36.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/fc6d36.wgsl.expected.wgsl
new file mode 100644
index 0000000..76d8973
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/fc6d36.wgsl.expected.wgsl
@@ -0,0 +1,28 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba16sint, read>;
+
+fn textureLoad_fc6d36() {
+  var arg_1 = vec2<i32>(1i);
+  var arg_2 = 1i;
+  var res : vec4<i32> = textureLoad(arg_0, arg_1, arg_2);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_fc6d36();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_fc6d36();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_fc6d36();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/fd6442.wgsl b/test/tint/builtins/gen/var/textureLoad/fd6442.wgsl
new file mode 100644
index 0000000..6c6e7ee
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/fd6442.wgsl
@@ -0,0 +1,49 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d<rgba8uint, read>;
+
+// fn textureLoad(texture: texture_storage_2d<rgba8uint, read>, coords: vec2<u32>) -> vec4<u32>
+fn textureLoad_fd6442() {
+  var arg_1 = vec2<u32>(1u);
+  var res: vec4<u32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_fd6442();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_fd6442();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_fd6442();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/fd6442.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/fd6442.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..d743ee6
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/fd6442.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture2D<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_fd6442() {
+  uint2 arg_1 = (1u).xx;
+  uint4 res = arg_0.Load(uint3(arg_1, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_fd6442();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_fd6442();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_fd6442();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/fd6442.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/fd6442.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..d743ee6
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/fd6442.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture2D<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_fd6442() {
+  uint2 arg_1 = (1u).xx;
+  uint4 res = arg_0.Load(uint3(arg_1, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_fd6442();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_fd6442();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_fd6442();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/fd6442.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/fd6442.wgsl.expected.glsl
new file mode 100644
index 0000000..3b98882
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/fd6442.wgsl.expected.glsl
@@ -0,0 +1,90 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba8ui) uniform highp uimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_fd6442() {
+  uvec2 arg_1 = uvec2(1u);
+  uvec4 res = texelFetch(arg_0, ivec2(arg_1));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_fd6442();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba8ui) uniform highp uimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_fd6442() {
+  uvec2 arg_1 = uvec2(1u);
+  uvec4 res = texelFetch(arg_0, ivec2(arg_1));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_fd6442();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba8ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba8ui) uniform highp uimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_fd6442() {
+  uvec2 arg_1 = uvec2(1u);
+  uvec4 res = texelFetch(arg_0, ivec2(arg_1));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_fd6442();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/fd6442.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/fd6442.wgsl.expected.msl
new file mode 100644
index 0000000..f49c3b6
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/fd6442.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_fd6442(texture2d<uint, access::read> tint_symbol_1, device uint4* const tint_symbol_2) {
+  uint2 arg_1 = uint2(1u);
+  uint4 res = tint_symbol_1.read(uint2(arg_1));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<uint, access::read> tint_symbol_3, device uint4* const tint_symbol_4) {
+  textureLoad_fd6442(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<uint, access::read> tint_symbol_5 [[texture(0)]], device uint4* tint_symbol_6 [[buffer(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<uint, access::read> tint_symbol_7 [[texture(0)]], device uint4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_fd6442(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d<uint, access::read> tint_symbol_9 [[texture(0)]], device uint4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_fd6442(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/fd6442.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/fd6442.wgsl.expected.spvasm
new file mode 100644
index 0000000..0ed8325
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/fd6442.wgsl.expected.spvasm
@@ -0,0 +1,99 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 51
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_fd6442 "textureLoad_fd6442"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 2D 0 0 0 2 Rgba8ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+     %v4uint = OpTypeVector %uint 4
+%prevent_dce_block = OpTypeStruct %v4uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+     %v2uint = OpTypeVector %uint 2
+     %uint_1 = OpConstant %uint 1
+         %23 = OpConstantComposite %v2uint %uint_1 %uint_1
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %26 = OpConstantNull %v2uint
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+         %32 = OpConstantNull %v4uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4uint = OpTypePointer StorageBuffer %v4uint
+         %37 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_fd6442 = OpFunction %void None %17
+         %20 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v2uint Function %26
+        %res = OpVariable %_ptr_Function_v4uint Function %32
+               OpStore %arg_1 %23
+         %28 = OpLoad %11 %arg_0
+         %29 = OpLoad %v2uint %arg_1
+         %27 = OpImageRead %v4uint %28 %29
+               OpStore %res %27
+         %35 = OpAccessChain %_ptr_StorageBuffer_v4uint %prevent_dce %uint_0
+         %36 = OpLoad %v4uint %res
+               OpStore %35 %36
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %37
+         %39 = OpLabel
+         %40 = OpFunctionCall %void %textureLoad_fd6442
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %42 = OpLabel
+         %43 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %43
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %46 = OpLabel
+         %47 = OpFunctionCall %void %textureLoad_fd6442
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %49 = OpLabel
+         %50 = OpFunctionCall %void %textureLoad_fd6442
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/fd6442.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/fd6442.wgsl.expected.wgsl
new file mode 100644
index 0000000..aa5356f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/fd6442.wgsl.expected.wgsl
@@ -0,0 +1,27 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d<rgba8uint, read>;
+
+fn textureLoad_fd6442() {
+  var arg_1 = vec2<u32>(1u);
+  var res : vec4<u32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_fd6442();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_fd6442();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_fd6442();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/fdebd0.wgsl b/test/tint/builtins/gen/var/textureLoad/fdebd0.wgsl
new file mode 100644
index 0000000..7304d8f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/fdebd0.wgsl
@@ -0,0 +1,50 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba8uint, read>;
+
+// fn textureLoad(texture: texture_storage_2d_array<rgba8uint, read>, coords: vec2<i32>, array_index: i32) -> vec4<u32>
+fn textureLoad_fdebd0() {
+  var arg_1 = vec2<i32>(1i);
+  var arg_2 = 1i;
+  var res: vec4<u32> = textureLoad(arg_0, arg_1, arg_2);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_fdebd0();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_fdebd0();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_fdebd0();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/fdebd0.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/fdebd0.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..9e33a61
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/fdebd0.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_fdebd0() {
+  int2 arg_1 = (1).xx;
+  int arg_2 = 1;
+  uint4 res = arg_0.Load(int4(int3(arg_1, arg_2), 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_fdebd0();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_fdebd0();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_fdebd0();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/fdebd0.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/fdebd0.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..9e33a61
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/fdebd0.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_fdebd0() {
+  int2 arg_1 = (1).xx;
+  int arg_2 = 1;
+  uint4 res = arg_0.Load(int4(int3(arg_1, arg_2), 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_fdebd0();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_fdebd0();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_fdebd0();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/fdebd0.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/fdebd0.wgsl.expected.glsl
new file mode 100644
index 0000000..c5586d2
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/fdebd0.wgsl.expected.glsl
@@ -0,0 +1,93 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba8ui) uniform highp uimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_fdebd0() {
+  ivec2 arg_1 = ivec2(1);
+  int arg_2 = 1;
+  uvec4 res = texelFetch(arg_0, ivec3(arg_1, arg_2));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_fdebd0();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba8ui) uniform highp uimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_fdebd0() {
+  ivec2 arg_1 = ivec2(1);
+  int arg_2 = 1;
+  uvec4 res = texelFetch(arg_0, ivec3(arg_1, arg_2));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_fdebd0();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba8ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba8ui) uniform highp uimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_fdebd0() {
+  ivec2 arg_1 = ivec2(1);
+  int arg_2 = 1;
+  uvec4 res = texelFetch(arg_0, ivec3(arg_1, arg_2));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_fdebd0();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/fdebd0.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/fdebd0.wgsl.expected.msl
new file mode 100644
index 0000000..b5983c2
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/fdebd0.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_fdebd0(texture2d_array<uint, access::read> tint_symbol_1, device uint4* const tint_symbol_2) {
+  int2 arg_1 = int2(1);
+  int arg_2 = 1;
+  uint4 res = tint_symbol_1.read(uint2(arg_1), arg_2);
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<uint, access::read> tint_symbol_3, device uint4* const tint_symbol_4) {
+  textureLoad_fdebd0(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<uint, access::read> tint_symbol_5 [[texture(0)]], device uint4* tint_symbol_6 [[buffer(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<uint, access::read> tint_symbol_7 [[texture(0)]], device uint4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_fdebd0(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<uint, access::read> tint_symbol_9 [[texture(0)]], device uint4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_fdebd0(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/fdebd0.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/fdebd0.wgsl.expected.spvasm
new file mode 100644
index 0000000..06f1403
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/fdebd0.wgsl.expected.spvasm
@@ -0,0 +1,110 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 60
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_fdebd0 "textureLoad_fdebd0"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 2D 0 1 0 2 Rgba8ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+     %v4uint = OpTypeVector %uint 4
+%prevent_dce_block = OpTypeStruct %v4uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %v2int = OpTypeVector %int 2
+      %int_1 = OpConstant %int 1
+         %24 = OpConstantComposite %v2int %int_1 %int_1
+%_ptr_Function_v2int = OpTypePointer Function %v2int
+         %27 = OpConstantNull %v2int
+%_ptr_Function_int = OpTypePointer Function %int
+         %30 = OpConstantNull %int
+      %v3int = OpTypeVector %int 3
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+         %41 = OpConstantNull %v4uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4uint = OpTypePointer StorageBuffer %v4uint
+         %46 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_fdebd0 = OpFunction %void None %17
+         %20 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v2int Function %27
+      %arg_2 = OpVariable %_ptr_Function_int Function %30
+        %res = OpVariable %_ptr_Function_v4uint Function %41
+               OpStore %arg_1 %24
+               OpStore %arg_2 %int_1
+         %32 = OpLoad %11 %arg_0
+         %34 = OpLoad %v2int %arg_1
+         %35 = OpCompositeExtract %int %34 0
+         %36 = OpCompositeExtract %int %34 1
+         %37 = OpLoad %int %arg_2
+         %38 = OpCompositeConstruct %v3int %35 %36 %37
+         %31 = OpImageRead %v4uint %32 %38
+               OpStore %res %31
+         %44 = OpAccessChain %_ptr_StorageBuffer_v4uint %prevent_dce %uint_0
+         %45 = OpLoad %v4uint %res
+               OpStore %44 %45
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %46
+         %48 = OpLabel
+         %49 = OpFunctionCall %void %textureLoad_fdebd0
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %51 = OpLabel
+         %52 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %52
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %55 = OpLabel
+         %56 = OpFunctionCall %void %textureLoad_fdebd0
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %58 = OpLabel
+         %59 = OpFunctionCall %void %textureLoad_fdebd0
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/fdebd0.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/fdebd0.wgsl.expected.wgsl
new file mode 100644
index 0000000..c319f47
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/fdebd0.wgsl.expected.wgsl
@@ -0,0 +1,28 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba8uint, read>;
+
+fn textureLoad_fdebd0() {
+  var arg_1 = vec2<i32>(1i);
+  var arg_2 = 1i;
+  var res : vec4<u32> = textureLoad(arg_0, arg_1, arg_2);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_fdebd0();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_fdebd0();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_fdebd0();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/fe222a.wgsl b/test/tint/builtins/gen/var/textureLoad/fe222a.wgsl
new file mode 100644
index 0000000..f7eee17
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/fe222a.wgsl
@@ -0,0 +1,49 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_1d<rgba8snorm, read>;
+
+// fn textureLoad(texture: texture_storage_1d<rgba8snorm, read>, coords: i32) -> vec4<f32>
+fn textureLoad_fe222a() {
+  var arg_1 = 1i;
+  var res: vec4<f32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_fe222a();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_fe222a();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_fe222a();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/fe222a.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/fe222a.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..cf8f8ca
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/fe222a.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture1D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_fe222a() {
+  int arg_1 = 1;
+  float4 res = arg_0.Load(int2(arg_1, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_fe222a();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_fe222a();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_fe222a();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/fe222a.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/fe222a.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..cf8f8ca
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/fe222a.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture1D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_fe222a() {
+  int arg_1 = 1;
+  float4 res = arg_0.Load(int2(arg_1, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_fe222a();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_fe222a();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_fe222a();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/fe222a.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/fe222a.wgsl.expected.glsl
new file mode 100644
index 0000000..205d333
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/fe222a.wgsl.expected.glsl
@@ -0,0 +1,90 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba8_snorm) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_fe222a() {
+  int arg_1 = 1;
+  vec4 res = texelFetch(arg_0, ivec2(arg_1, 0));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_fe222a();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8_snorm' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba8_snorm) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_fe222a() {
+  int arg_1 = 1;
+  vec4 res = texelFetch(arg_0, ivec2(arg_1, 0));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_fe222a();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba8_snorm' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba8_snorm) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_fe222a() {
+  int arg_1 = 1;
+  vec4 res = texelFetch(arg_0, ivec2(arg_1, 0));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_fe222a();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8_snorm' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/fe222a.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/fe222a.wgsl.expected.msl
new file mode 100644
index 0000000..9aa7a58
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/fe222a.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_fe222a(texture1d<float, access::read> tint_symbol_1, device float4* const tint_symbol_2) {
+  int arg_1 = 1;
+  float4 res = tint_symbol_1.read(uint(arg_1));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<float, access::read> tint_symbol_3, device float4* const tint_symbol_4) {
+  textureLoad_fe222a(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<float, access::read> tint_symbol_5 [[texture(0)]], device float4* tint_symbol_6 [[buffer(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(texture1d<float, access::read> tint_symbol_7 [[texture(0)]], device float4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_fe222a(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture1d<float, access::read> tint_symbol_9 [[texture(0)]], device float4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_fe222a(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/fe222a.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/fe222a.wgsl.expected.spvasm
new file mode 100644
index 0000000..1b73dd4
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/fe222a.wgsl.expected.spvasm
@@ -0,0 +1,97 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 48
+; Schema: 0
+               OpCapability Shader
+               OpCapability Image1D
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_fe222a "textureLoad_fe222a"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 1D 0 0 0 2 Rgba8Snorm
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+%prevent_dce_block = OpTypeStruct %v4float
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %int_1 = OpConstant %int 1
+%_ptr_Function_int = OpTypePointer Function %int
+         %23 = OpConstantNull %int
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+       %uint = OpTypeInt 32 0
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
+         %34 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_fe222a = OpFunction %void None %15
+         %18 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_int Function %23
+        %res = OpVariable %_ptr_Function_v4float Function %5
+               OpStore %arg_1 %int_1
+         %25 = OpLoad %11 %arg_0
+         %26 = OpLoad %int %arg_1
+         %24 = OpImageRead %v4float %25 %26
+               OpStore %res %24
+         %32 = OpAccessChain %_ptr_StorageBuffer_v4float %prevent_dce %uint_0
+         %33 = OpLoad %v4float %res
+               OpStore %32 %33
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %34
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %textureLoad_fe222a
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %39 = OpLabel
+         %40 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %40
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %43 = OpLabel
+         %44 = OpFunctionCall %void %textureLoad_fe222a
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %46 = OpLabel
+         %47 = OpFunctionCall %void %textureLoad_fe222a
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/fe222a.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/fe222a.wgsl.expected.wgsl
new file mode 100644
index 0000000..70aefdb
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/fe222a.wgsl.expected.wgsl
@@ -0,0 +1,27 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_1d<rgba8snorm, read>;
+
+fn textureLoad_fe222a() {
+  var arg_1 = 1i;
+  var res : vec4<f32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_fe222a();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_fe222a();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_fe222a();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/feab99.wgsl b/test/tint/builtins/gen/var/textureLoad/feab99.wgsl
new file mode 100644
index 0000000..b8e0ce7
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/feab99.wgsl
@@ -0,0 +1,49 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_3d<rgba16float, read>;
+
+// fn textureLoad(texture: texture_storage_3d<rgba16float, read>, coords: vec3<i32>) -> vec4<f32>
+fn textureLoad_feab99() {
+  var arg_1 = vec3<i32>(1i);
+  var res: vec4<f32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_feab99();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_feab99();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_feab99();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/feab99.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/feab99.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..00b4bf8
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/feab99.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture3D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_feab99() {
+  int3 arg_1 = (1).xxx;
+  float4 res = arg_0.Load(int4(arg_1, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_feab99();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_feab99();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_feab99();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/feab99.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/feab99.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..00b4bf8
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/feab99.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture3D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_feab99() {
+  int3 arg_1 = (1).xxx;
+  float4 res = arg_0.Load(int4(arg_1, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_feab99();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_feab99();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_feab99();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/feab99.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/feab99.wgsl.expected.glsl
new file mode 100644
index 0000000..01fd77e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/feab99.wgsl.expected.glsl
@@ -0,0 +1,90 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba16f) uniform highp image3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_feab99() {
+  ivec3 arg_1 = ivec3(1);
+  vec4 res = texelFetch(arg_0, arg_1);
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_feab99();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba16f' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba16f) uniform highp image3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_feab99() {
+  ivec3 arg_1 = ivec3(1);
+  vec4 res = texelFetch(arg_0, arg_1);
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_feab99();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba16f' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba16f) uniform highp image3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_feab99() {
+  ivec3 arg_1 = ivec3(1);
+  vec4 res = texelFetch(arg_0, arg_1);
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_feab99();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba16f' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/feab99.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/feab99.wgsl.expected.msl
new file mode 100644
index 0000000..1f691b3
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/feab99.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_feab99(texture3d<float, access::read> tint_symbol_1, device float4* const tint_symbol_2) {
+  int3 arg_1 = int3(1);
+  float4 res = tint_symbol_1.read(uint3(arg_1));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<float, access::read> tint_symbol_3, device float4* const tint_symbol_4) {
+  textureLoad_feab99(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<float, access::read> tint_symbol_5 [[texture(0)]], device float4* tint_symbol_6 [[buffer(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::read> tint_symbol_7 [[texture(0)]], device float4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_feab99(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture3d<float, access::read> tint_symbol_9 [[texture(0)]], device float4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_feab99(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/feab99.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/feab99.wgsl.expected.spvasm
new file mode 100644
index 0000000..9a23fd3
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/feab99.wgsl.expected.spvasm
@@ -0,0 +1,98 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 50
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_feab99 "textureLoad_feab99"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 3D 0 0 0 2 Rgba16f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+%prevent_dce_block = OpTypeStruct %v4float
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %v3int = OpTypeVector %int 3
+      %int_1 = OpConstant %int 1
+         %22 = OpConstantComposite %v3int %int_1 %int_1 %int_1
+%_ptr_Function_v3int = OpTypePointer Function %v3int
+         %25 = OpConstantNull %v3int
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+       %uint = OpTypeInt 32 0
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
+         %36 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_feab99 = OpFunction %void None %15
+         %18 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v3int Function %25
+        %res = OpVariable %_ptr_Function_v4float Function %5
+               OpStore %arg_1 %22
+         %27 = OpLoad %11 %arg_0
+         %28 = OpLoad %v3int %arg_1
+         %26 = OpImageRead %v4float %27 %28
+               OpStore %res %26
+         %34 = OpAccessChain %_ptr_StorageBuffer_v4float %prevent_dce %uint_0
+         %35 = OpLoad %v4float %res
+               OpStore %34 %35
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %36
+         %38 = OpLabel
+         %39 = OpFunctionCall %void %textureLoad_feab99
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %41 = OpLabel
+         %42 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %42
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %45 = OpLabel
+         %46 = OpFunctionCall %void %textureLoad_feab99
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %48 = OpLabel
+         %49 = OpFunctionCall %void %textureLoad_feab99
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/feab99.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/feab99.wgsl.expected.wgsl
new file mode 100644
index 0000000..70c63dd
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/feab99.wgsl.expected.wgsl
@@ -0,0 +1,27 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_3d<rgba16float, read>;
+
+fn textureLoad_feab99() {
+  var arg_1 = vec3<i32>(1i);
+  var res : vec4<f32> = textureLoad(arg_0, arg_1);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_feab99();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_feab99();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_feab99();
+}