tint/intrinsics: Allow mixing of signed / unsigned integer arguments

Fixed: tint:1733
Change-Id: Id83c5c5a59df062320a9a9fde087a34b85fbaa2a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/107160
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
diff --git a/test/tint/builtins/gen/literal/textureStore/00ca64.wgsl b/test/tint/builtins/gen/literal/textureStore/00ca64.wgsl
new file mode 100644
index 0000000..127f5d6
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/00ca64.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba32uint, write>;
+
+// fn textureStore(texture: texture_storage_2d_array<rgba32uint, write>, coords: vec2<i32>, array_index: u32, value: vec4<u32>)
+fn textureStore_00ca64() {
+  textureStore(arg_0, vec2<i32>(), 1u, vec4<u32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_00ca64();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_00ca64();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_00ca64();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/00ca64.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/00ca64.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..4c43d09
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/00ca64.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2DArray<uint4> arg_0 : register(u0, space1);
+
+void textureStore_00ca64() {
+  arg_0[int3(0, 0, int(1u))] = (0u).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_00ca64();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureStore_00ca64();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_00ca64();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/00ca64.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/00ca64.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..4c43d09
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/00ca64.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2DArray<uint4> arg_0 : register(u0, space1);
+
+void textureStore_00ca64() {
+  arg_0[int3(0, 0, int(1u))] = (0u).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_00ca64();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureStore_00ca64();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_00ca64();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/00ca64.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/00ca64.wgsl.expected.glsl
new file mode 100644
index 0000000..1227661
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/00ca64.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+layout(rgba32ui) uniform highp writeonly uimage2DArray arg_0;
+void textureStore_00ca64() {
+  imageStore(arg_0, ivec3(0, 0, int(1u)), uvec4(0u));
+}
+
+vec4 vertex_main() {
+  textureStore_00ca64();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+layout(rgba32ui) uniform highp writeonly uimage2DArray arg_0;
+void textureStore_00ca64() {
+  imageStore(arg_0, ivec3(0, 0, int(1u)), uvec4(0u));
+}
+
+void fragment_main() {
+  textureStore_00ca64();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+layout(rgba32ui) uniform highp writeonly uimage2DArray arg_0;
+void textureStore_00ca64() {
+  imageStore(arg_0, ivec3(0, 0, int(1u)), uvec4(0u));
+}
+
+void compute_main() {
+  textureStore_00ca64();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/00ca64.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/00ca64.wgsl.expected.msl
new file mode 100644
index 0000000..61e534f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/00ca64.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_00ca64(texture2d_array<uint, access::write> tint_symbol_1) {
+  tint_symbol_1.write(uint4(0u), uint2(int2(0)), 1u);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<uint, access::write> tint_symbol_2) {
+  textureStore_00ca64(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<uint, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<uint, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureStore_00ca64(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d_array<uint, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureStore_00ca64(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureStore/00ca64.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/00ca64.wgsl.expected.spvasm
new file mode 100644
index 0000000..ec49a65
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/00ca64.wgsl.expected.spvasm
@@ -0,0 +1,77 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 41
+; 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 %textureStore_00ca64 "textureStore_00ca64"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 2D 0 1 0 2 Rgba32ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %v3int = OpTypeVector %int 3
+      %int_0 = OpConstant %int 0
+     %uint_1 = OpConstant %uint 1
+     %v4uint = OpTypeVector %uint 4
+         %26 = OpConstantNull %v4uint
+         %27 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureStore_00ca64 = OpFunction %void None %13
+         %16 = OpLabel
+         %18 = OpLoad %11 %arg_0
+         %22 = OpBitcast %int %uint_1
+         %24 = OpCompositeConstruct %v3int %int_0 %int_0 %22
+               OpImageWrite %18 %24 %26
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %27
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %textureStore_00ca64
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %32 = OpLabel
+         %33 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %33
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %textureStore_00ca64
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %39 = OpLabel
+         %40 = OpFunctionCall %void %textureStore_00ca64
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/00ca64.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/00ca64.wgsl.expected.wgsl
new file mode 100644
index 0000000..6bc9e2c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/00ca64.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba32uint, write>;
+
+fn textureStore_00ca64() {
+  textureStore(arg_0, vec2<i32>(), 1u, vec4<u32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_00ca64();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_00ca64();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_00ca64();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/0148bd.wgsl b/test/tint/builtins/gen/literal/textureStore/0148bd.wgsl
new file mode 100644
index 0000000..10d0c4e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/0148bd.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba32sint, write>;
+
+// fn textureStore(texture: texture_storage_2d_array<rgba32sint, write>, coords: vec2<u32>, array_index: i32, value: vec4<i32>)
+fn textureStore_0148bd() {
+  textureStore(arg_0, vec2<u32>(), 1i, vec4<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_0148bd();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_0148bd();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_0148bd();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/0148bd.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/0148bd.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..49a4ea9
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/0148bd.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2DArray<int4> arg_0 : register(u0, space1);
+
+void textureStore_0148bd() {
+  arg_0[uint3(0u, 0u, uint(1))] = (0).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_0148bd();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureStore_0148bd();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_0148bd();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/0148bd.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/0148bd.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..49a4ea9
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/0148bd.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2DArray<int4> arg_0 : register(u0, space1);
+
+void textureStore_0148bd() {
+  arg_0[uint3(0u, 0u, uint(1))] = (0).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_0148bd();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureStore_0148bd();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_0148bd();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/0148bd.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/0148bd.wgsl.expected.glsl
new file mode 100644
index 0000000..5b2168a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/0148bd.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+layout(rgba32i) uniform highp writeonly iimage2DArray arg_0;
+void textureStore_0148bd() {
+  imageStore(arg_0, ivec3(uvec3(0u, 0u, uint(1))), ivec4(0));
+}
+
+vec4 vertex_main() {
+  textureStore_0148bd();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+layout(rgba32i) uniform highp writeonly iimage2DArray arg_0;
+void textureStore_0148bd() {
+  imageStore(arg_0, ivec3(uvec3(0u, 0u, uint(1))), ivec4(0));
+}
+
+void fragment_main() {
+  textureStore_0148bd();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+layout(rgba32i) uniform highp writeonly iimage2DArray arg_0;
+void textureStore_0148bd() {
+  imageStore(arg_0, ivec3(uvec3(0u, 0u, uint(1))), ivec4(0));
+}
+
+void compute_main() {
+  textureStore_0148bd();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/0148bd.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/0148bd.wgsl.expected.msl
new file mode 100644
index 0000000..508c653
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/0148bd.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_0148bd(texture2d_array<int, access::write> tint_symbol_1) {
+  tint_symbol_1.write(int4(0), uint2(uint2(0u)), 1);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<int, access::write> tint_symbol_2) {
+  textureStore_0148bd(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<int, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<int, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureStore_0148bd(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d_array<int, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureStore_0148bd(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureStore/0148bd.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/0148bd.wgsl.expected.spvasm
new file mode 100644
index 0000000..464aac9
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/0148bd.wgsl.expected.spvasm
@@ -0,0 +1,77 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 41
+; 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 %textureStore_0148bd "textureStore_0148bd"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 2D 0 1 0 2 Rgba32i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v3uint = OpTypeVector %uint 3
+     %uint_0 = OpConstant %uint 0
+      %int_1 = OpConstant %int 1
+      %v4int = OpTypeVector %int 4
+         %26 = OpConstantNull %v4int
+         %27 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureStore_0148bd = OpFunction %void None %13
+         %16 = OpLabel
+         %18 = OpLoad %11 %arg_0
+         %22 = OpBitcast %uint %int_1
+         %24 = OpCompositeConstruct %v3uint %uint_0 %uint_0 %22
+               OpImageWrite %18 %24 %26
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %27
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %textureStore_0148bd
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %32 = OpLabel
+         %33 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %33
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %textureStore_0148bd
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %39 = OpLabel
+         %40 = OpFunctionCall %void %textureStore_0148bd
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/0148bd.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/0148bd.wgsl.expected.wgsl
new file mode 100644
index 0000000..b9cae8b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/0148bd.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba32sint, write>;
+
+fn textureStore_0148bd() {
+  textureStore(arg_0, vec2<u32>(), 1i, vec4<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_0148bd();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_0148bd();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_0148bd();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/06e49c.wgsl b/test/tint/builtins/gen/literal/textureStore/06e49c.wgsl
new file mode 100644
index 0000000..1c43f8d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/06e49c.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba32float, write>;
+
+// fn textureStore(texture: texture_storage_2d_array<rgba32float, write>, coords: vec2<i32>, array_index: u32, value: vec4<f32>)
+fn textureStore_06e49c() {
+  textureStore(arg_0, vec2<i32>(), 1u, vec4<f32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_06e49c();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_06e49c();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_06e49c();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/06e49c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/06e49c.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..7ccdde8
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/06e49c.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2DArray<float4> arg_0 : register(u0, space1);
+
+void textureStore_06e49c() {
+  arg_0[int3(0, 0, int(1u))] = (0.0f).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_06e49c();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureStore_06e49c();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_06e49c();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/06e49c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/06e49c.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..7ccdde8
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/06e49c.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2DArray<float4> arg_0 : register(u0, space1);
+
+void textureStore_06e49c() {
+  arg_0[int3(0, 0, int(1u))] = (0.0f).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_06e49c();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureStore_06e49c();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_06e49c();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/06e49c.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/06e49c.wgsl.expected.glsl
new file mode 100644
index 0000000..1c9a1cc
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/06e49c.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+layout(rgba32f) uniform highp writeonly image2DArray arg_0;
+void textureStore_06e49c() {
+  imageStore(arg_0, ivec3(0, 0, int(1u)), vec4(0.0f));
+}
+
+vec4 vertex_main() {
+  textureStore_06e49c();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+layout(rgba32f) uniform highp writeonly image2DArray arg_0;
+void textureStore_06e49c() {
+  imageStore(arg_0, ivec3(0, 0, int(1u)), vec4(0.0f));
+}
+
+void fragment_main() {
+  textureStore_06e49c();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+layout(rgba32f) uniform highp writeonly image2DArray arg_0;
+void textureStore_06e49c() {
+  imageStore(arg_0, ivec3(0, 0, int(1u)), vec4(0.0f));
+}
+
+void compute_main() {
+  textureStore_06e49c();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/06e49c.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/06e49c.wgsl.expected.msl
new file mode 100644
index 0000000..feafa4d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/06e49c.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_06e49c(texture2d_array<float, access::write> tint_symbol_1) {
+  tint_symbol_1.write(float4(0.0f), uint2(int2(0)), 1u);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<float, access::write> tint_symbol_2) {
+  textureStore_06e49c(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<float, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<float, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureStore_06e49c(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d_array<float, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureStore_06e49c(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureStore/06e49c.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/06e49c.wgsl.expected.spvasm
new file mode 100644
index 0000000..be0e588
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/06e49c.wgsl.expected.spvasm
@@ -0,0 +1,75 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 39
+; 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 %textureStore_06e49c "textureStore_06e49c"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 1 0 2 Rgba32f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %12 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %v3int = OpTypeVector %int 3
+      %int_0 = OpConstant %int 0
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+         %25 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureStore_06e49c = OpFunction %void None %12
+         %15 = OpLabel
+         %17 = OpLoad %11 %arg_0
+         %21 = OpBitcast %int %uint_1
+         %24 = OpCompositeConstruct %v3int %int_0 %int_0 %21
+               OpImageWrite %17 %24 %5
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %25
+         %27 = OpLabel
+         %28 = OpFunctionCall %void %textureStore_06e49c
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+         %30 = OpLabel
+         %31 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %31
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %textureStore_06e49c
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %12
+         %37 = OpLabel
+         %38 = OpFunctionCall %void %textureStore_06e49c
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/06e49c.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/06e49c.wgsl.expected.wgsl
new file mode 100644
index 0000000..b9ddf2e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/06e49c.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba32float, write>;
+
+fn textureStore_06e49c() {
+  textureStore(arg_0, vec2<i32>(), 1u, vec4<f32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_06e49c();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_06e49c();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_06e49c();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/0a1a79.wgsl b/test/tint/builtins/gen/literal/textureStore/0a1a79.wgsl
new file mode 100644
index 0000000..3899f39
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/0a1a79.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba8uint, write>;
+
+// fn textureStore(texture: texture_storage_2d_array<rgba8uint, write>, coords: vec2<u32>, array_index: i32, value: vec4<u32>)
+fn textureStore_0a1a79() {
+  textureStore(arg_0, vec2<u32>(), 1i, vec4<u32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_0a1a79();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_0a1a79();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_0a1a79();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/0a1a79.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/0a1a79.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..872f431
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/0a1a79.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2DArray<uint4> arg_0 : register(u0, space1);
+
+void textureStore_0a1a79() {
+  arg_0[uint3(0u, 0u, uint(1))] = (0u).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_0a1a79();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureStore_0a1a79();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_0a1a79();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/0a1a79.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/0a1a79.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..872f431
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/0a1a79.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2DArray<uint4> arg_0 : register(u0, space1);
+
+void textureStore_0a1a79() {
+  arg_0[uint3(0u, 0u, uint(1))] = (0u).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_0a1a79();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureStore_0a1a79();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_0a1a79();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/0a1a79.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/0a1a79.wgsl.expected.glsl
new file mode 100644
index 0000000..7aacbb9
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/0a1a79.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+layout(rgba8ui) uniform highp writeonly uimage2DArray arg_0;
+void textureStore_0a1a79() {
+  imageStore(arg_0, ivec3(uvec3(0u, 0u, uint(1))), uvec4(0u));
+}
+
+vec4 vertex_main() {
+  textureStore_0a1a79();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+layout(rgba8ui) uniform highp writeonly uimage2DArray arg_0;
+void textureStore_0a1a79() {
+  imageStore(arg_0, ivec3(uvec3(0u, 0u, uint(1))), uvec4(0u));
+}
+
+void fragment_main() {
+  textureStore_0a1a79();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+layout(rgba8ui) uniform highp writeonly uimage2DArray arg_0;
+void textureStore_0a1a79() {
+  imageStore(arg_0, ivec3(uvec3(0u, 0u, uint(1))), uvec4(0u));
+}
+
+void compute_main() {
+  textureStore_0a1a79();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/0a1a79.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/0a1a79.wgsl.expected.msl
new file mode 100644
index 0000000..05cd137
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/0a1a79.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_0a1a79(texture2d_array<uint, access::write> tint_symbol_1) {
+  tint_symbol_1.write(uint4(0u), uint2(uint2(0u)), 1);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<uint, access::write> tint_symbol_2) {
+  textureStore_0a1a79(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<uint, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<uint, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureStore_0a1a79(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d_array<uint, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureStore_0a1a79(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureStore/0a1a79.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/0a1a79.wgsl.expected.spvasm
new file mode 100644
index 0000000..2a4e581
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/0a1a79.wgsl.expected.spvasm
@@ -0,0 +1,77 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 41
+; 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 %textureStore_0a1a79 "textureStore_0a1a79"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 2D 0 1 0 2 Rgba8ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+     %v3uint = OpTypeVector %uint 3
+     %uint_0 = OpConstant %uint 0
+        %int = OpTypeInt 32 1
+      %int_1 = OpConstant %int 1
+     %v4uint = OpTypeVector %uint 4
+         %26 = OpConstantNull %v4uint
+         %27 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureStore_0a1a79 = OpFunction %void None %13
+         %16 = OpLabel
+         %18 = OpLoad %11 %arg_0
+         %21 = OpBitcast %uint %int_1
+         %24 = OpCompositeConstruct %v3uint %uint_0 %uint_0 %21
+               OpImageWrite %18 %24 %26
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %27
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %textureStore_0a1a79
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %32 = OpLabel
+         %33 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %33
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %textureStore_0a1a79
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %39 = OpLabel
+         %40 = OpFunctionCall %void %textureStore_0a1a79
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/0a1a79.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/0a1a79.wgsl.expected.wgsl
new file mode 100644
index 0000000..0c98262
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/0a1a79.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba8uint, write>;
+
+fn textureStore_0a1a79() {
+  textureStore(arg_0, vec2<u32>(), 1i, vec4<u32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_0a1a79();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_0a1a79();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_0a1a79();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/0cc825.wgsl b/test/tint/builtins/gen/literal/textureStore/0cc825.wgsl
new file mode 100644
index 0000000..65e450c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/0cc825.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba16sint, write>;
+
+// fn textureStore(texture: texture_storage_2d_array<rgba16sint, write>, coords: vec2<u32>, array_index: i32, value: vec4<i32>)
+fn textureStore_0cc825() {
+  textureStore(arg_0, vec2<u32>(), 1i, vec4<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_0cc825();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_0cc825();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_0cc825();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/0cc825.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/0cc825.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..bf58d44
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/0cc825.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2DArray<int4> arg_0 : register(u0, space1);
+
+void textureStore_0cc825() {
+  arg_0[uint3(0u, 0u, uint(1))] = (0).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_0cc825();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureStore_0cc825();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_0cc825();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/0cc825.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/0cc825.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..bf58d44
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/0cc825.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2DArray<int4> arg_0 : register(u0, space1);
+
+void textureStore_0cc825() {
+  arg_0[uint3(0u, 0u, uint(1))] = (0).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_0cc825();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureStore_0cc825();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_0cc825();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/0cc825.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/0cc825.wgsl.expected.glsl
new file mode 100644
index 0000000..e22d8d7
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/0cc825.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+layout(rgba16i) uniform highp writeonly iimage2DArray arg_0;
+void textureStore_0cc825() {
+  imageStore(arg_0, ivec3(uvec3(0u, 0u, uint(1))), ivec4(0));
+}
+
+vec4 vertex_main() {
+  textureStore_0cc825();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+layout(rgba16i) uniform highp writeonly iimage2DArray arg_0;
+void textureStore_0cc825() {
+  imageStore(arg_0, ivec3(uvec3(0u, 0u, uint(1))), ivec4(0));
+}
+
+void fragment_main() {
+  textureStore_0cc825();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+layout(rgba16i) uniform highp writeonly iimage2DArray arg_0;
+void textureStore_0cc825() {
+  imageStore(arg_0, ivec3(uvec3(0u, 0u, uint(1))), ivec4(0));
+}
+
+void compute_main() {
+  textureStore_0cc825();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/0cc825.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/0cc825.wgsl.expected.msl
new file mode 100644
index 0000000..5f737ac
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/0cc825.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_0cc825(texture2d_array<int, access::write> tint_symbol_1) {
+  tint_symbol_1.write(int4(0), uint2(uint2(0u)), 1);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<int, access::write> tint_symbol_2) {
+  textureStore_0cc825(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<int, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<int, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureStore_0cc825(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d_array<int, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureStore_0cc825(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureStore/0cc825.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/0cc825.wgsl.expected.spvasm
new file mode 100644
index 0000000..1eeb64f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/0cc825.wgsl.expected.spvasm
@@ -0,0 +1,77 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 41
+; 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 %textureStore_0cc825 "textureStore_0cc825"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 2D 0 1 0 2 Rgba16i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v3uint = OpTypeVector %uint 3
+     %uint_0 = OpConstant %uint 0
+      %int_1 = OpConstant %int 1
+      %v4int = OpTypeVector %int 4
+         %26 = OpConstantNull %v4int
+         %27 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureStore_0cc825 = OpFunction %void None %13
+         %16 = OpLabel
+         %18 = OpLoad %11 %arg_0
+         %22 = OpBitcast %uint %int_1
+         %24 = OpCompositeConstruct %v3uint %uint_0 %uint_0 %22
+               OpImageWrite %18 %24 %26
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %27
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %textureStore_0cc825
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %32 = OpLabel
+         %33 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %33
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %textureStore_0cc825
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %39 = OpLabel
+         %40 = OpFunctionCall %void %textureStore_0cc825
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/0cc825.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/0cc825.wgsl.expected.wgsl
new file mode 100644
index 0000000..9a44567
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/0cc825.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba16sint, write>;
+
+fn textureStore_0cc825() {
+  textureStore(arg_0, vec2<u32>(), 1i, vec4<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_0cc825();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_0cc825();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_0cc825();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/1f1ef8.wgsl b/test/tint/builtins/gen/literal/textureStore/1f1ef8.wgsl
new file mode 100644
index 0000000..5a8267a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/1f1ef8.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba16sint, write>;
+
+// fn textureStore(texture: texture_storage_2d_array<rgba16sint, write>, coords: vec2<i32>, array_index: u32, value: vec4<i32>)
+fn textureStore_1f1ef8() {
+  textureStore(arg_0, vec2<i32>(), 1u, vec4<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_1f1ef8();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_1f1ef8();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_1f1ef8();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/1f1ef8.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/1f1ef8.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..c38dfe8
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/1f1ef8.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2DArray<int4> arg_0 : register(u0, space1);
+
+void textureStore_1f1ef8() {
+  arg_0[int3(0, 0, int(1u))] = (0).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_1f1ef8();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureStore_1f1ef8();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_1f1ef8();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/1f1ef8.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/1f1ef8.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..c38dfe8
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/1f1ef8.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2DArray<int4> arg_0 : register(u0, space1);
+
+void textureStore_1f1ef8() {
+  arg_0[int3(0, 0, int(1u))] = (0).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_1f1ef8();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureStore_1f1ef8();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_1f1ef8();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/1f1ef8.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/1f1ef8.wgsl.expected.glsl
new file mode 100644
index 0000000..72a9bec5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/1f1ef8.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+layout(rgba16i) uniform highp writeonly iimage2DArray arg_0;
+void textureStore_1f1ef8() {
+  imageStore(arg_0, ivec3(0, 0, int(1u)), ivec4(0));
+}
+
+vec4 vertex_main() {
+  textureStore_1f1ef8();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+layout(rgba16i) uniform highp writeonly iimage2DArray arg_0;
+void textureStore_1f1ef8() {
+  imageStore(arg_0, ivec3(0, 0, int(1u)), ivec4(0));
+}
+
+void fragment_main() {
+  textureStore_1f1ef8();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+layout(rgba16i) uniform highp writeonly iimage2DArray arg_0;
+void textureStore_1f1ef8() {
+  imageStore(arg_0, ivec3(0, 0, int(1u)), ivec4(0));
+}
+
+void compute_main() {
+  textureStore_1f1ef8();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/1f1ef8.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/1f1ef8.wgsl.expected.msl
new file mode 100644
index 0000000..b85f5e5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/1f1ef8.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_1f1ef8(texture2d_array<int, access::write> tint_symbol_1) {
+  tint_symbol_1.write(int4(0), uint2(int2(0)), 1u);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<int, access::write> tint_symbol_2) {
+  textureStore_1f1ef8(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<int, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<int, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureStore_1f1ef8(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d_array<int, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureStore_1f1ef8(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureStore/1f1ef8.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/1f1ef8.wgsl.expected.spvasm
new file mode 100644
index 0000000..6aff314
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/1f1ef8.wgsl.expected.spvasm
@@ -0,0 +1,77 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 41
+; 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 %textureStore_1f1ef8 "textureStore_1f1ef8"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 2D 0 1 0 2 Rgba16i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+      %v3int = OpTypeVector %int 3
+      %int_0 = OpConstant %int 0
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+      %v4int = OpTypeVector %int 4
+         %26 = OpConstantNull %v4int
+         %27 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureStore_1f1ef8 = OpFunction %void None %13
+         %16 = OpLabel
+         %18 = OpLoad %11 %arg_0
+         %21 = OpBitcast %int %uint_1
+         %24 = OpCompositeConstruct %v3int %int_0 %int_0 %21
+               OpImageWrite %18 %24 %26
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %27
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %textureStore_1f1ef8
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %32 = OpLabel
+         %33 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %33
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %textureStore_1f1ef8
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %39 = OpLabel
+         %40 = OpFunctionCall %void %textureStore_1f1ef8
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/1f1ef8.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/1f1ef8.wgsl.expected.wgsl
new file mode 100644
index 0000000..1651670
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/1f1ef8.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba16sint, write>;
+
+fn textureStore_1f1ef8() {
+  textureStore(arg_0, vec2<i32>(), 1u, vec4<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_1f1ef8();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_1f1ef8();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_1f1ef8();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/22f045.wgsl b/test/tint/builtins/gen/literal/textureStore/22f045.wgsl
new file mode 100644
index 0000000..415716e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/22f045.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba8snorm, write>;
+
+// fn textureStore(texture: texture_storage_2d_array<rgba8snorm, write>, coords: vec2<i32>, array_index: u32, value: vec4<f32>)
+fn textureStore_22f045() {
+  textureStore(arg_0, vec2<i32>(), 1u, vec4<f32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_22f045();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_22f045();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_22f045();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/22f045.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/22f045.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..ae1649c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/22f045.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2DArray<float4> arg_0 : register(u0, space1);
+
+void textureStore_22f045() {
+  arg_0[int3(0, 0, int(1u))] = (0.0f).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_22f045();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureStore_22f045();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_22f045();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/22f045.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/22f045.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..ae1649c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/22f045.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2DArray<float4> arg_0 : register(u0, space1);
+
+void textureStore_22f045() {
+  arg_0[int3(0, 0, int(1u))] = (0.0f).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_22f045();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureStore_22f045();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_22f045();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/22f045.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/22f045.wgsl.expected.glsl
new file mode 100644
index 0000000..204ab9d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/22f045.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+layout(rgba8_snorm) uniform highp writeonly image2DArray arg_0;
+void textureStore_22f045() {
+  imageStore(arg_0, ivec3(0, 0, int(1u)), vec4(0.0f));
+}
+
+vec4 vertex_main() {
+  textureStore_22f045();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+layout(rgba8_snorm) uniform highp writeonly image2DArray arg_0;
+void textureStore_22f045() {
+  imageStore(arg_0, ivec3(0, 0, int(1u)), vec4(0.0f));
+}
+
+void fragment_main() {
+  textureStore_22f045();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+layout(rgba8_snorm) uniform highp writeonly image2DArray arg_0;
+void textureStore_22f045() {
+  imageStore(arg_0, ivec3(0, 0, int(1u)), vec4(0.0f));
+}
+
+void compute_main() {
+  textureStore_22f045();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/22f045.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/22f045.wgsl.expected.msl
new file mode 100644
index 0000000..f07f39f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/22f045.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_22f045(texture2d_array<float, access::write> tint_symbol_1) {
+  tint_symbol_1.write(float4(0.0f), uint2(int2(0)), 1u);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<float, access::write> tint_symbol_2) {
+  textureStore_22f045(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<float, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<float, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureStore_22f045(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d_array<float, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureStore_22f045(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureStore/22f045.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/22f045.wgsl.expected.spvasm
new file mode 100644
index 0000000..69ce3d4
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/22f045.wgsl.expected.spvasm
@@ -0,0 +1,75 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 39
+; 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 %textureStore_22f045 "textureStore_22f045"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 1 0 2 Rgba8Snorm
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %12 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %v3int = OpTypeVector %int 3
+      %int_0 = OpConstant %int 0
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+         %25 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureStore_22f045 = OpFunction %void None %12
+         %15 = OpLabel
+         %17 = OpLoad %11 %arg_0
+         %21 = OpBitcast %int %uint_1
+         %24 = OpCompositeConstruct %v3int %int_0 %int_0 %21
+               OpImageWrite %17 %24 %5
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %25
+         %27 = OpLabel
+         %28 = OpFunctionCall %void %textureStore_22f045
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+         %30 = OpLabel
+         %31 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %31
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %textureStore_22f045
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %12
+         %37 = OpLabel
+         %38 = OpFunctionCall %void %textureStore_22f045
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/22f045.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/22f045.wgsl.expected.wgsl
new file mode 100644
index 0000000..688f6a4
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/22f045.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba8snorm, write>;
+
+fn textureStore_22f045() {
+  textureStore(arg_0, vec2<i32>(), 1u, vec4<f32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_22f045();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_22f045();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_22f045();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/2383fc.wgsl b/test/tint/builtins/gen/literal/textureStore/2383fc.wgsl
new file mode 100644
index 0000000..09b48b1
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/2383fc.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<r32uint, write>;
+
+// fn textureStore(texture: texture_storage_2d_array<r32uint, write>, coords: vec2<u32>, array_index: i32, value: vec4<u32>)
+fn textureStore_2383fc() {
+  textureStore(arg_0, vec2<u32>(), 1i, vec4<u32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_2383fc();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_2383fc();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_2383fc();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/2383fc.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/2383fc.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..3e78178
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/2383fc.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2DArray<uint4> arg_0 : register(u0, space1);
+
+void textureStore_2383fc() {
+  arg_0[uint3(0u, 0u, uint(1))] = (0u).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_2383fc();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureStore_2383fc();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_2383fc();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/2383fc.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/2383fc.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..3e78178
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/2383fc.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2DArray<uint4> arg_0 : register(u0, space1);
+
+void textureStore_2383fc() {
+  arg_0[uint3(0u, 0u, uint(1))] = (0u).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_2383fc();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureStore_2383fc();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_2383fc();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/2383fc.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/2383fc.wgsl.expected.glsl
new file mode 100644
index 0000000..6691080
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/2383fc.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+layout(r32ui) uniform highp writeonly uimage2DArray arg_0;
+void textureStore_2383fc() {
+  imageStore(arg_0, ivec3(uvec3(0u, 0u, uint(1))), uvec4(0u));
+}
+
+vec4 vertex_main() {
+  textureStore_2383fc();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+layout(r32ui) uniform highp writeonly uimage2DArray arg_0;
+void textureStore_2383fc() {
+  imageStore(arg_0, ivec3(uvec3(0u, 0u, uint(1))), uvec4(0u));
+}
+
+void fragment_main() {
+  textureStore_2383fc();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+layout(r32ui) uniform highp writeonly uimage2DArray arg_0;
+void textureStore_2383fc() {
+  imageStore(arg_0, ivec3(uvec3(0u, 0u, uint(1))), uvec4(0u));
+}
+
+void compute_main() {
+  textureStore_2383fc();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/2383fc.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/2383fc.wgsl.expected.msl
new file mode 100644
index 0000000..b56a39a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/2383fc.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_2383fc(texture2d_array<uint, access::write> tint_symbol_1) {
+  tint_symbol_1.write(uint4(0u), uint2(uint2(0u)), 1);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<uint, access::write> tint_symbol_2) {
+  textureStore_2383fc(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<uint, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<uint, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureStore_2383fc(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d_array<uint, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureStore_2383fc(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureStore/2383fc.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/2383fc.wgsl.expected.spvasm
new file mode 100644
index 0000000..4b7a731
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/2383fc.wgsl.expected.spvasm
@@ -0,0 +1,77 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 41
+; 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 %textureStore_2383fc "textureStore_2383fc"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 2D 0 1 0 2 R32ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+     %v3uint = OpTypeVector %uint 3
+     %uint_0 = OpConstant %uint 0
+        %int = OpTypeInt 32 1
+      %int_1 = OpConstant %int 1
+     %v4uint = OpTypeVector %uint 4
+         %26 = OpConstantNull %v4uint
+         %27 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureStore_2383fc = OpFunction %void None %13
+         %16 = OpLabel
+         %18 = OpLoad %11 %arg_0
+         %21 = OpBitcast %uint %int_1
+         %24 = OpCompositeConstruct %v3uint %uint_0 %uint_0 %21
+               OpImageWrite %18 %24 %26
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %27
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %textureStore_2383fc
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %32 = OpLabel
+         %33 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %33
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %textureStore_2383fc
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %39 = OpLabel
+         %40 = OpFunctionCall %void %textureStore_2383fc
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/2383fc.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/2383fc.wgsl.expected.wgsl
new file mode 100644
index 0000000..58bfd01
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/2383fc.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<r32uint, write>;
+
+fn textureStore_2383fc() {
+  textureStore(arg_0, vec2<u32>(), 1i, vec4<u32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_2383fc();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_2383fc();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_2383fc();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/258ab0.wgsl b/test/tint/builtins/gen/literal/textureStore/258ab0.wgsl
new file mode 100644
index 0000000..a0c5fcb
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/258ab0.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba8unorm, write>;
+
+// fn textureStore(texture: texture_storage_2d_array<rgba8unorm, write>, coords: vec2<u32>, array_index: i32, value: vec4<f32>)
+fn textureStore_258ab0() {
+  textureStore(arg_0, vec2<u32>(), 1i, vec4<f32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_258ab0();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_258ab0();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_258ab0();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/258ab0.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/258ab0.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..60afdb8
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/258ab0.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2DArray<float4> arg_0 : register(u0, space1);
+
+void textureStore_258ab0() {
+  arg_0[uint3(0u, 0u, uint(1))] = (0.0f).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_258ab0();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureStore_258ab0();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_258ab0();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/258ab0.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/258ab0.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..60afdb8
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/258ab0.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2DArray<float4> arg_0 : register(u0, space1);
+
+void textureStore_258ab0() {
+  arg_0[uint3(0u, 0u, uint(1))] = (0.0f).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_258ab0();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureStore_258ab0();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_258ab0();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/258ab0.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/258ab0.wgsl.expected.glsl
new file mode 100644
index 0000000..8590cc9
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/258ab0.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+layout(rgba8) uniform highp writeonly image2DArray arg_0;
+void textureStore_258ab0() {
+  imageStore(arg_0, ivec3(uvec3(0u, 0u, uint(1))), vec4(0.0f));
+}
+
+vec4 vertex_main() {
+  textureStore_258ab0();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+layout(rgba8) uniform highp writeonly image2DArray arg_0;
+void textureStore_258ab0() {
+  imageStore(arg_0, ivec3(uvec3(0u, 0u, uint(1))), vec4(0.0f));
+}
+
+void fragment_main() {
+  textureStore_258ab0();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+layout(rgba8) uniform highp writeonly image2DArray arg_0;
+void textureStore_258ab0() {
+  imageStore(arg_0, ivec3(uvec3(0u, 0u, uint(1))), vec4(0.0f));
+}
+
+void compute_main() {
+  textureStore_258ab0();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/258ab0.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/258ab0.wgsl.expected.msl
new file mode 100644
index 0000000..0a3abff
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/258ab0.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_258ab0(texture2d_array<float, access::write> tint_symbol_1) {
+  tint_symbol_1.write(float4(0.0f), uint2(uint2(0u)), 1);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<float, access::write> tint_symbol_2) {
+  textureStore_258ab0(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<float, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<float, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureStore_258ab0(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d_array<float, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureStore_258ab0(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureStore/258ab0.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/258ab0.wgsl.expected.spvasm
new file mode 100644
index 0000000..3333cbe
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/258ab0.wgsl.expected.spvasm
@@ -0,0 +1,75 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 39
+; 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 %textureStore_258ab0 "textureStore_258ab0"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 1 0 2 Rgba8
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %12 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v3uint = OpTypeVector %uint 3
+     %uint_0 = OpConstant %uint 0
+        %int = OpTypeInt 32 1
+      %int_1 = OpConstant %int 1
+         %25 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureStore_258ab0 = OpFunction %void None %12
+         %15 = OpLabel
+         %17 = OpLoad %11 %arg_0
+         %21 = OpBitcast %uint %int_1
+         %24 = OpCompositeConstruct %v3uint %uint_0 %uint_0 %21
+               OpImageWrite %17 %24 %5
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %25
+         %27 = OpLabel
+         %28 = OpFunctionCall %void %textureStore_258ab0
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+         %30 = OpLabel
+         %31 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %31
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %textureStore_258ab0
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %12
+         %37 = OpLabel
+         %38 = OpFunctionCall %void %textureStore_258ab0
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/258ab0.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/258ab0.wgsl.expected.wgsl
new file mode 100644
index 0000000..40d4997
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/258ab0.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba8unorm, write>;
+
+fn textureStore_258ab0() {
+  textureStore(arg_0, vec2<u32>(), 1i, vec4<f32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_258ab0();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_258ab0();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_258ab0();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/28a7ec.wgsl b/test/tint/builtins/gen/literal/textureStore/28a7ec.wgsl
new file mode 100644
index 0000000..1146908
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/28a7ec.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<r32sint, write>;
+
+// fn textureStore(texture: texture_storage_2d_array<r32sint, write>, coords: vec2<u32>, array_index: i32, value: vec4<i32>)
+fn textureStore_28a7ec() {
+  textureStore(arg_0, vec2<u32>(), 1i, vec4<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_28a7ec();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_28a7ec();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_28a7ec();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/28a7ec.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/28a7ec.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..828727c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/28a7ec.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2DArray<int4> arg_0 : register(u0, space1);
+
+void textureStore_28a7ec() {
+  arg_0[uint3(0u, 0u, uint(1))] = (0).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_28a7ec();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureStore_28a7ec();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_28a7ec();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/28a7ec.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/28a7ec.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..828727c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/28a7ec.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2DArray<int4> arg_0 : register(u0, space1);
+
+void textureStore_28a7ec() {
+  arg_0[uint3(0u, 0u, uint(1))] = (0).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_28a7ec();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureStore_28a7ec();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_28a7ec();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/28a7ec.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/28a7ec.wgsl.expected.glsl
new file mode 100644
index 0000000..53936c4
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/28a7ec.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+layout(r32i) uniform highp writeonly iimage2DArray arg_0;
+void textureStore_28a7ec() {
+  imageStore(arg_0, ivec3(uvec3(0u, 0u, uint(1))), ivec4(0));
+}
+
+vec4 vertex_main() {
+  textureStore_28a7ec();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+layout(r32i) uniform highp writeonly iimage2DArray arg_0;
+void textureStore_28a7ec() {
+  imageStore(arg_0, ivec3(uvec3(0u, 0u, uint(1))), ivec4(0));
+}
+
+void fragment_main() {
+  textureStore_28a7ec();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+layout(r32i) uniform highp writeonly iimage2DArray arg_0;
+void textureStore_28a7ec() {
+  imageStore(arg_0, ivec3(uvec3(0u, 0u, uint(1))), ivec4(0));
+}
+
+void compute_main() {
+  textureStore_28a7ec();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/28a7ec.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/28a7ec.wgsl.expected.msl
new file mode 100644
index 0000000..65d7504
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/28a7ec.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_28a7ec(texture2d_array<int, access::write> tint_symbol_1) {
+  tint_symbol_1.write(int4(0), uint2(uint2(0u)), 1);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<int, access::write> tint_symbol_2) {
+  textureStore_28a7ec(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<int, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<int, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureStore_28a7ec(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d_array<int, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureStore_28a7ec(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureStore/28a7ec.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/28a7ec.wgsl.expected.spvasm
new file mode 100644
index 0000000..51ce8d9
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/28a7ec.wgsl.expected.spvasm
@@ -0,0 +1,77 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 41
+; 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 %textureStore_28a7ec "textureStore_28a7ec"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 2D 0 1 0 2 R32i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v3uint = OpTypeVector %uint 3
+     %uint_0 = OpConstant %uint 0
+      %int_1 = OpConstant %int 1
+      %v4int = OpTypeVector %int 4
+         %26 = OpConstantNull %v4int
+         %27 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureStore_28a7ec = OpFunction %void None %13
+         %16 = OpLabel
+         %18 = OpLoad %11 %arg_0
+         %22 = OpBitcast %uint %int_1
+         %24 = OpCompositeConstruct %v3uint %uint_0 %uint_0 %22
+               OpImageWrite %18 %24 %26
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %27
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %textureStore_28a7ec
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %32 = OpLabel
+         %33 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %33
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %textureStore_28a7ec
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %39 = OpLabel
+         %40 = OpFunctionCall %void %textureStore_28a7ec
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/28a7ec.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/28a7ec.wgsl.expected.wgsl
new file mode 100644
index 0000000..01b44fa
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/28a7ec.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<r32sint, write>;
+
+fn textureStore_28a7ec() {
+  textureStore(arg_0, vec2<u32>(), 1i, vec4<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_28a7ec();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_28a7ec();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_28a7ec();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/30b0b0.wgsl b/test/tint/builtins/gen/literal/textureStore/30b0b0.wgsl
new file mode 100644
index 0000000..b4d61dc
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/30b0b0.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba32sint, write>;
+
+// fn textureStore(texture: texture_storage_2d_array<rgba32sint, write>, coords: vec2<i32>, array_index: u32, value: vec4<i32>)
+fn textureStore_30b0b0() {
+  textureStore(arg_0, vec2<i32>(), 1u, vec4<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_30b0b0();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_30b0b0();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_30b0b0();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/30b0b0.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/30b0b0.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..21e26cc
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/30b0b0.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2DArray<int4> arg_0 : register(u0, space1);
+
+void textureStore_30b0b0() {
+  arg_0[int3(0, 0, int(1u))] = (0).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_30b0b0();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureStore_30b0b0();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_30b0b0();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/30b0b0.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/30b0b0.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..21e26cc
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/30b0b0.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2DArray<int4> arg_0 : register(u0, space1);
+
+void textureStore_30b0b0() {
+  arg_0[int3(0, 0, int(1u))] = (0).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_30b0b0();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureStore_30b0b0();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_30b0b0();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/30b0b0.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/30b0b0.wgsl.expected.glsl
new file mode 100644
index 0000000..6e95a8b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/30b0b0.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+layout(rgba32i) uniform highp writeonly iimage2DArray arg_0;
+void textureStore_30b0b0() {
+  imageStore(arg_0, ivec3(0, 0, int(1u)), ivec4(0));
+}
+
+vec4 vertex_main() {
+  textureStore_30b0b0();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+layout(rgba32i) uniform highp writeonly iimage2DArray arg_0;
+void textureStore_30b0b0() {
+  imageStore(arg_0, ivec3(0, 0, int(1u)), ivec4(0));
+}
+
+void fragment_main() {
+  textureStore_30b0b0();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+layout(rgba32i) uniform highp writeonly iimage2DArray arg_0;
+void textureStore_30b0b0() {
+  imageStore(arg_0, ivec3(0, 0, int(1u)), ivec4(0));
+}
+
+void compute_main() {
+  textureStore_30b0b0();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/30b0b0.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/30b0b0.wgsl.expected.msl
new file mode 100644
index 0000000..540c35a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/30b0b0.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_30b0b0(texture2d_array<int, access::write> tint_symbol_1) {
+  tint_symbol_1.write(int4(0), uint2(int2(0)), 1u);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<int, access::write> tint_symbol_2) {
+  textureStore_30b0b0(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<int, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<int, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureStore_30b0b0(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d_array<int, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureStore_30b0b0(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureStore/30b0b0.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/30b0b0.wgsl.expected.spvasm
new file mode 100644
index 0000000..4eef3b4
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/30b0b0.wgsl.expected.spvasm
@@ -0,0 +1,77 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 41
+; 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 %textureStore_30b0b0 "textureStore_30b0b0"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 2D 0 1 0 2 Rgba32i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+      %v3int = OpTypeVector %int 3
+      %int_0 = OpConstant %int 0
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+      %v4int = OpTypeVector %int 4
+         %26 = OpConstantNull %v4int
+         %27 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureStore_30b0b0 = OpFunction %void None %13
+         %16 = OpLabel
+         %18 = OpLoad %11 %arg_0
+         %21 = OpBitcast %int %uint_1
+         %24 = OpCompositeConstruct %v3int %int_0 %int_0 %21
+               OpImageWrite %18 %24 %26
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %27
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %textureStore_30b0b0
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %32 = OpLabel
+         %33 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %33
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %textureStore_30b0b0
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %39 = OpLabel
+         %40 = OpFunctionCall %void %textureStore_30b0b0
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/30b0b0.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/30b0b0.wgsl.expected.wgsl
new file mode 100644
index 0000000..158559f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/30b0b0.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba32sint, write>;
+
+fn textureStore_30b0b0() {
+  textureStore(arg_0, vec2<i32>(), 1u, vec4<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_30b0b0();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_30b0b0();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_30b0b0();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/33cec0.wgsl b/test/tint/builtins/gen/literal/textureStore/33cec0.wgsl
new file mode 100644
index 0000000..4119114
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/33cec0.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba16uint, write>;
+
+// fn textureStore(texture: texture_storage_2d_array<rgba16uint, write>, coords: vec2<u32>, array_index: i32, value: vec4<u32>)
+fn textureStore_33cec0() {
+  textureStore(arg_0, vec2<u32>(), 1i, vec4<u32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_33cec0();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_33cec0();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_33cec0();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/33cec0.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/33cec0.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..86c488b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/33cec0.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2DArray<uint4> arg_0 : register(u0, space1);
+
+void textureStore_33cec0() {
+  arg_0[uint3(0u, 0u, uint(1))] = (0u).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_33cec0();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureStore_33cec0();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_33cec0();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/33cec0.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/33cec0.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..86c488b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/33cec0.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2DArray<uint4> arg_0 : register(u0, space1);
+
+void textureStore_33cec0() {
+  arg_0[uint3(0u, 0u, uint(1))] = (0u).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_33cec0();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureStore_33cec0();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_33cec0();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/33cec0.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/33cec0.wgsl.expected.glsl
new file mode 100644
index 0000000..26fe35d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/33cec0.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+layout(rgba16ui) uniform highp writeonly uimage2DArray arg_0;
+void textureStore_33cec0() {
+  imageStore(arg_0, ivec3(uvec3(0u, 0u, uint(1))), uvec4(0u));
+}
+
+vec4 vertex_main() {
+  textureStore_33cec0();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+layout(rgba16ui) uniform highp writeonly uimage2DArray arg_0;
+void textureStore_33cec0() {
+  imageStore(arg_0, ivec3(uvec3(0u, 0u, uint(1))), uvec4(0u));
+}
+
+void fragment_main() {
+  textureStore_33cec0();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+layout(rgba16ui) uniform highp writeonly uimage2DArray arg_0;
+void textureStore_33cec0() {
+  imageStore(arg_0, ivec3(uvec3(0u, 0u, uint(1))), uvec4(0u));
+}
+
+void compute_main() {
+  textureStore_33cec0();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/33cec0.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/33cec0.wgsl.expected.msl
new file mode 100644
index 0000000..0f73a0c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/33cec0.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_33cec0(texture2d_array<uint, access::write> tint_symbol_1) {
+  tint_symbol_1.write(uint4(0u), uint2(uint2(0u)), 1);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<uint, access::write> tint_symbol_2) {
+  textureStore_33cec0(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<uint, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<uint, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureStore_33cec0(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d_array<uint, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureStore_33cec0(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureStore/33cec0.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/33cec0.wgsl.expected.spvasm
new file mode 100644
index 0000000..b62536b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/33cec0.wgsl.expected.spvasm
@@ -0,0 +1,77 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 41
+; 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 %textureStore_33cec0 "textureStore_33cec0"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 2D 0 1 0 2 Rgba16ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+     %v3uint = OpTypeVector %uint 3
+     %uint_0 = OpConstant %uint 0
+        %int = OpTypeInt 32 1
+      %int_1 = OpConstant %int 1
+     %v4uint = OpTypeVector %uint 4
+         %26 = OpConstantNull %v4uint
+         %27 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureStore_33cec0 = OpFunction %void None %13
+         %16 = OpLabel
+         %18 = OpLoad %11 %arg_0
+         %21 = OpBitcast %uint %int_1
+         %24 = OpCompositeConstruct %v3uint %uint_0 %uint_0 %21
+               OpImageWrite %18 %24 %26
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %27
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %textureStore_33cec0
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %32 = OpLabel
+         %33 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %33
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %textureStore_33cec0
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %39 = OpLabel
+         %40 = OpFunctionCall %void %textureStore_33cec0
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/33cec0.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/33cec0.wgsl.expected.wgsl
new file mode 100644
index 0000000..5ee34fe
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/33cec0.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba16uint, write>;
+
+fn textureStore_33cec0() {
+  textureStore(arg_0, vec2<u32>(), 1i, vec4<u32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_33cec0();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_33cec0();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_33cec0();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/37ffd4.wgsl b/test/tint/builtins/gen/literal/textureStore/37ffd4.wgsl
new file mode 100644
index 0000000..f8299a6
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/37ffd4.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba32float, write>;
+
+// fn textureStore(texture: texture_storage_2d_array<rgba32float, write>, coords: vec2<u32>, array_index: i32, value: vec4<f32>)
+fn textureStore_37ffd4() {
+  textureStore(arg_0, vec2<u32>(), 1i, vec4<f32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_37ffd4();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_37ffd4();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_37ffd4();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/37ffd4.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/37ffd4.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..7bafb82
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/37ffd4.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2DArray<float4> arg_0 : register(u0, space1);
+
+void textureStore_37ffd4() {
+  arg_0[uint3(0u, 0u, uint(1))] = (0.0f).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_37ffd4();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureStore_37ffd4();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_37ffd4();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/37ffd4.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/37ffd4.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..7bafb82
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/37ffd4.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2DArray<float4> arg_0 : register(u0, space1);
+
+void textureStore_37ffd4() {
+  arg_0[uint3(0u, 0u, uint(1))] = (0.0f).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_37ffd4();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureStore_37ffd4();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_37ffd4();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/37ffd4.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/37ffd4.wgsl.expected.glsl
new file mode 100644
index 0000000..1c7cfb6
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/37ffd4.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+layout(rgba32f) uniform highp writeonly image2DArray arg_0;
+void textureStore_37ffd4() {
+  imageStore(arg_0, ivec3(uvec3(0u, 0u, uint(1))), vec4(0.0f));
+}
+
+vec4 vertex_main() {
+  textureStore_37ffd4();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+layout(rgba32f) uniform highp writeonly image2DArray arg_0;
+void textureStore_37ffd4() {
+  imageStore(arg_0, ivec3(uvec3(0u, 0u, uint(1))), vec4(0.0f));
+}
+
+void fragment_main() {
+  textureStore_37ffd4();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+layout(rgba32f) uniform highp writeonly image2DArray arg_0;
+void textureStore_37ffd4() {
+  imageStore(arg_0, ivec3(uvec3(0u, 0u, uint(1))), vec4(0.0f));
+}
+
+void compute_main() {
+  textureStore_37ffd4();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/37ffd4.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/37ffd4.wgsl.expected.msl
new file mode 100644
index 0000000..85bb75c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/37ffd4.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_37ffd4(texture2d_array<float, access::write> tint_symbol_1) {
+  tint_symbol_1.write(float4(0.0f), uint2(uint2(0u)), 1);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<float, access::write> tint_symbol_2) {
+  textureStore_37ffd4(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<float, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<float, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureStore_37ffd4(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d_array<float, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureStore_37ffd4(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureStore/37ffd4.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/37ffd4.wgsl.expected.spvasm
new file mode 100644
index 0000000..b865d9c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/37ffd4.wgsl.expected.spvasm
@@ -0,0 +1,75 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 39
+; 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 %textureStore_37ffd4 "textureStore_37ffd4"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 1 0 2 Rgba32f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %12 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v3uint = OpTypeVector %uint 3
+     %uint_0 = OpConstant %uint 0
+        %int = OpTypeInt 32 1
+      %int_1 = OpConstant %int 1
+         %25 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureStore_37ffd4 = OpFunction %void None %12
+         %15 = OpLabel
+         %17 = OpLoad %11 %arg_0
+         %21 = OpBitcast %uint %int_1
+         %24 = OpCompositeConstruct %v3uint %uint_0 %uint_0 %21
+               OpImageWrite %17 %24 %5
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %25
+         %27 = OpLabel
+         %28 = OpFunctionCall %void %textureStore_37ffd4
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+         %30 = OpLabel
+         %31 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %31
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %textureStore_37ffd4
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %12
+         %37 = OpLabel
+         %38 = OpFunctionCall %void %textureStore_37ffd4
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/37ffd4.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/37ffd4.wgsl.expected.wgsl
new file mode 100644
index 0000000..1142990
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/37ffd4.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba32float, write>;
+
+fn textureStore_37ffd4() {
+  textureStore(arg_0, vec2<u32>(), 1i, vec4<f32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_37ffd4();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_37ffd4();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_37ffd4();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/44daa7.wgsl b/test/tint/builtins/gen/literal/textureStore/44daa7.wgsl
new file mode 100644
index 0000000..1cd12d9
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/44daa7.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba16float, write>;
+
+// fn textureStore(texture: texture_storage_2d_array<rgba16float, write>, coords: vec2<i32>, array_index: u32, value: vec4<f32>)
+fn textureStore_44daa7() {
+  textureStore(arg_0, vec2<i32>(), 1u, vec4<f32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_44daa7();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_44daa7();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_44daa7();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/44daa7.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/44daa7.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..987f074
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/44daa7.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2DArray<float4> arg_0 : register(u0, space1);
+
+void textureStore_44daa7() {
+  arg_0[int3(0, 0, int(1u))] = (0.0f).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_44daa7();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureStore_44daa7();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_44daa7();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/44daa7.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/44daa7.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..987f074
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/44daa7.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2DArray<float4> arg_0 : register(u0, space1);
+
+void textureStore_44daa7() {
+  arg_0[int3(0, 0, int(1u))] = (0.0f).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_44daa7();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureStore_44daa7();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_44daa7();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/44daa7.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/44daa7.wgsl.expected.glsl
new file mode 100644
index 0000000..a45332f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/44daa7.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+layout(rgba16f) uniform highp writeonly image2DArray arg_0;
+void textureStore_44daa7() {
+  imageStore(arg_0, ivec3(0, 0, int(1u)), vec4(0.0f));
+}
+
+vec4 vertex_main() {
+  textureStore_44daa7();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+layout(rgba16f) uniform highp writeonly image2DArray arg_0;
+void textureStore_44daa7() {
+  imageStore(arg_0, ivec3(0, 0, int(1u)), vec4(0.0f));
+}
+
+void fragment_main() {
+  textureStore_44daa7();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+layout(rgba16f) uniform highp writeonly image2DArray arg_0;
+void textureStore_44daa7() {
+  imageStore(arg_0, ivec3(0, 0, int(1u)), vec4(0.0f));
+}
+
+void compute_main() {
+  textureStore_44daa7();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/44daa7.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/44daa7.wgsl.expected.msl
new file mode 100644
index 0000000..65604af
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/44daa7.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_44daa7(texture2d_array<float, access::write> tint_symbol_1) {
+  tint_symbol_1.write(float4(0.0f), uint2(int2(0)), 1u);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<float, access::write> tint_symbol_2) {
+  textureStore_44daa7(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<float, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<float, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureStore_44daa7(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d_array<float, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureStore_44daa7(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureStore/44daa7.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/44daa7.wgsl.expected.spvasm
new file mode 100644
index 0000000..3a6ccca
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/44daa7.wgsl.expected.spvasm
@@ -0,0 +1,75 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 39
+; 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 %textureStore_44daa7 "textureStore_44daa7"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 1 0 2 Rgba16f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %12 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %v3int = OpTypeVector %int 3
+      %int_0 = OpConstant %int 0
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+         %25 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureStore_44daa7 = OpFunction %void None %12
+         %15 = OpLabel
+         %17 = OpLoad %11 %arg_0
+         %21 = OpBitcast %int %uint_1
+         %24 = OpCompositeConstruct %v3int %int_0 %int_0 %21
+               OpImageWrite %17 %24 %5
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %25
+         %27 = OpLabel
+         %28 = OpFunctionCall %void %textureStore_44daa7
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+         %30 = OpLabel
+         %31 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %31
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %textureStore_44daa7
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %12
+         %37 = OpLabel
+         %38 = OpFunctionCall %void %textureStore_44daa7
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/44daa7.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/44daa7.wgsl.expected.wgsl
new file mode 100644
index 0000000..1deb175
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/44daa7.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba16float, write>;
+
+fn textureStore_44daa7() {
+  textureStore(arg_0, vec2<i32>(), 1u, vec4<f32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_44daa7();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_44daa7();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_44daa7();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/4d359d.wgsl b/test/tint/builtins/gen/literal/textureStore/4d359d.wgsl
new file mode 100644
index 0000000..f239e4e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/4d359d.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rg32uint, write>;
+
+// fn textureStore(texture: texture_storage_2d_array<rg32uint, write>, coords: vec2<u32>, array_index: i32, value: vec4<u32>)
+fn textureStore_4d359d() {
+  textureStore(arg_0, vec2<u32>(), 1i, vec4<u32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_4d359d();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_4d359d();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_4d359d();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/4d359d.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/4d359d.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..39ad70a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/4d359d.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2DArray<uint4> arg_0 : register(u0, space1);
+
+void textureStore_4d359d() {
+  arg_0[uint3(0u, 0u, uint(1))] = (0u).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_4d359d();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureStore_4d359d();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_4d359d();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/4d359d.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/4d359d.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..39ad70a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/4d359d.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2DArray<uint4> arg_0 : register(u0, space1);
+
+void textureStore_4d359d() {
+  arg_0[uint3(0u, 0u, uint(1))] = (0u).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_4d359d();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureStore_4d359d();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_4d359d();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/4d359d.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/4d359d.wgsl.expected.glsl
new file mode 100644
index 0000000..b1e3929
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/4d359d.wgsl.expected.glsl
@@ -0,0 +1,75 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rg32ui) uniform highp writeonly uimage2DArray arg_0;
+void textureStore_4d359d() {
+  imageStore(arg_0, ivec3(uvec3(0u, 0u, uint(1))), uvec4(0u));
+}
+
+vec4 vertex_main() {
+  textureStore_4d359d();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+layout(rg32ui) uniform highp writeonly uimage2DArray arg_0;
+void textureStore_4d359d() {
+  imageStore(arg_0, ivec3(uvec3(0u, 0u, uint(1))), uvec4(0u));
+}
+
+void fragment_main() {
+  textureStore_4d359d();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'image load-store format' : not supported with this profile: es
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rg32ui) uniform highp writeonly uimage2DArray arg_0;
+void textureStore_4d359d() {
+  imageStore(arg_0, ivec3(uvec3(0u, 0u, uint(1))), uvec4(0u));
+}
+
+void compute_main() {
+  textureStore_4d359d();
+}
+
+layout(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/literal/textureStore/4d359d.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/4d359d.wgsl.expected.msl
new file mode 100644
index 0000000..db817af
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/4d359d.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_4d359d(texture2d_array<uint, access::write> tint_symbol_1) {
+  tint_symbol_1.write(uint4(0u), uint2(uint2(0u)), 1);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<uint, access::write> tint_symbol_2) {
+  textureStore_4d359d(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<uint, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<uint, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureStore_4d359d(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d_array<uint, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureStore_4d359d(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureStore/4d359d.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/4d359d.wgsl.expected.spvasm
new file mode 100644
index 0000000..a218220
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/4d359d.wgsl.expected.spvasm
@@ -0,0 +1,78 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 41
+; 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 %textureStore_4d359d "textureStore_4d359d"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 2D 0 1 0 2 Rg32ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+     %v3uint = OpTypeVector %uint 3
+     %uint_0 = OpConstant %uint 0
+        %int = OpTypeInt 32 1
+      %int_1 = OpConstant %int 1
+     %v4uint = OpTypeVector %uint 4
+         %26 = OpConstantNull %v4uint
+         %27 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureStore_4d359d = OpFunction %void None %13
+         %16 = OpLabel
+         %18 = OpLoad %11 %arg_0
+         %21 = OpBitcast %uint %int_1
+         %24 = OpCompositeConstruct %v3uint %uint_0 %uint_0 %21
+               OpImageWrite %18 %24 %26
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %27
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %textureStore_4d359d
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %32 = OpLabel
+         %33 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %33
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %textureStore_4d359d
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %39 = OpLabel
+         %40 = OpFunctionCall %void %textureStore_4d359d
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/4d359d.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/4d359d.wgsl.expected.wgsl
new file mode 100644
index 0000000..aeeef6a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/4d359d.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rg32uint, write>;
+
+fn textureStore_4d359d() {
+  textureStore(arg_0, vec2<u32>(), 1i, vec4<u32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_4d359d();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_4d359d();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_4d359d();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/59a0ab.wgsl b/test/tint/builtins/gen/literal/textureStore/59a0ab.wgsl
new file mode 100644
index 0000000..482beb0
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/59a0ab.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba8snorm, write>;
+
+// fn textureStore(texture: texture_storage_2d_array<rgba8snorm, write>, coords: vec2<u32>, array_index: i32, value: vec4<f32>)
+fn textureStore_59a0ab() {
+  textureStore(arg_0, vec2<u32>(), 1i, vec4<f32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_59a0ab();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_59a0ab();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_59a0ab();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/59a0ab.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/59a0ab.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..1a0d898
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/59a0ab.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2DArray<float4> arg_0 : register(u0, space1);
+
+void textureStore_59a0ab() {
+  arg_0[uint3(0u, 0u, uint(1))] = (0.0f).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_59a0ab();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureStore_59a0ab();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_59a0ab();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/59a0ab.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/59a0ab.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..1a0d898
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/59a0ab.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2DArray<float4> arg_0 : register(u0, space1);
+
+void textureStore_59a0ab() {
+  arg_0[uint3(0u, 0u, uint(1))] = (0.0f).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_59a0ab();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureStore_59a0ab();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_59a0ab();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/59a0ab.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/59a0ab.wgsl.expected.glsl
new file mode 100644
index 0000000..d89b2c7
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/59a0ab.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+layout(rgba8_snorm) uniform highp writeonly image2DArray arg_0;
+void textureStore_59a0ab() {
+  imageStore(arg_0, ivec3(uvec3(0u, 0u, uint(1))), vec4(0.0f));
+}
+
+vec4 vertex_main() {
+  textureStore_59a0ab();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+layout(rgba8_snorm) uniform highp writeonly image2DArray arg_0;
+void textureStore_59a0ab() {
+  imageStore(arg_0, ivec3(uvec3(0u, 0u, uint(1))), vec4(0.0f));
+}
+
+void fragment_main() {
+  textureStore_59a0ab();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+layout(rgba8_snorm) uniform highp writeonly image2DArray arg_0;
+void textureStore_59a0ab() {
+  imageStore(arg_0, ivec3(uvec3(0u, 0u, uint(1))), vec4(0.0f));
+}
+
+void compute_main() {
+  textureStore_59a0ab();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/59a0ab.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/59a0ab.wgsl.expected.msl
new file mode 100644
index 0000000..b77b7dd
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/59a0ab.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_59a0ab(texture2d_array<float, access::write> tint_symbol_1) {
+  tint_symbol_1.write(float4(0.0f), uint2(uint2(0u)), 1);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<float, access::write> tint_symbol_2) {
+  textureStore_59a0ab(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<float, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<float, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureStore_59a0ab(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d_array<float, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureStore_59a0ab(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureStore/59a0ab.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/59a0ab.wgsl.expected.spvasm
new file mode 100644
index 0000000..d2ecfac
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/59a0ab.wgsl.expected.spvasm
@@ -0,0 +1,75 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 39
+; 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 %textureStore_59a0ab "textureStore_59a0ab"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 1 0 2 Rgba8Snorm
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %12 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v3uint = OpTypeVector %uint 3
+     %uint_0 = OpConstant %uint 0
+        %int = OpTypeInt 32 1
+      %int_1 = OpConstant %int 1
+         %25 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureStore_59a0ab = OpFunction %void None %12
+         %15 = OpLabel
+         %17 = OpLoad %11 %arg_0
+         %21 = OpBitcast %uint %int_1
+         %24 = OpCompositeConstruct %v3uint %uint_0 %uint_0 %21
+               OpImageWrite %17 %24 %5
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %25
+         %27 = OpLabel
+         %28 = OpFunctionCall %void %textureStore_59a0ab
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+         %30 = OpLabel
+         %31 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %31
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %textureStore_59a0ab
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %12
+         %37 = OpLabel
+         %38 = OpFunctionCall %void %textureStore_59a0ab
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/59a0ab.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/59a0ab.wgsl.expected.wgsl
new file mode 100644
index 0000000..2b2d44c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/59a0ab.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba8snorm, write>;
+
+fn textureStore_59a0ab() {
+  textureStore(arg_0, vec2<u32>(), 1i, vec4<f32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_59a0ab();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_59a0ab();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_59a0ab();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/5ddc61.wgsl b/test/tint/builtins/gen/literal/textureStore/5ddc61.wgsl
new file mode 100644
index 0000000..9b84f6d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/5ddc61.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba8sint, write>;
+
+// fn textureStore(texture: texture_storage_2d_array<rgba8sint, write>, coords: vec2<i32>, array_index: u32, value: vec4<i32>)
+fn textureStore_5ddc61() {
+  textureStore(arg_0, vec2<i32>(), 1u, vec4<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_5ddc61();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_5ddc61();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_5ddc61();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/5ddc61.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/5ddc61.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..e916cf9
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/5ddc61.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2DArray<int4> arg_0 : register(u0, space1);
+
+void textureStore_5ddc61() {
+  arg_0[int3(0, 0, int(1u))] = (0).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_5ddc61();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureStore_5ddc61();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_5ddc61();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/5ddc61.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/5ddc61.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..e916cf9
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/5ddc61.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2DArray<int4> arg_0 : register(u0, space1);
+
+void textureStore_5ddc61() {
+  arg_0[int3(0, 0, int(1u))] = (0).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_5ddc61();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureStore_5ddc61();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_5ddc61();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/5ddc61.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/5ddc61.wgsl.expected.glsl
new file mode 100644
index 0000000..a94cc1a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/5ddc61.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+layout(rgba8i) uniform highp writeonly iimage2DArray arg_0;
+void textureStore_5ddc61() {
+  imageStore(arg_0, ivec3(0, 0, int(1u)), ivec4(0));
+}
+
+vec4 vertex_main() {
+  textureStore_5ddc61();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+layout(rgba8i) uniform highp writeonly iimage2DArray arg_0;
+void textureStore_5ddc61() {
+  imageStore(arg_0, ivec3(0, 0, int(1u)), ivec4(0));
+}
+
+void fragment_main() {
+  textureStore_5ddc61();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+layout(rgba8i) uniform highp writeonly iimage2DArray arg_0;
+void textureStore_5ddc61() {
+  imageStore(arg_0, ivec3(0, 0, int(1u)), ivec4(0));
+}
+
+void compute_main() {
+  textureStore_5ddc61();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/5ddc61.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/5ddc61.wgsl.expected.msl
new file mode 100644
index 0000000..e8b62ee
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/5ddc61.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_5ddc61(texture2d_array<int, access::write> tint_symbol_1) {
+  tint_symbol_1.write(int4(0), uint2(int2(0)), 1u);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<int, access::write> tint_symbol_2) {
+  textureStore_5ddc61(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<int, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<int, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureStore_5ddc61(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d_array<int, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureStore_5ddc61(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureStore/5ddc61.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/5ddc61.wgsl.expected.spvasm
new file mode 100644
index 0000000..68f61b9
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/5ddc61.wgsl.expected.spvasm
@@ -0,0 +1,77 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 41
+; 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 %textureStore_5ddc61 "textureStore_5ddc61"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 2D 0 1 0 2 Rgba8i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+      %v3int = OpTypeVector %int 3
+      %int_0 = OpConstant %int 0
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+      %v4int = OpTypeVector %int 4
+         %26 = OpConstantNull %v4int
+         %27 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureStore_5ddc61 = OpFunction %void None %13
+         %16 = OpLabel
+         %18 = OpLoad %11 %arg_0
+         %21 = OpBitcast %int %uint_1
+         %24 = OpCompositeConstruct %v3int %int_0 %int_0 %21
+               OpImageWrite %18 %24 %26
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %27
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %textureStore_5ddc61
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %32 = OpLabel
+         %33 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %33
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %textureStore_5ddc61
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %39 = OpLabel
+         %40 = OpFunctionCall %void %textureStore_5ddc61
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/5ddc61.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/5ddc61.wgsl.expected.wgsl
new file mode 100644
index 0000000..de8f621
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/5ddc61.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba8sint, write>;
+
+fn textureStore_5ddc61() {
+  textureStore(arg_0, vec2<i32>(), 1u, vec4<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_5ddc61();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_5ddc61();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_5ddc61();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/658a74.wgsl b/test/tint/builtins/gen/literal/textureStore/658a74.wgsl
new file mode 100644
index 0000000..92689e1
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/658a74.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rg32float, write>;
+
+// fn textureStore(texture: texture_storage_2d_array<rg32float, write>, coords: vec2<i32>, array_index: u32, value: vec4<f32>)
+fn textureStore_658a74() {
+  textureStore(arg_0, vec2<i32>(), 1u, vec4<f32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_658a74();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_658a74();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_658a74();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/658a74.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/658a74.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..d3dcb5b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/658a74.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2DArray<float4> arg_0 : register(u0, space1);
+
+void textureStore_658a74() {
+  arg_0[int3(0, 0, int(1u))] = (0.0f).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_658a74();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureStore_658a74();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_658a74();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/658a74.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/658a74.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..d3dcb5b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/658a74.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2DArray<float4> arg_0 : register(u0, space1);
+
+void textureStore_658a74() {
+  arg_0[int3(0, 0, int(1u))] = (0.0f).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_658a74();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureStore_658a74();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_658a74();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/658a74.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/658a74.wgsl.expected.glsl
new file mode 100644
index 0000000..0724c65
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/658a74.wgsl.expected.glsl
@@ -0,0 +1,75 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rg32f) uniform highp writeonly image2DArray arg_0;
+void textureStore_658a74() {
+  imageStore(arg_0, ivec3(0, 0, int(1u)), vec4(0.0f));
+}
+
+vec4 vertex_main() {
+  textureStore_658a74();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+layout(rg32f) uniform highp writeonly image2DArray arg_0;
+void textureStore_658a74() {
+  imageStore(arg_0, ivec3(0, 0, int(1u)), vec4(0.0f));
+}
+
+void fragment_main() {
+  textureStore_658a74();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'image load-store format' : not supported with this profile: es
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rg32f) uniform highp writeonly image2DArray arg_0;
+void textureStore_658a74() {
+  imageStore(arg_0, ivec3(0, 0, int(1u)), vec4(0.0f));
+}
+
+void compute_main() {
+  textureStore_658a74();
+}
+
+layout(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/literal/textureStore/658a74.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/658a74.wgsl.expected.msl
new file mode 100644
index 0000000..0921ddc
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/658a74.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_658a74(texture2d_array<float, access::write> tint_symbol_1) {
+  tint_symbol_1.write(float4(0.0f), uint2(int2(0)), 1u);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<float, access::write> tint_symbol_2) {
+  textureStore_658a74(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<float, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<float, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureStore_658a74(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d_array<float, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureStore_658a74(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureStore/658a74.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/658a74.wgsl.expected.spvasm
new file mode 100644
index 0000000..5607331
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/658a74.wgsl.expected.spvasm
@@ -0,0 +1,76 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 39
+; 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 %textureStore_658a74 "textureStore_658a74"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 1 0 2 Rg32f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %12 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %v3int = OpTypeVector %int 3
+      %int_0 = OpConstant %int 0
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+         %25 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureStore_658a74 = OpFunction %void None %12
+         %15 = OpLabel
+         %17 = OpLoad %11 %arg_0
+         %21 = OpBitcast %int %uint_1
+         %24 = OpCompositeConstruct %v3int %int_0 %int_0 %21
+               OpImageWrite %17 %24 %5
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %25
+         %27 = OpLabel
+         %28 = OpFunctionCall %void %textureStore_658a74
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+         %30 = OpLabel
+         %31 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %31
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %textureStore_658a74
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %12
+         %37 = OpLabel
+         %38 = OpFunctionCall %void %textureStore_658a74
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/658a74.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/658a74.wgsl.expected.wgsl
new file mode 100644
index 0000000..9c8cc3a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/658a74.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rg32float, write>;
+
+fn textureStore_658a74() {
+  textureStore(arg_0, vec2<i32>(), 1u, vec4<f32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_658a74();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_658a74();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_658a74();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/6f8642.wgsl b/test/tint/builtins/gen/literal/textureStore/6f8642.wgsl
new file mode 100644
index 0000000..b909a03
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/6f8642.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba32uint, write>;
+
+// fn textureStore(texture: texture_storage_2d_array<rgba32uint, write>, coords: vec2<u32>, array_index: i32, value: vec4<u32>)
+fn textureStore_6f8642() {
+  textureStore(arg_0, vec2<u32>(), 1i, vec4<u32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_6f8642();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_6f8642();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_6f8642();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/6f8642.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/6f8642.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..61a68cf
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/6f8642.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2DArray<uint4> arg_0 : register(u0, space1);
+
+void textureStore_6f8642() {
+  arg_0[uint3(0u, 0u, uint(1))] = (0u).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_6f8642();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureStore_6f8642();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_6f8642();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/6f8642.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/6f8642.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..61a68cf
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/6f8642.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2DArray<uint4> arg_0 : register(u0, space1);
+
+void textureStore_6f8642() {
+  arg_0[uint3(0u, 0u, uint(1))] = (0u).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_6f8642();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureStore_6f8642();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_6f8642();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/6f8642.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/6f8642.wgsl.expected.glsl
new file mode 100644
index 0000000..9471f9b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/6f8642.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+layout(rgba32ui) uniform highp writeonly uimage2DArray arg_0;
+void textureStore_6f8642() {
+  imageStore(arg_0, ivec3(uvec3(0u, 0u, uint(1))), uvec4(0u));
+}
+
+vec4 vertex_main() {
+  textureStore_6f8642();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+layout(rgba32ui) uniform highp writeonly uimage2DArray arg_0;
+void textureStore_6f8642() {
+  imageStore(arg_0, ivec3(uvec3(0u, 0u, uint(1))), uvec4(0u));
+}
+
+void fragment_main() {
+  textureStore_6f8642();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+layout(rgba32ui) uniform highp writeonly uimage2DArray arg_0;
+void textureStore_6f8642() {
+  imageStore(arg_0, ivec3(uvec3(0u, 0u, uint(1))), uvec4(0u));
+}
+
+void compute_main() {
+  textureStore_6f8642();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/6f8642.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/6f8642.wgsl.expected.msl
new file mode 100644
index 0000000..233e519
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/6f8642.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_6f8642(texture2d_array<uint, access::write> tint_symbol_1) {
+  tint_symbol_1.write(uint4(0u), uint2(uint2(0u)), 1);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<uint, access::write> tint_symbol_2) {
+  textureStore_6f8642(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<uint, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<uint, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureStore_6f8642(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d_array<uint, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureStore_6f8642(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureStore/6f8642.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/6f8642.wgsl.expected.spvasm
new file mode 100644
index 0000000..2ce57c6
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/6f8642.wgsl.expected.spvasm
@@ -0,0 +1,77 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 41
+; 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 %textureStore_6f8642 "textureStore_6f8642"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 2D 0 1 0 2 Rgba32ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+     %v3uint = OpTypeVector %uint 3
+     %uint_0 = OpConstant %uint 0
+        %int = OpTypeInt 32 1
+      %int_1 = OpConstant %int 1
+     %v4uint = OpTypeVector %uint 4
+         %26 = OpConstantNull %v4uint
+         %27 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureStore_6f8642 = OpFunction %void None %13
+         %16 = OpLabel
+         %18 = OpLoad %11 %arg_0
+         %21 = OpBitcast %uint %int_1
+         %24 = OpCompositeConstruct %v3uint %uint_0 %uint_0 %21
+               OpImageWrite %18 %24 %26
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %27
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %textureStore_6f8642
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %32 = OpLabel
+         %33 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %33
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %textureStore_6f8642
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %39 = OpLabel
+         %40 = OpFunctionCall %void %textureStore_6f8642
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/6f8642.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/6f8642.wgsl.expected.wgsl
new file mode 100644
index 0000000..631e3c1
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/6f8642.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba32uint, write>;
+
+fn textureStore_6f8642() {
+  textureStore(arg_0, vec2<u32>(), 1i, vec4<u32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_6f8642();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_6f8642();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_6f8642();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/72fa64.wgsl b/test/tint/builtins/gen/literal/textureStore/72fa64.wgsl
new file mode 100644
index 0000000..93ebb93
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/72fa64.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rg32sint, write>;
+
+// fn textureStore(texture: texture_storage_2d_array<rg32sint, write>, coords: vec2<u32>, array_index: i32, value: vec4<i32>)
+fn textureStore_72fa64() {
+  textureStore(arg_0, vec2<u32>(), 1i, vec4<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_72fa64();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_72fa64();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_72fa64();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/72fa64.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/72fa64.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..86c2bf4
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/72fa64.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2DArray<int4> arg_0 : register(u0, space1);
+
+void textureStore_72fa64() {
+  arg_0[uint3(0u, 0u, uint(1))] = (0).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_72fa64();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureStore_72fa64();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_72fa64();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/72fa64.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/72fa64.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..86c2bf4
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/72fa64.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2DArray<int4> arg_0 : register(u0, space1);
+
+void textureStore_72fa64() {
+  arg_0[uint3(0u, 0u, uint(1))] = (0).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_72fa64();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureStore_72fa64();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_72fa64();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/72fa64.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/72fa64.wgsl.expected.glsl
new file mode 100644
index 0000000..9b394c8
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/72fa64.wgsl.expected.glsl
@@ -0,0 +1,75 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rg32i) uniform highp writeonly iimage2DArray arg_0;
+void textureStore_72fa64() {
+  imageStore(arg_0, ivec3(uvec3(0u, 0u, uint(1))), ivec4(0));
+}
+
+vec4 vertex_main() {
+  textureStore_72fa64();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+layout(rg32i) uniform highp writeonly iimage2DArray arg_0;
+void textureStore_72fa64() {
+  imageStore(arg_0, ivec3(uvec3(0u, 0u, uint(1))), ivec4(0));
+}
+
+void fragment_main() {
+  textureStore_72fa64();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'image load-store format' : not supported with this profile: es
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rg32i) uniform highp writeonly iimage2DArray arg_0;
+void textureStore_72fa64() {
+  imageStore(arg_0, ivec3(uvec3(0u, 0u, uint(1))), ivec4(0));
+}
+
+void compute_main() {
+  textureStore_72fa64();
+}
+
+layout(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/literal/textureStore/72fa64.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/72fa64.wgsl.expected.msl
new file mode 100644
index 0000000..a9d5d54
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/72fa64.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_72fa64(texture2d_array<int, access::write> tint_symbol_1) {
+  tint_symbol_1.write(int4(0), uint2(uint2(0u)), 1);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<int, access::write> tint_symbol_2) {
+  textureStore_72fa64(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<int, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<int, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureStore_72fa64(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d_array<int, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureStore_72fa64(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureStore/72fa64.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/72fa64.wgsl.expected.spvasm
new file mode 100644
index 0000000..4b421e0
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/72fa64.wgsl.expected.spvasm
@@ -0,0 +1,78 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 41
+; 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 %textureStore_72fa64 "textureStore_72fa64"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 2D 0 1 0 2 Rg32i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v3uint = OpTypeVector %uint 3
+     %uint_0 = OpConstant %uint 0
+      %int_1 = OpConstant %int 1
+      %v4int = OpTypeVector %int 4
+         %26 = OpConstantNull %v4int
+         %27 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureStore_72fa64 = OpFunction %void None %13
+         %16 = OpLabel
+         %18 = OpLoad %11 %arg_0
+         %22 = OpBitcast %uint %int_1
+         %24 = OpCompositeConstruct %v3uint %uint_0 %uint_0 %22
+               OpImageWrite %18 %24 %26
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %27
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %textureStore_72fa64
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %32 = OpLabel
+         %33 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %33
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %textureStore_72fa64
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %39 = OpLabel
+         %40 = OpFunctionCall %void %textureStore_72fa64
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/72fa64.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/72fa64.wgsl.expected.wgsl
new file mode 100644
index 0000000..cb9be28
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/72fa64.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rg32sint, write>;
+
+fn textureStore_72fa64() {
+  textureStore(arg_0, vec2<u32>(), 1i, vec4<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_72fa64();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_72fa64();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_72fa64();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/7bb211.wgsl b/test/tint/builtins/gen/literal/textureStore/7bb211.wgsl
new file mode 100644
index 0000000..dd6f0c7
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/7bb211.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rg32sint, write>;
+
+// fn textureStore(texture: texture_storage_2d_array<rg32sint, write>, coords: vec2<i32>, array_index: u32, value: vec4<i32>)
+fn textureStore_7bb211() {
+  textureStore(arg_0, vec2<i32>(), 1u, vec4<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_7bb211();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_7bb211();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_7bb211();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/7bb211.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/7bb211.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..b1a3e77
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/7bb211.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2DArray<int4> arg_0 : register(u0, space1);
+
+void textureStore_7bb211() {
+  arg_0[int3(0, 0, int(1u))] = (0).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_7bb211();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureStore_7bb211();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_7bb211();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/7bb211.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/7bb211.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..b1a3e77
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/7bb211.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2DArray<int4> arg_0 : register(u0, space1);
+
+void textureStore_7bb211() {
+  arg_0[int3(0, 0, int(1u))] = (0).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_7bb211();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureStore_7bb211();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_7bb211();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/7bb211.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/7bb211.wgsl.expected.glsl
new file mode 100644
index 0000000..12f9790
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/7bb211.wgsl.expected.glsl
@@ -0,0 +1,75 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rg32i) uniform highp writeonly iimage2DArray arg_0;
+void textureStore_7bb211() {
+  imageStore(arg_0, ivec3(0, 0, int(1u)), ivec4(0));
+}
+
+vec4 vertex_main() {
+  textureStore_7bb211();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+layout(rg32i) uniform highp writeonly iimage2DArray arg_0;
+void textureStore_7bb211() {
+  imageStore(arg_0, ivec3(0, 0, int(1u)), ivec4(0));
+}
+
+void fragment_main() {
+  textureStore_7bb211();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'image load-store format' : not supported with this profile: es
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rg32i) uniform highp writeonly iimage2DArray arg_0;
+void textureStore_7bb211() {
+  imageStore(arg_0, ivec3(0, 0, int(1u)), ivec4(0));
+}
+
+void compute_main() {
+  textureStore_7bb211();
+}
+
+layout(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/literal/textureStore/7bb211.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/7bb211.wgsl.expected.msl
new file mode 100644
index 0000000..54eca42
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/7bb211.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_7bb211(texture2d_array<int, access::write> tint_symbol_1) {
+  tint_symbol_1.write(int4(0), uint2(int2(0)), 1u);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<int, access::write> tint_symbol_2) {
+  textureStore_7bb211(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<int, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<int, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureStore_7bb211(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d_array<int, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureStore_7bb211(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureStore/7bb211.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/7bb211.wgsl.expected.spvasm
new file mode 100644
index 0000000..fde30d8
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/7bb211.wgsl.expected.spvasm
@@ -0,0 +1,78 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 41
+; 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 %textureStore_7bb211 "textureStore_7bb211"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 2D 0 1 0 2 Rg32i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+      %v3int = OpTypeVector %int 3
+      %int_0 = OpConstant %int 0
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+      %v4int = OpTypeVector %int 4
+         %26 = OpConstantNull %v4int
+         %27 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureStore_7bb211 = OpFunction %void None %13
+         %16 = OpLabel
+         %18 = OpLoad %11 %arg_0
+         %21 = OpBitcast %int %uint_1
+         %24 = OpCompositeConstruct %v3int %int_0 %int_0 %21
+               OpImageWrite %18 %24 %26
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %27
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %textureStore_7bb211
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %32 = OpLabel
+         %33 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %33
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %textureStore_7bb211
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %39 = OpLabel
+         %40 = OpFunctionCall %void %textureStore_7bb211
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/7bb211.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/7bb211.wgsl.expected.wgsl
new file mode 100644
index 0000000..99a7440
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/7bb211.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rg32sint, write>;
+
+fn textureStore_7bb211() {
+  textureStore(arg_0, vec2<i32>(), 1u, vec4<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_7bb211();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_7bb211();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_7bb211();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/8ff674.wgsl b/test/tint/builtins/gen/literal/textureStore/8ff674.wgsl
new file mode 100644
index 0000000..eca69e7
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/8ff674.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<r32uint, write>;
+
+// fn textureStore(texture: texture_storage_2d_array<r32uint, write>, coords: vec2<i32>, array_index: u32, value: vec4<u32>)
+fn textureStore_8ff674() {
+  textureStore(arg_0, vec2<i32>(), 1u, vec4<u32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_8ff674();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_8ff674();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_8ff674();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/8ff674.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/8ff674.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..478e857
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/8ff674.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2DArray<uint4> arg_0 : register(u0, space1);
+
+void textureStore_8ff674() {
+  arg_0[int3(0, 0, int(1u))] = (0u).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_8ff674();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureStore_8ff674();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_8ff674();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/8ff674.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/8ff674.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..478e857
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/8ff674.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2DArray<uint4> arg_0 : register(u0, space1);
+
+void textureStore_8ff674() {
+  arg_0[int3(0, 0, int(1u))] = (0u).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_8ff674();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureStore_8ff674();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_8ff674();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/8ff674.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/8ff674.wgsl.expected.glsl
new file mode 100644
index 0000000..dc5d86b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/8ff674.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+layout(r32ui) uniform highp writeonly uimage2DArray arg_0;
+void textureStore_8ff674() {
+  imageStore(arg_0, ivec3(0, 0, int(1u)), uvec4(0u));
+}
+
+vec4 vertex_main() {
+  textureStore_8ff674();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+layout(r32ui) uniform highp writeonly uimage2DArray arg_0;
+void textureStore_8ff674() {
+  imageStore(arg_0, ivec3(0, 0, int(1u)), uvec4(0u));
+}
+
+void fragment_main() {
+  textureStore_8ff674();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+layout(r32ui) uniform highp writeonly uimage2DArray arg_0;
+void textureStore_8ff674() {
+  imageStore(arg_0, ivec3(0, 0, int(1u)), uvec4(0u));
+}
+
+void compute_main() {
+  textureStore_8ff674();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/8ff674.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/8ff674.wgsl.expected.msl
new file mode 100644
index 0000000..ae3354e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/8ff674.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_8ff674(texture2d_array<uint, access::write> tint_symbol_1) {
+  tint_symbol_1.write(uint4(0u), uint2(int2(0)), 1u);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<uint, access::write> tint_symbol_2) {
+  textureStore_8ff674(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<uint, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<uint, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureStore_8ff674(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d_array<uint, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureStore_8ff674(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureStore/8ff674.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/8ff674.wgsl.expected.spvasm
new file mode 100644
index 0000000..d97d70a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/8ff674.wgsl.expected.spvasm
@@ -0,0 +1,77 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 41
+; 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 %textureStore_8ff674 "textureStore_8ff674"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 2D 0 1 0 2 R32ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %v3int = OpTypeVector %int 3
+      %int_0 = OpConstant %int 0
+     %uint_1 = OpConstant %uint 1
+     %v4uint = OpTypeVector %uint 4
+         %26 = OpConstantNull %v4uint
+         %27 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureStore_8ff674 = OpFunction %void None %13
+         %16 = OpLabel
+         %18 = OpLoad %11 %arg_0
+         %22 = OpBitcast %int %uint_1
+         %24 = OpCompositeConstruct %v3int %int_0 %int_0 %22
+               OpImageWrite %18 %24 %26
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %27
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %textureStore_8ff674
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %32 = OpLabel
+         %33 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %33
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %textureStore_8ff674
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %39 = OpLabel
+         %40 = OpFunctionCall %void %textureStore_8ff674
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/8ff674.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/8ff674.wgsl.expected.wgsl
new file mode 100644
index 0000000..b313be4
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/8ff674.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<r32uint, write>;
+
+fn textureStore_8ff674() {
+  textureStore(arg_0, vec2<i32>(), 1u, vec4<u32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_8ff674();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_8ff674();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_8ff674();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/9938b7.wgsl b/test/tint/builtins/gen/literal/textureStore/9938b7.wgsl
new file mode 100644
index 0000000..6992b60
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/9938b7.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<r32sint, write>;
+
+// fn textureStore(texture: texture_storage_2d_array<r32sint, write>, coords: vec2<i32>, array_index: u32, value: vec4<i32>)
+fn textureStore_9938b7() {
+  textureStore(arg_0, vec2<i32>(), 1u, vec4<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_9938b7();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_9938b7();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_9938b7();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/9938b7.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/9938b7.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..1a75432
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/9938b7.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2DArray<int4> arg_0 : register(u0, space1);
+
+void textureStore_9938b7() {
+  arg_0[int3(0, 0, int(1u))] = (0).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_9938b7();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureStore_9938b7();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_9938b7();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/9938b7.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/9938b7.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..1a75432
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/9938b7.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2DArray<int4> arg_0 : register(u0, space1);
+
+void textureStore_9938b7() {
+  arg_0[int3(0, 0, int(1u))] = (0).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_9938b7();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureStore_9938b7();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_9938b7();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/9938b7.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/9938b7.wgsl.expected.glsl
new file mode 100644
index 0000000..e448b68
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/9938b7.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+layout(r32i) uniform highp writeonly iimage2DArray arg_0;
+void textureStore_9938b7() {
+  imageStore(arg_0, ivec3(0, 0, int(1u)), ivec4(0));
+}
+
+vec4 vertex_main() {
+  textureStore_9938b7();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+layout(r32i) uniform highp writeonly iimage2DArray arg_0;
+void textureStore_9938b7() {
+  imageStore(arg_0, ivec3(0, 0, int(1u)), ivec4(0));
+}
+
+void fragment_main() {
+  textureStore_9938b7();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+layout(r32i) uniform highp writeonly iimage2DArray arg_0;
+void textureStore_9938b7() {
+  imageStore(arg_0, ivec3(0, 0, int(1u)), ivec4(0));
+}
+
+void compute_main() {
+  textureStore_9938b7();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/9938b7.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/9938b7.wgsl.expected.msl
new file mode 100644
index 0000000..5e76a03
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/9938b7.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_9938b7(texture2d_array<int, access::write> tint_symbol_1) {
+  tint_symbol_1.write(int4(0), uint2(int2(0)), 1u);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<int, access::write> tint_symbol_2) {
+  textureStore_9938b7(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<int, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<int, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureStore_9938b7(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d_array<int, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureStore_9938b7(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureStore/9938b7.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/9938b7.wgsl.expected.spvasm
new file mode 100644
index 0000000..265968a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/9938b7.wgsl.expected.spvasm
@@ -0,0 +1,77 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 41
+; 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 %textureStore_9938b7 "textureStore_9938b7"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 2D 0 1 0 2 R32i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+      %v3int = OpTypeVector %int 3
+      %int_0 = OpConstant %int 0
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+      %v4int = OpTypeVector %int 4
+         %26 = OpConstantNull %v4int
+         %27 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureStore_9938b7 = OpFunction %void None %13
+         %16 = OpLabel
+         %18 = OpLoad %11 %arg_0
+         %21 = OpBitcast %int %uint_1
+         %24 = OpCompositeConstruct %v3int %int_0 %int_0 %21
+               OpImageWrite %18 %24 %26
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %27
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %textureStore_9938b7
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %32 = OpLabel
+         %33 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %33
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %textureStore_9938b7
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %39 = OpLabel
+         %40 = OpFunctionCall %void %textureStore_9938b7
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/9938b7.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/9938b7.wgsl.expected.wgsl
new file mode 100644
index 0000000..ed0775f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/9938b7.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<r32sint, write>;
+
+fn textureStore_9938b7() {
+  textureStore(arg_0, vec2<i32>(), 1u, vec4<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_9938b7();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_9938b7();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_9938b7();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/9d8668.wgsl b/test/tint/builtins/gen/literal/textureStore/9d8668.wgsl
new file mode 100644
index 0000000..805fbf2
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/9d8668.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba8unorm, write>;
+
+// fn textureStore(texture: texture_storage_2d_array<rgba8unorm, write>, coords: vec2<i32>, array_index: u32, value: vec4<f32>)
+fn textureStore_9d8668() {
+  textureStore(arg_0, vec2<i32>(), 1u, vec4<f32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_9d8668();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_9d8668();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_9d8668();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/9d8668.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/9d8668.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..29f00cc
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/9d8668.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2DArray<float4> arg_0 : register(u0, space1);
+
+void textureStore_9d8668() {
+  arg_0[int3(0, 0, int(1u))] = (0.0f).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_9d8668();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureStore_9d8668();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_9d8668();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/9d8668.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/9d8668.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..29f00cc
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/9d8668.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2DArray<float4> arg_0 : register(u0, space1);
+
+void textureStore_9d8668() {
+  arg_0[int3(0, 0, int(1u))] = (0.0f).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_9d8668();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureStore_9d8668();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_9d8668();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/9d8668.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/9d8668.wgsl.expected.glsl
new file mode 100644
index 0000000..bb433ee
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/9d8668.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+layout(rgba8) uniform highp writeonly image2DArray arg_0;
+void textureStore_9d8668() {
+  imageStore(arg_0, ivec3(0, 0, int(1u)), vec4(0.0f));
+}
+
+vec4 vertex_main() {
+  textureStore_9d8668();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+layout(rgba8) uniform highp writeonly image2DArray arg_0;
+void textureStore_9d8668() {
+  imageStore(arg_0, ivec3(0, 0, int(1u)), vec4(0.0f));
+}
+
+void fragment_main() {
+  textureStore_9d8668();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+layout(rgba8) uniform highp writeonly image2DArray arg_0;
+void textureStore_9d8668() {
+  imageStore(arg_0, ivec3(0, 0, int(1u)), vec4(0.0f));
+}
+
+void compute_main() {
+  textureStore_9d8668();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/9d8668.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/9d8668.wgsl.expected.msl
new file mode 100644
index 0000000..83778bb
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/9d8668.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_9d8668(texture2d_array<float, access::write> tint_symbol_1) {
+  tint_symbol_1.write(float4(0.0f), uint2(int2(0)), 1u);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<float, access::write> tint_symbol_2) {
+  textureStore_9d8668(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<float, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<float, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureStore_9d8668(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d_array<float, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureStore_9d8668(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureStore/9d8668.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/9d8668.wgsl.expected.spvasm
new file mode 100644
index 0000000..7c36c49
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/9d8668.wgsl.expected.spvasm
@@ -0,0 +1,75 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 39
+; 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 %textureStore_9d8668 "textureStore_9d8668"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 1 0 2 Rgba8
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %12 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %v3int = OpTypeVector %int 3
+      %int_0 = OpConstant %int 0
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+         %25 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureStore_9d8668 = OpFunction %void None %12
+         %15 = OpLabel
+         %17 = OpLoad %11 %arg_0
+         %21 = OpBitcast %int %uint_1
+         %24 = OpCompositeConstruct %v3int %int_0 %int_0 %21
+               OpImageWrite %17 %24 %5
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %25
+         %27 = OpLabel
+         %28 = OpFunctionCall %void %textureStore_9d8668
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+         %30 = OpLabel
+         %31 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %31
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %textureStore_9d8668
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %12
+         %37 = OpLabel
+         %38 = OpFunctionCall %void %textureStore_9d8668
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/9d8668.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/9d8668.wgsl.expected.wgsl
new file mode 100644
index 0000000..8f30157
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/9d8668.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba8unorm, write>;
+
+fn textureStore_9d8668() {
+  textureStore(arg_0, vec2<i32>(), 1u, vec4<f32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_9d8668();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_9d8668();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_9d8668();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/9f7cea.wgsl b/test/tint/builtins/gen/literal/textureStore/9f7cea.wgsl
new file mode 100644
index 0000000..a100c70
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/9f7cea.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba8uint, write>;
+
+// fn textureStore(texture: texture_storage_2d_array<rgba8uint, write>, coords: vec2<i32>, array_index: u32, value: vec4<u32>)
+fn textureStore_9f7cea() {
+  textureStore(arg_0, vec2<i32>(), 1u, vec4<u32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_9f7cea();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_9f7cea();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_9f7cea();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/9f7cea.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/9f7cea.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..dfb1462
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/9f7cea.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2DArray<uint4> arg_0 : register(u0, space1);
+
+void textureStore_9f7cea() {
+  arg_0[int3(0, 0, int(1u))] = (0u).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_9f7cea();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureStore_9f7cea();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_9f7cea();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/9f7cea.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/9f7cea.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..dfb1462
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/9f7cea.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2DArray<uint4> arg_0 : register(u0, space1);
+
+void textureStore_9f7cea() {
+  arg_0[int3(0, 0, int(1u))] = (0u).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_9f7cea();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureStore_9f7cea();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_9f7cea();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/9f7cea.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/9f7cea.wgsl.expected.glsl
new file mode 100644
index 0000000..4639026
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/9f7cea.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+layout(rgba8ui) uniform highp writeonly uimage2DArray arg_0;
+void textureStore_9f7cea() {
+  imageStore(arg_0, ivec3(0, 0, int(1u)), uvec4(0u));
+}
+
+vec4 vertex_main() {
+  textureStore_9f7cea();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+layout(rgba8ui) uniform highp writeonly uimage2DArray arg_0;
+void textureStore_9f7cea() {
+  imageStore(arg_0, ivec3(0, 0, int(1u)), uvec4(0u));
+}
+
+void fragment_main() {
+  textureStore_9f7cea();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+layout(rgba8ui) uniform highp writeonly uimage2DArray arg_0;
+void textureStore_9f7cea() {
+  imageStore(arg_0, ivec3(0, 0, int(1u)), uvec4(0u));
+}
+
+void compute_main() {
+  textureStore_9f7cea();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/9f7cea.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/9f7cea.wgsl.expected.msl
new file mode 100644
index 0000000..6ebb568
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/9f7cea.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_9f7cea(texture2d_array<uint, access::write> tint_symbol_1) {
+  tint_symbol_1.write(uint4(0u), uint2(int2(0)), 1u);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<uint, access::write> tint_symbol_2) {
+  textureStore_9f7cea(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<uint, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<uint, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureStore_9f7cea(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d_array<uint, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureStore_9f7cea(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureStore/9f7cea.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/9f7cea.wgsl.expected.spvasm
new file mode 100644
index 0000000..09b1bdd
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/9f7cea.wgsl.expected.spvasm
@@ -0,0 +1,77 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 41
+; 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 %textureStore_9f7cea "textureStore_9f7cea"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 2D 0 1 0 2 Rgba8ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %v3int = OpTypeVector %int 3
+      %int_0 = OpConstant %int 0
+     %uint_1 = OpConstant %uint 1
+     %v4uint = OpTypeVector %uint 4
+         %26 = OpConstantNull %v4uint
+         %27 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureStore_9f7cea = OpFunction %void None %13
+         %16 = OpLabel
+         %18 = OpLoad %11 %arg_0
+         %22 = OpBitcast %int %uint_1
+         %24 = OpCompositeConstruct %v3int %int_0 %int_0 %22
+               OpImageWrite %18 %24 %26
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %27
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %textureStore_9f7cea
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %32 = OpLabel
+         %33 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %33
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %textureStore_9f7cea
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %39 = OpLabel
+         %40 = OpFunctionCall %void %textureStore_9f7cea
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/9f7cea.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/9f7cea.wgsl.expected.wgsl
new file mode 100644
index 0000000..2cfc03b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/9f7cea.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba8uint, write>;
+
+fn textureStore_9f7cea() {
+  textureStore(arg_0, vec2<i32>(), 1u, vec4<u32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_9f7cea();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_9f7cea();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_9f7cea();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/a6a986.wgsl b/test/tint/builtins/gen/literal/textureStore/a6a986.wgsl
new file mode 100644
index 0000000..8bbdda2
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/a6a986.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba16float, write>;
+
+// fn textureStore(texture: texture_storage_2d_array<rgba16float, write>, coords: vec2<u32>, array_index: i32, value: vec4<f32>)
+fn textureStore_a6a986() {
+  textureStore(arg_0, vec2<u32>(), 1i, vec4<f32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_a6a986();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_a6a986();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_a6a986();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/a6a986.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/a6a986.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..7129e59
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/a6a986.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2DArray<float4> arg_0 : register(u0, space1);
+
+void textureStore_a6a986() {
+  arg_0[uint3(0u, 0u, uint(1))] = (0.0f).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_a6a986();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureStore_a6a986();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_a6a986();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/a6a986.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/a6a986.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..7129e59
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/a6a986.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2DArray<float4> arg_0 : register(u0, space1);
+
+void textureStore_a6a986() {
+  arg_0[uint3(0u, 0u, uint(1))] = (0.0f).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_a6a986();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureStore_a6a986();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_a6a986();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/a6a986.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/a6a986.wgsl.expected.glsl
new file mode 100644
index 0000000..0d9db4a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/a6a986.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+layout(rgba16f) uniform highp writeonly image2DArray arg_0;
+void textureStore_a6a986() {
+  imageStore(arg_0, ivec3(uvec3(0u, 0u, uint(1))), vec4(0.0f));
+}
+
+vec4 vertex_main() {
+  textureStore_a6a986();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+layout(rgba16f) uniform highp writeonly image2DArray arg_0;
+void textureStore_a6a986() {
+  imageStore(arg_0, ivec3(uvec3(0u, 0u, uint(1))), vec4(0.0f));
+}
+
+void fragment_main() {
+  textureStore_a6a986();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+layout(rgba16f) uniform highp writeonly image2DArray arg_0;
+void textureStore_a6a986() {
+  imageStore(arg_0, ivec3(uvec3(0u, 0u, uint(1))), vec4(0.0f));
+}
+
+void compute_main() {
+  textureStore_a6a986();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/a6a986.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/a6a986.wgsl.expected.msl
new file mode 100644
index 0000000..ecbe6c0
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/a6a986.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_a6a986(texture2d_array<float, access::write> tint_symbol_1) {
+  tint_symbol_1.write(float4(0.0f), uint2(uint2(0u)), 1);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<float, access::write> tint_symbol_2) {
+  textureStore_a6a986(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<float, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<float, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureStore_a6a986(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d_array<float, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureStore_a6a986(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureStore/a6a986.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/a6a986.wgsl.expected.spvasm
new file mode 100644
index 0000000..08a3859
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/a6a986.wgsl.expected.spvasm
@@ -0,0 +1,75 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 39
+; 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 %textureStore_a6a986 "textureStore_a6a986"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 1 0 2 Rgba16f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %12 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v3uint = OpTypeVector %uint 3
+     %uint_0 = OpConstant %uint 0
+        %int = OpTypeInt 32 1
+      %int_1 = OpConstant %int 1
+         %25 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureStore_a6a986 = OpFunction %void None %12
+         %15 = OpLabel
+         %17 = OpLoad %11 %arg_0
+         %21 = OpBitcast %uint %int_1
+         %24 = OpCompositeConstruct %v3uint %uint_0 %uint_0 %21
+               OpImageWrite %17 %24 %5
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %25
+         %27 = OpLabel
+         %28 = OpFunctionCall %void %textureStore_a6a986
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+         %30 = OpLabel
+         %31 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %31
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %textureStore_a6a986
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %12
+         %37 = OpLabel
+         %38 = OpFunctionCall %void %textureStore_a6a986
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/a6a986.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/a6a986.wgsl.expected.wgsl
new file mode 100644
index 0000000..a07b3a2
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/a6a986.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba16float, write>;
+
+fn textureStore_a6a986() {
+  textureStore(arg_0, vec2<u32>(), 1i, vec4<f32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_a6a986();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_a6a986();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_a6a986();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/c32905.wgsl b/test/tint/builtins/gen/literal/textureStore/c32905.wgsl
new file mode 100644
index 0000000..ad57368
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/c32905.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba8sint, write>;
+
+// fn textureStore(texture: texture_storage_2d_array<rgba8sint, write>, coords: vec2<u32>, array_index: i32, value: vec4<i32>)
+fn textureStore_c32905() {
+  textureStore(arg_0, vec2<u32>(), 1i, vec4<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_c32905();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_c32905();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_c32905();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/c32905.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/c32905.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..8bb2be1
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/c32905.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2DArray<int4> arg_0 : register(u0, space1);
+
+void textureStore_c32905() {
+  arg_0[uint3(0u, 0u, uint(1))] = (0).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_c32905();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureStore_c32905();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_c32905();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/c32905.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/c32905.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..8bb2be1
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/c32905.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2DArray<int4> arg_0 : register(u0, space1);
+
+void textureStore_c32905() {
+  arg_0[uint3(0u, 0u, uint(1))] = (0).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_c32905();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureStore_c32905();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_c32905();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/c32905.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/c32905.wgsl.expected.glsl
new file mode 100644
index 0000000..1992aea
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/c32905.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+layout(rgba8i) uniform highp writeonly iimage2DArray arg_0;
+void textureStore_c32905() {
+  imageStore(arg_0, ivec3(uvec3(0u, 0u, uint(1))), ivec4(0));
+}
+
+vec4 vertex_main() {
+  textureStore_c32905();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+layout(rgba8i) uniform highp writeonly iimage2DArray arg_0;
+void textureStore_c32905() {
+  imageStore(arg_0, ivec3(uvec3(0u, 0u, uint(1))), ivec4(0));
+}
+
+void fragment_main() {
+  textureStore_c32905();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+layout(rgba8i) uniform highp writeonly iimage2DArray arg_0;
+void textureStore_c32905() {
+  imageStore(arg_0, ivec3(uvec3(0u, 0u, uint(1))), ivec4(0));
+}
+
+void compute_main() {
+  textureStore_c32905();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/c32905.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/c32905.wgsl.expected.msl
new file mode 100644
index 0000000..5365b9d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/c32905.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_c32905(texture2d_array<int, access::write> tint_symbol_1) {
+  tint_symbol_1.write(int4(0), uint2(uint2(0u)), 1);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<int, access::write> tint_symbol_2) {
+  textureStore_c32905(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<int, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<int, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureStore_c32905(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d_array<int, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureStore_c32905(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureStore/c32905.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/c32905.wgsl.expected.spvasm
new file mode 100644
index 0000000..81e223f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/c32905.wgsl.expected.spvasm
@@ -0,0 +1,77 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 41
+; 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 %textureStore_c32905 "textureStore_c32905"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 2D 0 1 0 2 Rgba8i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v3uint = OpTypeVector %uint 3
+     %uint_0 = OpConstant %uint 0
+      %int_1 = OpConstant %int 1
+      %v4int = OpTypeVector %int 4
+         %26 = OpConstantNull %v4int
+         %27 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureStore_c32905 = OpFunction %void None %13
+         %16 = OpLabel
+         %18 = OpLoad %11 %arg_0
+         %22 = OpBitcast %uint %int_1
+         %24 = OpCompositeConstruct %v3uint %uint_0 %uint_0 %22
+               OpImageWrite %18 %24 %26
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %27
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %textureStore_c32905
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %32 = OpLabel
+         %33 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %33
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %textureStore_c32905
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %39 = OpLabel
+         %40 = OpFunctionCall %void %textureStore_c32905
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/c32905.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/c32905.wgsl.expected.wgsl
new file mode 100644
index 0000000..1f62744
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/c32905.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba8sint, write>;
+
+fn textureStore_c32905() {
+  textureStore(arg_0, vec2<u32>(), 1i, vec4<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_c32905();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_c32905();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_c32905();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/d55e65.wgsl b/test/tint/builtins/gen/literal/textureStore/d55e65.wgsl
new file mode 100644
index 0000000..4477682
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/d55e65.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<r32float, write>;
+
+// fn textureStore(texture: texture_storage_2d_array<r32float, write>, coords: vec2<u32>, array_index: i32, value: vec4<f32>)
+fn textureStore_d55e65() {
+  textureStore(arg_0, vec2<u32>(), 1i, vec4<f32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_d55e65();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_d55e65();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_d55e65();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/d55e65.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/d55e65.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..2da0b0d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/d55e65.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2DArray<float4> arg_0 : register(u0, space1);
+
+void textureStore_d55e65() {
+  arg_0[uint3(0u, 0u, uint(1))] = (0.0f).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_d55e65();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureStore_d55e65();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_d55e65();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/d55e65.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/d55e65.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..2da0b0d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/d55e65.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2DArray<float4> arg_0 : register(u0, space1);
+
+void textureStore_d55e65() {
+  arg_0[uint3(0u, 0u, uint(1))] = (0.0f).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_d55e65();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureStore_d55e65();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_d55e65();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/d55e65.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/d55e65.wgsl.expected.glsl
new file mode 100644
index 0000000..a13f035
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/d55e65.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+layout(r32f) uniform highp writeonly image2DArray arg_0;
+void textureStore_d55e65() {
+  imageStore(arg_0, ivec3(uvec3(0u, 0u, uint(1))), vec4(0.0f));
+}
+
+vec4 vertex_main() {
+  textureStore_d55e65();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+layout(r32f) uniform highp writeonly image2DArray arg_0;
+void textureStore_d55e65() {
+  imageStore(arg_0, ivec3(uvec3(0u, 0u, uint(1))), vec4(0.0f));
+}
+
+void fragment_main() {
+  textureStore_d55e65();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+layout(r32f) uniform highp writeonly image2DArray arg_0;
+void textureStore_d55e65() {
+  imageStore(arg_0, ivec3(uvec3(0u, 0u, uint(1))), vec4(0.0f));
+}
+
+void compute_main() {
+  textureStore_d55e65();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/d55e65.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/d55e65.wgsl.expected.msl
new file mode 100644
index 0000000..2ba46c3
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/d55e65.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_d55e65(texture2d_array<float, access::write> tint_symbol_1) {
+  tint_symbol_1.write(float4(0.0f), uint2(uint2(0u)), 1);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<float, access::write> tint_symbol_2) {
+  textureStore_d55e65(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<float, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<float, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureStore_d55e65(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d_array<float, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureStore_d55e65(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureStore/d55e65.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/d55e65.wgsl.expected.spvasm
new file mode 100644
index 0000000..6a858f4
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/d55e65.wgsl.expected.spvasm
@@ -0,0 +1,75 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 39
+; 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 %textureStore_d55e65 "textureStore_d55e65"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 1 0 2 R32f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %12 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v3uint = OpTypeVector %uint 3
+     %uint_0 = OpConstant %uint 0
+        %int = OpTypeInt 32 1
+      %int_1 = OpConstant %int 1
+         %25 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureStore_d55e65 = OpFunction %void None %12
+         %15 = OpLabel
+         %17 = OpLoad %11 %arg_0
+         %21 = OpBitcast %uint %int_1
+         %24 = OpCompositeConstruct %v3uint %uint_0 %uint_0 %21
+               OpImageWrite %17 %24 %5
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %25
+         %27 = OpLabel
+         %28 = OpFunctionCall %void %textureStore_d55e65
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+         %30 = OpLabel
+         %31 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %31
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %textureStore_d55e65
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %12
+         %37 = OpLabel
+         %38 = OpFunctionCall %void %textureStore_d55e65
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/d55e65.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/d55e65.wgsl.expected.wgsl
new file mode 100644
index 0000000..75e91b5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/d55e65.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<r32float, write>;
+
+fn textureStore_d55e65() {
+  textureStore(arg_0, vec2<u32>(), 1i, vec4<f32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_d55e65();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_d55e65();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_d55e65();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/df2ca4.wgsl b/test/tint/builtins/gen/literal/textureStore/df2ca4.wgsl
new file mode 100644
index 0000000..437f7f2
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/df2ca4.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<r32float, write>;
+
+// fn textureStore(texture: texture_storage_2d_array<r32float, write>, coords: vec2<i32>, array_index: u32, value: vec4<f32>)
+fn textureStore_df2ca4() {
+  textureStore(arg_0, vec2<i32>(), 1u, vec4<f32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_df2ca4();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_df2ca4();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_df2ca4();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/df2ca4.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/df2ca4.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..baf4f2f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/df2ca4.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2DArray<float4> arg_0 : register(u0, space1);
+
+void textureStore_df2ca4() {
+  arg_0[int3(0, 0, int(1u))] = (0.0f).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_df2ca4();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureStore_df2ca4();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_df2ca4();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/df2ca4.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/df2ca4.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..baf4f2f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/df2ca4.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2DArray<float4> arg_0 : register(u0, space1);
+
+void textureStore_df2ca4() {
+  arg_0[int3(0, 0, int(1u))] = (0.0f).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_df2ca4();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureStore_df2ca4();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_df2ca4();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/df2ca4.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/df2ca4.wgsl.expected.glsl
new file mode 100644
index 0000000..eea8131
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/df2ca4.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+layout(r32f) uniform highp writeonly image2DArray arg_0;
+void textureStore_df2ca4() {
+  imageStore(arg_0, ivec3(0, 0, int(1u)), vec4(0.0f));
+}
+
+vec4 vertex_main() {
+  textureStore_df2ca4();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+layout(r32f) uniform highp writeonly image2DArray arg_0;
+void textureStore_df2ca4() {
+  imageStore(arg_0, ivec3(0, 0, int(1u)), vec4(0.0f));
+}
+
+void fragment_main() {
+  textureStore_df2ca4();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+layout(r32f) uniform highp writeonly image2DArray arg_0;
+void textureStore_df2ca4() {
+  imageStore(arg_0, ivec3(0, 0, int(1u)), vec4(0.0f));
+}
+
+void compute_main() {
+  textureStore_df2ca4();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/df2ca4.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/df2ca4.wgsl.expected.msl
new file mode 100644
index 0000000..00b2bb9
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/df2ca4.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_df2ca4(texture2d_array<float, access::write> tint_symbol_1) {
+  tint_symbol_1.write(float4(0.0f), uint2(int2(0)), 1u);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<float, access::write> tint_symbol_2) {
+  textureStore_df2ca4(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<float, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<float, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureStore_df2ca4(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d_array<float, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureStore_df2ca4(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureStore/df2ca4.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/df2ca4.wgsl.expected.spvasm
new file mode 100644
index 0000000..401fcfb
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/df2ca4.wgsl.expected.spvasm
@@ -0,0 +1,75 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 39
+; 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 %textureStore_df2ca4 "textureStore_df2ca4"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 1 0 2 R32f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %12 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %v3int = OpTypeVector %int 3
+      %int_0 = OpConstant %int 0
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+         %25 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureStore_df2ca4 = OpFunction %void None %12
+         %15 = OpLabel
+         %17 = OpLoad %11 %arg_0
+         %21 = OpBitcast %int %uint_1
+         %24 = OpCompositeConstruct %v3int %int_0 %int_0 %21
+               OpImageWrite %17 %24 %5
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %25
+         %27 = OpLabel
+         %28 = OpFunctionCall %void %textureStore_df2ca4
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+         %30 = OpLabel
+         %31 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %31
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %textureStore_df2ca4
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %12
+         %37 = OpLabel
+         %38 = OpFunctionCall %void %textureStore_df2ca4
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/df2ca4.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/df2ca4.wgsl.expected.wgsl
new file mode 100644
index 0000000..a70a6fa
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/df2ca4.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<r32float, write>;
+
+fn textureStore_df2ca4() {
+  textureStore(arg_0, vec2<i32>(), 1u, vec4<f32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_df2ca4();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_df2ca4();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_df2ca4();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/dfa9a1.wgsl b/test/tint/builtins/gen/literal/textureStore/dfa9a1.wgsl
new file mode 100644
index 0000000..5f998f9
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/dfa9a1.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rg32float, write>;
+
+// fn textureStore(texture: texture_storage_2d_array<rg32float, write>, coords: vec2<u32>, array_index: i32, value: vec4<f32>)
+fn textureStore_dfa9a1() {
+  textureStore(arg_0, vec2<u32>(), 1i, vec4<f32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_dfa9a1();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_dfa9a1();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_dfa9a1();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/dfa9a1.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/dfa9a1.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..2e48f79
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/dfa9a1.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2DArray<float4> arg_0 : register(u0, space1);
+
+void textureStore_dfa9a1() {
+  arg_0[uint3(0u, 0u, uint(1))] = (0.0f).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_dfa9a1();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureStore_dfa9a1();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_dfa9a1();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/dfa9a1.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/dfa9a1.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..2e48f79
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/dfa9a1.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2DArray<float4> arg_0 : register(u0, space1);
+
+void textureStore_dfa9a1() {
+  arg_0[uint3(0u, 0u, uint(1))] = (0.0f).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_dfa9a1();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureStore_dfa9a1();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_dfa9a1();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/dfa9a1.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/dfa9a1.wgsl.expected.glsl
new file mode 100644
index 0000000..abd5457
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/dfa9a1.wgsl.expected.glsl
@@ -0,0 +1,75 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rg32f) uniform highp writeonly image2DArray arg_0;
+void textureStore_dfa9a1() {
+  imageStore(arg_0, ivec3(uvec3(0u, 0u, uint(1))), vec4(0.0f));
+}
+
+vec4 vertex_main() {
+  textureStore_dfa9a1();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+layout(rg32f) uniform highp writeonly image2DArray arg_0;
+void textureStore_dfa9a1() {
+  imageStore(arg_0, ivec3(uvec3(0u, 0u, uint(1))), vec4(0.0f));
+}
+
+void fragment_main() {
+  textureStore_dfa9a1();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'image load-store format' : not supported with this profile: es
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rg32f) uniform highp writeonly image2DArray arg_0;
+void textureStore_dfa9a1() {
+  imageStore(arg_0, ivec3(uvec3(0u, 0u, uint(1))), vec4(0.0f));
+}
+
+void compute_main() {
+  textureStore_dfa9a1();
+}
+
+layout(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/literal/textureStore/dfa9a1.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/dfa9a1.wgsl.expected.msl
new file mode 100644
index 0000000..22747d5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/dfa9a1.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_dfa9a1(texture2d_array<float, access::write> tint_symbol_1) {
+  tint_symbol_1.write(float4(0.0f), uint2(uint2(0u)), 1);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<float, access::write> tint_symbol_2) {
+  textureStore_dfa9a1(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<float, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<float, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureStore_dfa9a1(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d_array<float, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureStore_dfa9a1(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureStore/dfa9a1.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/dfa9a1.wgsl.expected.spvasm
new file mode 100644
index 0000000..1ab8b71
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/dfa9a1.wgsl.expected.spvasm
@@ -0,0 +1,76 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 39
+; 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 %textureStore_dfa9a1 "textureStore_dfa9a1"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 1 0 2 Rg32f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %12 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v3uint = OpTypeVector %uint 3
+     %uint_0 = OpConstant %uint 0
+        %int = OpTypeInt 32 1
+      %int_1 = OpConstant %int 1
+         %25 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureStore_dfa9a1 = OpFunction %void None %12
+         %15 = OpLabel
+         %17 = OpLoad %11 %arg_0
+         %21 = OpBitcast %uint %int_1
+         %24 = OpCompositeConstruct %v3uint %uint_0 %uint_0 %21
+               OpImageWrite %17 %24 %5
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %25
+         %27 = OpLabel
+         %28 = OpFunctionCall %void %textureStore_dfa9a1
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+         %30 = OpLabel
+         %31 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %31
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %textureStore_dfa9a1
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %12
+         %37 = OpLabel
+         %38 = OpFunctionCall %void %textureStore_dfa9a1
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/dfa9a1.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/dfa9a1.wgsl.expected.wgsl
new file mode 100644
index 0000000..a930131
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/dfa9a1.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rg32float, write>;
+
+fn textureStore_dfa9a1() {
+  textureStore(arg_0, vec2<u32>(), 1i, vec4<f32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_dfa9a1();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_dfa9a1();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_dfa9a1();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/dffb13.wgsl b/test/tint/builtins/gen/literal/textureStore/dffb13.wgsl
new file mode 100644
index 0000000..9621682
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/dffb13.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rg32uint, write>;
+
+// fn textureStore(texture: texture_storage_2d_array<rg32uint, write>, coords: vec2<i32>, array_index: u32, value: vec4<u32>)
+fn textureStore_dffb13() {
+  textureStore(arg_0, vec2<i32>(), 1u, vec4<u32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_dffb13();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_dffb13();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_dffb13();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/dffb13.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/dffb13.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..84db8e5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/dffb13.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2DArray<uint4> arg_0 : register(u0, space1);
+
+void textureStore_dffb13() {
+  arg_0[int3(0, 0, int(1u))] = (0u).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_dffb13();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureStore_dffb13();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_dffb13();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/dffb13.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/dffb13.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..84db8e5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/dffb13.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2DArray<uint4> arg_0 : register(u0, space1);
+
+void textureStore_dffb13() {
+  arg_0[int3(0, 0, int(1u))] = (0u).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_dffb13();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureStore_dffb13();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_dffb13();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/dffb13.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/dffb13.wgsl.expected.glsl
new file mode 100644
index 0000000..1f48bf2
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/dffb13.wgsl.expected.glsl
@@ -0,0 +1,75 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rg32ui) uniform highp writeonly uimage2DArray arg_0;
+void textureStore_dffb13() {
+  imageStore(arg_0, ivec3(0, 0, int(1u)), uvec4(0u));
+}
+
+vec4 vertex_main() {
+  textureStore_dffb13();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+layout(rg32ui) uniform highp writeonly uimage2DArray arg_0;
+void textureStore_dffb13() {
+  imageStore(arg_0, ivec3(0, 0, int(1u)), uvec4(0u));
+}
+
+void fragment_main() {
+  textureStore_dffb13();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'image load-store format' : not supported with this profile: es
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rg32ui) uniform highp writeonly uimage2DArray arg_0;
+void textureStore_dffb13() {
+  imageStore(arg_0, ivec3(0, 0, int(1u)), uvec4(0u));
+}
+
+void compute_main() {
+  textureStore_dffb13();
+}
+
+layout(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/literal/textureStore/dffb13.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/dffb13.wgsl.expected.msl
new file mode 100644
index 0000000..65218a9
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/dffb13.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_dffb13(texture2d_array<uint, access::write> tint_symbol_1) {
+  tint_symbol_1.write(uint4(0u), uint2(int2(0)), 1u);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<uint, access::write> tint_symbol_2) {
+  textureStore_dffb13(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<uint, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<uint, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureStore_dffb13(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d_array<uint, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureStore_dffb13(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureStore/dffb13.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/dffb13.wgsl.expected.spvasm
new file mode 100644
index 0000000..8df8e48
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/dffb13.wgsl.expected.spvasm
@@ -0,0 +1,78 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 41
+; 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 %textureStore_dffb13 "textureStore_dffb13"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 2D 0 1 0 2 Rg32ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %v3int = OpTypeVector %int 3
+      %int_0 = OpConstant %int 0
+     %uint_1 = OpConstant %uint 1
+     %v4uint = OpTypeVector %uint 4
+         %26 = OpConstantNull %v4uint
+         %27 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureStore_dffb13 = OpFunction %void None %13
+         %16 = OpLabel
+         %18 = OpLoad %11 %arg_0
+         %22 = OpBitcast %int %uint_1
+         %24 = OpCompositeConstruct %v3int %int_0 %int_0 %22
+               OpImageWrite %18 %24 %26
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %27
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %textureStore_dffb13
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %32 = OpLabel
+         %33 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %33
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %textureStore_dffb13
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %39 = OpLabel
+         %40 = OpFunctionCall %void %textureStore_dffb13
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/dffb13.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/dffb13.wgsl.expected.wgsl
new file mode 100644
index 0000000..b7fb947
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/dffb13.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rg32uint, write>;
+
+fn textureStore_dffb13() {
+  textureStore(arg_0, vec2<i32>(), 1u, vec4<u32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_dffb13();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_dffb13();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_dffb13();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/fd350c.wgsl b/test/tint/builtins/gen/literal/textureStore/fd350c.wgsl
new file mode 100644
index 0000000..abcaea1
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/fd350c.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba16uint, write>;
+
+// fn textureStore(texture: texture_storage_2d_array<rgba16uint, write>, coords: vec2<i32>, array_index: u32, value: vec4<u32>)
+fn textureStore_fd350c() {
+  textureStore(arg_0, vec2<i32>(), 1u, vec4<u32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_fd350c();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_fd350c();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_fd350c();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/fd350c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/fd350c.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..30f1481
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/fd350c.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2DArray<uint4> arg_0 : register(u0, space1);
+
+void textureStore_fd350c() {
+  arg_0[int3(0, 0, int(1u))] = (0u).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_fd350c();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureStore_fd350c();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_fd350c();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/fd350c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/fd350c.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..30f1481
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/fd350c.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2DArray<uint4> arg_0 : register(u0, space1);
+
+void textureStore_fd350c() {
+  arg_0[int3(0, 0, int(1u))] = (0u).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_fd350c();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureStore_fd350c();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_fd350c();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/fd350c.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/fd350c.wgsl.expected.glsl
new file mode 100644
index 0000000..1996d04
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/fd350c.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+layout(rgba16ui) uniform highp writeonly uimage2DArray arg_0;
+void textureStore_fd350c() {
+  imageStore(arg_0, ivec3(0, 0, int(1u)), uvec4(0u));
+}
+
+vec4 vertex_main() {
+  textureStore_fd350c();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+layout(rgba16ui) uniform highp writeonly uimage2DArray arg_0;
+void textureStore_fd350c() {
+  imageStore(arg_0, ivec3(0, 0, int(1u)), uvec4(0u));
+}
+
+void fragment_main() {
+  textureStore_fd350c();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+layout(rgba16ui) uniform highp writeonly uimage2DArray arg_0;
+void textureStore_fd350c() {
+  imageStore(arg_0, ivec3(0, 0, int(1u)), uvec4(0u));
+}
+
+void compute_main() {
+  textureStore_fd350c();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/fd350c.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/fd350c.wgsl.expected.msl
new file mode 100644
index 0000000..f77d524
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/fd350c.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_fd350c(texture2d_array<uint, access::write> tint_symbol_1) {
+  tint_symbol_1.write(uint4(0u), uint2(int2(0)), 1u);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<uint, access::write> tint_symbol_2) {
+  textureStore_fd350c(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<uint, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<uint, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureStore_fd350c(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d_array<uint, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureStore_fd350c(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureStore/fd350c.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/fd350c.wgsl.expected.spvasm
new file mode 100644
index 0000000..9c156ab
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/fd350c.wgsl.expected.spvasm
@@ -0,0 +1,77 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 41
+; 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 %textureStore_fd350c "textureStore_fd350c"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 2D 0 1 0 2 Rgba16ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %v3int = OpTypeVector %int 3
+      %int_0 = OpConstant %int 0
+     %uint_1 = OpConstant %uint 1
+     %v4uint = OpTypeVector %uint 4
+         %26 = OpConstantNull %v4uint
+         %27 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureStore_fd350c = OpFunction %void None %13
+         %16 = OpLabel
+         %18 = OpLoad %11 %arg_0
+         %22 = OpBitcast %int %uint_1
+         %24 = OpCompositeConstruct %v3int %int_0 %int_0 %22
+               OpImageWrite %18 %24 %26
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %27
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %textureStore_fd350c
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %32 = OpLabel
+         %33 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %33
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %textureStore_fd350c
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %39 = OpLabel
+         %40 = OpFunctionCall %void %textureStore_fd350c
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/fd350c.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/fd350c.wgsl.expected.wgsl
new file mode 100644
index 0000000..a880810
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/fd350c.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba16uint, write>;
+
+fn textureStore_fd350c() {
+  textureStore(arg_0, vec2<i32>(), 1u, vec4<u32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_fd350c();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_fd350c();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_fd350c();
+}