tint: Allow signed / unsigned texture builtin params

Bug: tint:1526
Change-Id: I301a9ba6e94b162a1ffb436be3e3212b723b7401
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/106682
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
diff --git a/test/tint/builtins/gen/literal/abs/421ca3.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/abs/421ca3.wgsl.expected.fxc.hlsl
index 6ca0d46..3fdeb98 100644
--- a/test/tint/builtins/gen/literal/abs/421ca3.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/abs/421ca3.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
   abs_421ca3();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001D461B57CF0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/abs/538d29.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/abs/538d29.wgsl.expected.fxc.hlsl
index 4d6ca9d..dfb72b0 100644
--- a/test/tint/builtins/gen/literal/abs/538d29.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/abs/538d29.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
   abs_538d29();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001C4B2837D80(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/abs/5ae4fe.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/abs/5ae4fe.wgsl.expected.fxc.hlsl
index 427ca6c..9d84689 100644
--- a/test/tint/builtins/gen/literal/abs/5ae4fe.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/abs/5ae4fe.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
   abs_5ae4fe();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000026FB61B87E0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/abs/fd247f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/abs/fd247f.wgsl.expected.fxc.hlsl
index a341373..cf7d9fd7 100644
--- a/test/tint/builtins/gen/literal/abs/fd247f.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/abs/fd247f.wgsl.expected.fxc.hlsl
@@ -30,7 +30,3 @@
   abs_fd247f();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001C7205F8830(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001C7205F8830(2,13-15): error X3000: unrecognized identifier 'res'
-
diff --git a/test/tint/builtins/gen/literal/acos/004aff.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/acos/004aff.wgsl.expected.fxc.hlsl
index e66364b..33eb215 100644
--- a/test/tint/builtins/gen/literal/acos/004aff.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/acos/004aff.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
   acos_004aff();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001B9F5C6E5B0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/acos/203628.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/acos/203628.wgsl.expected.fxc.hlsl
index 3ee115e..666eb30 100644
--- a/test/tint/builtins/gen/literal/acos/203628.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/acos/203628.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
   acos_203628();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000019D14DE1160(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/acos/303e3d.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/acos/303e3d.wgsl.expected.fxc.hlsl
index fa8c371..6732011 100644
--- a/test/tint/builtins/gen/literal/acos/303e3d.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/acos/303e3d.wgsl.expected.fxc.hlsl
@@ -30,7 +30,3 @@
   acos_303e3d();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000021AE9120540(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000021AE9120540(2,13-15): error X3000: unrecognized identifier 'res'
-
diff --git a/test/tint/builtins/gen/literal/acos/f47057.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/acos/f47057.wgsl.expected.fxc.hlsl
index 38dd9cd..9764843 100644
--- a/test/tint/builtins/gen/literal/acos/f47057.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/acos/f47057.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
   acos_f47057();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000020584057560(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/acosh/5f49d8.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/acosh/5f49d8.wgsl.expected.fxc.hlsl
index 44e42cc..f6820c0 100644
--- a/test/tint/builtins/gen/literal/acosh/5f49d8.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/acosh/5f49d8.wgsl.expected.fxc.hlsl
@@ -34,6 +34,3 @@
   acosh_5f49d8();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001641C7488B0(1,8-16): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/acosh/a37dfe.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/acosh/a37dfe.wgsl.expected.fxc.hlsl
index 89d2293..d79841d 100644
--- a/test/tint/builtins/gen/literal/acosh/a37dfe.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/acosh/a37dfe.wgsl.expected.fxc.hlsl
@@ -34,6 +34,3 @@
   acosh_a37dfe();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000285D7A33130(1,1-9): error X3000: unrecognized identifier 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/acosh/de60d8.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/acosh/de60d8.wgsl.expected.fxc.hlsl
index 3c8ea41..3f75f56 100644
--- a/test/tint/builtins/gen/literal/acosh/de60d8.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/acosh/de60d8.wgsl.expected.fxc.hlsl
@@ -34,6 +34,3 @@
   acosh_de60d8();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000027AF4D645C0(1,8-16): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/acosh/f56574.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/acosh/f56574.wgsl.expected.fxc.hlsl
index a35e840b..942ee0c 100644
--- a/test/tint/builtins/gen/literal/acosh/f56574.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/acosh/f56574.wgsl.expected.fxc.hlsl
@@ -34,6 +34,3 @@
   acosh_f56574();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000221246484D0(1,8-16): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/arrayLength/8421b9.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/arrayLength/8421b9.wgsl.expected.dxc.hlsl
index 48c064b..87e0902 100644
--- a/test/tint/builtins/gen/literal/arrayLength/8421b9.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/literal/arrayLength/8421b9.wgsl.expected.dxc.hlsl
@@ -1,17 +1,17 @@
 SKIP: FAILED
 
-gen/literal/arrayLength/8421b9.wgsl:26:10 error: using f16 types in 'storage' address space is not implemented yet
+builtins/gen/literal/arrayLength/8421b9.wgsl:26:10 error: using f16 types in 'storage' address space is not implemented yet
   arg_0: array<f16>,
          ^^^^^^^^^^
 
-gen/literal/arrayLength/8421b9.wgsl:25:1 note: see layout of struct:
+builtins/gen/literal/arrayLength/8421b9.wgsl:25:1 note: see layout of struct:
 /*           align(2) size(2) */ struct SB_RO {
 /* offset(0) align(2) size(2) */   arg_0 : array<f16>;
 /*                            */ };
 struct SB_RO {
 ^^^^^^
 
-gen/literal/arrayLength/8421b9.wgsl:28:42 note: see declaration of variable
+builtins/gen/literal/arrayLength/8421b9.wgsl:28:42 note: see declaration of variable
 @group(0) @binding(1) var<storage, read> sb_ro : SB_RO;
                                          ^^^^^
 
diff --git a/test/tint/builtins/gen/literal/arrayLength/8421b9.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/arrayLength/8421b9.wgsl.expected.fxc.hlsl
index 48c064b..87e0902 100644
--- a/test/tint/builtins/gen/literal/arrayLength/8421b9.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/arrayLength/8421b9.wgsl.expected.fxc.hlsl
@@ -1,17 +1,17 @@
 SKIP: FAILED
 
-gen/literal/arrayLength/8421b9.wgsl:26:10 error: using f16 types in 'storage' address space is not implemented yet
+builtins/gen/literal/arrayLength/8421b9.wgsl:26:10 error: using f16 types in 'storage' address space is not implemented yet
   arg_0: array<f16>,
          ^^^^^^^^^^
 
-gen/literal/arrayLength/8421b9.wgsl:25:1 note: see layout of struct:
+builtins/gen/literal/arrayLength/8421b9.wgsl:25:1 note: see layout of struct:
 /*           align(2) size(2) */ struct SB_RO {
 /* offset(0) align(2) size(2) */   arg_0 : array<f16>;
 /*                            */ };
 struct SB_RO {
 ^^^^^^
 
-gen/literal/arrayLength/8421b9.wgsl:28:42 note: see declaration of variable
+builtins/gen/literal/arrayLength/8421b9.wgsl:28:42 note: see declaration of variable
 @group(0) @binding(1) var<storage, read> sb_ro : SB_RO;
                                          ^^^^^
 
diff --git a/test/tint/builtins/gen/literal/arrayLength/8421b9.wgsl.expected.msl b/test/tint/builtins/gen/literal/arrayLength/8421b9.wgsl.expected.msl
index 48c064b..87e0902 100644
--- a/test/tint/builtins/gen/literal/arrayLength/8421b9.wgsl.expected.msl
+++ b/test/tint/builtins/gen/literal/arrayLength/8421b9.wgsl.expected.msl
@@ -1,17 +1,17 @@
 SKIP: FAILED
 
-gen/literal/arrayLength/8421b9.wgsl:26:10 error: using f16 types in 'storage' address space is not implemented yet
+builtins/gen/literal/arrayLength/8421b9.wgsl:26:10 error: using f16 types in 'storage' address space is not implemented yet
   arg_0: array<f16>,
          ^^^^^^^^^^
 
-gen/literal/arrayLength/8421b9.wgsl:25:1 note: see layout of struct:
+builtins/gen/literal/arrayLength/8421b9.wgsl:25:1 note: see layout of struct:
 /*           align(2) size(2) */ struct SB_RO {
 /* offset(0) align(2) size(2) */   arg_0 : array<f16>;
 /*                            */ };
 struct SB_RO {
 ^^^^^^
 
-gen/literal/arrayLength/8421b9.wgsl:28:42 note: see declaration of variable
+builtins/gen/literal/arrayLength/8421b9.wgsl:28:42 note: see declaration of variable
 @group(0) @binding(1) var<storage, read> sb_ro : SB_RO;
                                          ^^^^^
 
diff --git a/test/tint/builtins/gen/literal/arrayLength/8421b9.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/arrayLength/8421b9.wgsl.expected.spvasm
index 48c064b..87e0902 100644
--- a/test/tint/builtins/gen/literal/arrayLength/8421b9.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/literal/arrayLength/8421b9.wgsl.expected.spvasm
@@ -1,17 +1,17 @@
 SKIP: FAILED
 
-gen/literal/arrayLength/8421b9.wgsl:26:10 error: using f16 types in 'storage' address space is not implemented yet
+builtins/gen/literal/arrayLength/8421b9.wgsl:26:10 error: using f16 types in 'storage' address space is not implemented yet
   arg_0: array<f16>,
          ^^^^^^^^^^
 
-gen/literal/arrayLength/8421b9.wgsl:25:1 note: see layout of struct:
+builtins/gen/literal/arrayLength/8421b9.wgsl:25:1 note: see layout of struct:
 /*           align(2) size(2) */ struct SB_RO {
 /* offset(0) align(2) size(2) */   arg_0 : array<f16>;
 /*                            */ };
 struct SB_RO {
 ^^^^^^
 
-gen/literal/arrayLength/8421b9.wgsl:28:42 note: see declaration of variable
+builtins/gen/literal/arrayLength/8421b9.wgsl:28:42 note: see declaration of variable
 @group(0) @binding(1) var<storage, read> sb_ro : SB_RO;
                                          ^^^^^
 
diff --git a/test/tint/builtins/gen/literal/arrayLength/8421b9.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/arrayLength/8421b9.wgsl.expected.wgsl
index 48c064b..87e0902 100644
--- a/test/tint/builtins/gen/literal/arrayLength/8421b9.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/literal/arrayLength/8421b9.wgsl.expected.wgsl
@@ -1,17 +1,17 @@
 SKIP: FAILED
 
-gen/literal/arrayLength/8421b9.wgsl:26:10 error: using f16 types in 'storage' address space is not implemented yet
+builtins/gen/literal/arrayLength/8421b9.wgsl:26:10 error: using f16 types in 'storage' address space is not implemented yet
   arg_0: array<f16>,
          ^^^^^^^^^^
 
-gen/literal/arrayLength/8421b9.wgsl:25:1 note: see layout of struct:
+builtins/gen/literal/arrayLength/8421b9.wgsl:25:1 note: see layout of struct:
 /*           align(2) size(2) */ struct SB_RO {
 /* offset(0) align(2) size(2) */   arg_0 : array<f16>;
 /*                            */ };
 struct SB_RO {
 ^^^^^^
 
-gen/literal/arrayLength/8421b9.wgsl:28:42 note: see declaration of variable
+builtins/gen/literal/arrayLength/8421b9.wgsl:28:42 note: see declaration of variable
 @group(0) @binding(1) var<storage, read> sb_ro : SB_RO;
                                          ^^^^^
 
diff --git a/test/tint/builtins/gen/literal/arrayLength/cbd6b5.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/arrayLength/cbd6b5.wgsl.expected.dxc.hlsl
index c1ff94b..7849c68 100644
--- a/test/tint/builtins/gen/literal/arrayLength/cbd6b5.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/literal/arrayLength/cbd6b5.wgsl.expected.dxc.hlsl
@@ -1,17 +1,17 @@
 SKIP: FAILED
 
-gen/literal/arrayLength/cbd6b5.wgsl:26:10 error: using f16 types in 'storage' address space is not implemented yet
+builtins/gen/literal/arrayLength/cbd6b5.wgsl:26:10 error: using f16 types in 'storage' address space is not implemented yet
   arg_0: array<f16>,
          ^^^^^^^^^^
 
-gen/literal/arrayLength/cbd6b5.wgsl:25:1 note: see layout of struct:
+builtins/gen/literal/arrayLength/cbd6b5.wgsl:25:1 note: see layout of struct:
 /*           align(2) size(2) */ struct SB_RW {
 /* offset(0) align(2) size(2) */   arg_0 : array<f16>;
 /*                            */ };
 struct SB_RW {
 ^^^^^^
 
-gen/literal/arrayLength/cbd6b5.wgsl:28:48 note: see declaration of variable
+builtins/gen/literal/arrayLength/cbd6b5.wgsl:28:48 note: see declaration of variable
 @group(0) @binding(0) var<storage, read_write> sb_rw : SB_RW;
                                                ^^^^^
 
diff --git a/test/tint/builtins/gen/literal/arrayLength/cbd6b5.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/arrayLength/cbd6b5.wgsl.expected.fxc.hlsl
index c1ff94b..7849c68 100644
--- a/test/tint/builtins/gen/literal/arrayLength/cbd6b5.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/arrayLength/cbd6b5.wgsl.expected.fxc.hlsl
@@ -1,17 +1,17 @@
 SKIP: FAILED
 
-gen/literal/arrayLength/cbd6b5.wgsl:26:10 error: using f16 types in 'storage' address space is not implemented yet
+builtins/gen/literal/arrayLength/cbd6b5.wgsl:26:10 error: using f16 types in 'storage' address space is not implemented yet
   arg_0: array<f16>,
          ^^^^^^^^^^
 
-gen/literal/arrayLength/cbd6b5.wgsl:25:1 note: see layout of struct:
+builtins/gen/literal/arrayLength/cbd6b5.wgsl:25:1 note: see layout of struct:
 /*           align(2) size(2) */ struct SB_RW {
 /* offset(0) align(2) size(2) */   arg_0 : array<f16>;
 /*                            */ };
 struct SB_RW {
 ^^^^^^
 
-gen/literal/arrayLength/cbd6b5.wgsl:28:48 note: see declaration of variable
+builtins/gen/literal/arrayLength/cbd6b5.wgsl:28:48 note: see declaration of variable
 @group(0) @binding(0) var<storage, read_write> sb_rw : SB_RW;
                                                ^^^^^
 
diff --git a/test/tint/builtins/gen/literal/arrayLength/cbd6b5.wgsl.expected.msl b/test/tint/builtins/gen/literal/arrayLength/cbd6b5.wgsl.expected.msl
index c1ff94b..7849c68 100644
--- a/test/tint/builtins/gen/literal/arrayLength/cbd6b5.wgsl.expected.msl
+++ b/test/tint/builtins/gen/literal/arrayLength/cbd6b5.wgsl.expected.msl
@@ -1,17 +1,17 @@
 SKIP: FAILED
 
-gen/literal/arrayLength/cbd6b5.wgsl:26:10 error: using f16 types in 'storage' address space is not implemented yet
+builtins/gen/literal/arrayLength/cbd6b5.wgsl:26:10 error: using f16 types in 'storage' address space is not implemented yet
   arg_0: array<f16>,
          ^^^^^^^^^^
 
-gen/literal/arrayLength/cbd6b5.wgsl:25:1 note: see layout of struct:
+builtins/gen/literal/arrayLength/cbd6b5.wgsl:25:1 note: see layout of struct:
 /*           align(2) size(2) */ struct SB_RW {
 /* offset(0) align(2) size(2) */   arg_0 : array<f16>;
 /*                            */ };
 struct SB_RW {
 ^^^^^^
 
-gen/literal/arrayLength/cbd6b5.wgsl:28:48 note: see declaration of variable
+builtins/gen/literal/arrayLength/cbd6b5.wgsl:28:48 note: see declaration of variable
 @group(0) @binding(0) var<storage, read_write> sb_rw : SB_RW;
                                                ^^^^^
 
diff --git a/test/tint/builtins/gen/literal/arrayLength/cbd6b5.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/arrayLength/cbd6b5.wgsl.expected.spvasm
index c1ff94b..7849c68 100644
--- a/test/tint/builtins/gen/literal/arrayLength/cbd6b5.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/literal/arrayLength/cbd6b5.wgsl.expected.spvasm
@@ -1,17 +1,17 @@
 SKIP: FAILED
 
-gen/literal/arrayLength/cbd6b5.wgsl:26:10 error: using f16 types in 'storage' address space is not implemented yet
+builtins/gen/literal/arrayLength/cbd6b5.wgsl:26:10 error: using f16 types in 'storage' address space is not implemented yet
   arg_0: array<f16>,
          ^^^^^^^^^^
 
-gen/literal/arrayLength/cbd6b5.wgsl:25:1 note: see layout of struct:
+builtins/gen/literal/arrayLength/cbd6b5.wgsl:25:1 note: see layout of struct:
 /*           align(2) size(2) */ struct SB_RW {
 /* offset(0) align(2) size(2) */   arg_0 : array<f16>;
 /*                            */ };
 struct SB_RW {
 ^^^^^^
 
-gen/literal/arrayLength/cbd6b5.wgsl:28:48 note: see declaration of variable
+builtins/gen/literal/arrayLength/cbd6b5.wgsl:28:48 note: see declaration of variable
 @group(0) @binding(0) var<storage, read_write> sb_rw : SB_RW;
                                                ^^^^^
 
diff --git a/test/tint/builtins/gen/literal/arrayLength/cbd6b5.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/arrayLength/cbd6b5.wgsl.expected.wgsl
index c1ff94b..7849c68 100644
--- a/test/tint/builtins/gen/literal/arrayLength/cbd6b5.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/literal/arrayLength/cbd6b5.wgsl.expected.wgsl
@@ -1,17 +1,17 @@
 SKIP: FAILED
 
-gen/literal/arrayLength/cbd6b5.wgsl:26:10 error: using f16 types in 'storage' address space is not implemented yet
+builtins/gen/literal/arrayLength/cbd6b5.wgsl:26:10 error: using f16 types in 'storage' address space is not implemented yet
   arg_0: array<f16>,
          ^^^^^^^^^^
 
-gen/literal/arrayLength/cbd6b5.wgsl:25:1 note: see layout of struct:
+builtins/gen/literal/arrayLength/cbd6b5.wgsl:25:1 note: see layout of struct:
 /*           align(2) size(2) */ struct SB_RW {
 /* offset(0) align(2) size(2) */   arg_0 : array<f16>;
 /*                            */ };
 struct SB_RW {
 ^^^^^^
 
-gen/literal/arrayLength/cbd6b5.wgsl:28:48 note: see declaration of variable
+builtins/gen/literal/arrayLength/cbd6b5.wgsl:28:48 note: see declaration of variable
 @group(0) @binding(0) var<storage, read_write> sb_rw : SB_RW;
                                                ^^^^^
 
diff --git a/test/tint/builtins/gen/literal/asin/11dfda.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/asin/11dfda.wgsl.expected.fxc.hlsl
index e6aa1fc..1b785a0 100644
--- a/test/tint/builtins/gen/literal/asin/11dfda.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/asin/11dfda.wgsl.expected.fxc.hlsl
@@ -30,7 +30,3 @@
   asin_11dfda();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001FA9E277D20(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001FA9E277D20(2,13-15): error X3000: unrecognized identifier 'res'
-
diff --git a/test/tint/builtins/gen/literal/asin/2d8e29.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/asin/2d8e29.wgsl.expected.fxc.hlsl
index 3078022..54b7621 100644
--- a/test/tint/builtins/gen/literal/asin/2d8e29.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/asin/2d8e29.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
   asin_2d8e29();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000140BC7EE140(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/asin/3cfbd4.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/asin/3cfbd4.wgsl.expected.fxc.hlsl
index 4d868fa..4233376 100644
--- a/test/tint/builtins/gen/literal/asin/3cfbd4.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/asin/3cfbd4.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
   asin_3cfbd4();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000022B4BDC88B0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/asin/b4aced.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/asin/b4aced.wgsl.expected.fxc.hlsl
index c17039a..516f6a3 100644
--- a/test/tint/builtins/gen/literal/asin/b4aced.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/asin/b4aced.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
   asin_b4aced();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000138E6B7E9E0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/asinh/468a48.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/asinh/468a48.wgsl.expected.fxc.hlsl
index c76be3c..3bd5cb4 100644
--- a/test/tint/builtins/gen/literal/asinh/468a48.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/asinh/468a48.wgsl.expected.fxc.hlsl
@@ -34,6 +34,3 @@
   asinh_468a48();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000024C0A8E8450(1,1-9): error X3000: unrecognized identifier 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/asinh/95ab2b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/asinh/95ab2b.wgsl.expected.fxc.hlsl
index d5bda99..bf86437 100644
--- a/test/tint/builtins/gen/literal/asinh/95ab2b.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/asinh/95ab2b.wgsl.expected.fxc.hlsl
@@ -34,6 +34,3 @@
   asinh_95ab2b();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000017880279490(1,8-16): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/asinh/ad8f8b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/asinh/ad8f8b.wgsl.expected.fxc.hlsl
index d46056e..2969a86 100644
--- a/test/tint/builtins/gen/literal/asinh/ad8f8b.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/asinh/ad8f8b.wgsl.expected.fxc.hlsl
@@ -34,6 +34,3 @@
   asinh_ad8f8b();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002AC790D84D0(1,8-16): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/asinh/fb5e8c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/asinh/fb5e8c.wgsl.expected.fxc.hlsl
index d67e924..0019998 100644
--- a/test/tint/builtins/gen/literal/asinh/fb5e8c.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/asinh/fb5e8c.wgsl.expected.fxc.hlsl
@@ -34,6 +34,3 @@
   asinh_fb5e8c();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001E444F93560(1,8-16): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/atan/19faea.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/atan/19faea.wgsl.expected.fxc.hlsl
index 32fb21e..8c47b24 100644
--- a/test/tint/builtins/gen/literal/atan/19faea.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/atan/19faea.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
   atan_19faea();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002329F308C50(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/atan/1e1764.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/atan/1e1764.wgsl.expected.fxc.hlsl
index 98c9ee9..76a8d82 100644
--- a/test/tint/builtins/gen/literal/atan/1e1764.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/atan/1e1764.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
   atan_1e1764();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001C856E61160(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/atan/a5f421.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/atan/a5f421.wgsl.expected.fxc.hlsl
index 338d894..85ede7d 100644
--- a/test/tint/builtins/gen/literal/atan/a5f421.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/atan/a5f421.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
   atan_a5f421();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000186B9618C70(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/atan/a7ba61.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/atan/a7ba61.wgsl.expected.fxc.hlsl
index e5a9a51..9e851e8 100644
--- a/test/tint/builtins/gen/literal/atan/a7ba61.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/atan/a7ba61.wgsl.expected.fxc.hlsl
@@ -30,7 +30,3 @@
   atan_a7ba61();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000211ADB21160(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000211ADB21160(2,13-15): error X3000: unrecognized identifier 'res'
-
diff --git a/test/tint/builtins/gen/literal/atan2/21dfea.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/atan2/21dfea.wgsl.expected.fxc.hlsl
index 3c389fb..e945dce 100644
--- a/test/tint/builtins/gen/literal/atan2/21dfea.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/atan2/21dfea.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
   atan2_21dfea();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000020C31CCD060(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/atan2/93febc.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/atan2/93febc.wgsl.expected.fxc.hlsl
index 251cb38..a28508d 100644
--- a/test/tint/builtins/gen/literal/atan2/93febc.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/atan2/93febc.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
   atan2_93febc();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000029435E06D30(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/atan2/ca698e.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/atan2/ca698e.wgsl.expected.fxc.hlsl
index c13f773..9eaf692 100644
--- a/test/tint/builtins/gen/literal/atan2/ca698e.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/atan2/ca698e.wgsl.expected.fxc.hlsl
@@ -30,7 +30,3 @@
   atan2_ca698e();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000221D39B1200(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000221D39B1200(2,13-15): error X3000: unrecognized identifier 'res'
-
diff --git a/test/tint/builtins/gen/literal/atan2/d983ab.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/atan2/d983ab.wgsl.expected.fxc.hlsl
index c24da1d..fc6677f 100644
--- a/test/tint/builtins/gen/literal/atan2/d983ab.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/atan2/d983ab.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
   atan2_d983ab();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000259F9C66DF0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/atanh/5bf88d.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/atanh/5bf88d.wgsl.expected.fxc.hlsl
index 73c6586..c836a42 100644
--- a/test/tint/builtins/gen/literal/atanh/5bf88d.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/atanh/5bf88d.wgsl.expected.fxc.hlsl
@@ -34,6 +34,3 @@
   atanh_5bf88d();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001F6B2FD2F70(1,8-16): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/atanh/d2d8cd.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/atanh/d2d8cd.wgsl.expected.fxc.hlsl
index f0a2f1e..673c1a8 100644
--- a/test/tint/builtins/gen/literal/atanh/d2d8cd.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/atanh/d2d8cd.wgsl.expected.fxc.hlsl
@@ -34,6 +34,3 @@
   atanh_d2d8cd();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001760B391820(1,1-9): error X3000: unrecognized identifier 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/atanh/e3b450.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/atanh/e3b450.wgsl.expected.fxc.hlsl
index 96b829b..8ac8233 100644
--- a/test/tint/builtins/gen/literal/atanh/e3b450.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/atanh/e3b450.wgsl.expected.fxc.hlsl
@@ -34,6 +34,3 @@
   atanh_e3b450();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000176443384D0(1,8-16): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/atanh/ec4b06.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/atanh/ec4b06.wgsl.expected.fxc.hlsl
index 46881a0..73c7d6e 100644
--- a/test/tint/builtins/gen/literal/atanh/ec4b06.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/atanh/ec4b06.wgsl.expected.fxc.hlsl
@@ -34,6 +34,3 @@
   atanh_ec4b06();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001899EE63220(1,8-16): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/ceil/09bf52.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/ceil/09bf52.wgsl.expected.fxc.hlsl
index 21a195e..740b9fb 100644
--- a/test/tint/builtins/gen/literal/ceil/09bf52.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/ceil/09bf52.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
   ceil_09bf52();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000013DAD2D1160(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/ceil/18c240.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/ceil/18c240.wgsl.expected.fxc.hlsl
index 59bf2e8..1435d96 100644
--- a/test/tint/builtins/gen/literal/ceil/18c240.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/ceil/18c240.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
   ceil_18c240();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000024369541160(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/ceil/4bca2a.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/ceil/4bca2a.wgsl.expected.fxc.hlsl
index 9b9adc4..3ff7ba1 100644
--- a/test/tint/builtins/gen/literal/ceil/4bca2a.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/ceil/4bca2a.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
   ceil_4bca2a();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000016D987AB790(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/ceil/f3f889.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/ceil/f3f889.wgsl.expected.fxc.hlsl
index b743e2f..c53464e 100644
--- a/test/tint/builtins/gen/literal/ceil/f3f889.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/ceil/f3f889.wgsl.expected.fxc.hlsl
@@ -30,7 +30,3 @@
   ceil_f3f889();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000190A1B47CF0(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000190A1B47CF0(2,13-15): error X3000: unrecognized identifier 'res'
-
diff --git a/test/tint/builtins/gen/literal/clamp/235b29.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/clamp/235b29.wgsl.expected.fxc.hlsl
index d8e4382..77968a9 100644
--- a/test/tint/builtins/gen/literal/clamp/235b29.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/clamp/235b29.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
   clamp_235b29();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000017FE0738160(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/clamp/2c251b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/clamp/2c251b.wgsl.expected.fxc.hlsl
index 20423bb..3841415 100644
--- a/test/tint/builtins/gen/literal/clamp/2c251b.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/clamp/2c251b.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
   clamp_2c251b();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000225C8376D90(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/clamp/553ffb.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/clamp/553ffb.wgsl.expected.fxc.hlsl
index b397e5f..92bfc65 100644
--- a/test/tint/builtins/gen/literal/clamp/553ffb.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/clamp/553ffb.wgsl.expected.fxc.hlsl
@@ -30,7 +30,3 @@
   clamp_553ffb();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002581C620540(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002581C620540(2,13-15): error X3000: unrecognized identifier 'res'
-
diff --git a/test/tint/builtins/gen/literal/clamp/b195eb.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/clamp/b195eb.wgsl.expected.fxc.hlsl
index 823e2b2..71ab78a 100644
--- a/test/tint/builtins/gen/literal/clamp/b195eb.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/clamp/b195eb.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
   clamp_b195eb();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001F44BFDB000(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/cos/0835a8.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/cos/0835a8.wgsl.expected.fxc.hlsl
index 966a5e3..d5157ff 100644
--- a/test/tint/builtins/gen/literal/cos/0835a8.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/cos/0835a8.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
   cos_0835a8();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000012E9639AC20(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/cos/0a89f7.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/cos/0a89f7.wgsl.expected.fxc.hlsl
index 8326494..df2ecbf 100644
--- a/test/tint/builtins/gen/literal/cos/0a89f7.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/cos/0a89f7.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
   cos_0a89f7();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000016E7F3887E0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/cos/5bc2c6.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/cos/5bc2c6.wgsl.expected.fxc.hlsl
index f3677ee..50de922 100644
--- a/test/tint/builtins/gen/literal/cos/5bc2c6.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/cos/5bc2c6.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
   cos_5bc2c6();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000024E8E5A87E0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/cos/fc047d.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/cos/fc047d.wgsl.expected.fxc.hlsl
index e33a4d6..26cef80 100644
--- a/test/tint/builtins/gen/literal/cos/fc047d.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/cos/fc047d.wgsl.expected.fxc.hlsl
@@ -30,7 +30,3 @@
   cos_fc047d();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000015329BF7D10(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000015329BF7D10(2,13-15): error X3000: unrecognized identifier 'res'
-
diff --git a/test/tint/builtins/gen/literal/cosh/2ed778.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/cosh/2ed778.wgsl.expected.fxc.hlsl
index 423dd17..d771cfa 100644
--- a/test/tint/builtins/gen/literal/cosh/2ed778.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/cosh/2ed778.wgsl.expected.fxc.hlsl
@@ -30,7 +30,3 @@
   cosh_2ed778();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000021F3BD88850(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000021F3BD88850(2,13-15): error X3000: unrecognized identifier 'res'
-
diff --git a/test/tint/builtins/gen/literal/cosh/3b7bbf.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/cosh/3b7bbf.wgsl.expected.fxc.hlsl
index 2e19b88..e532d68 100644
--- a/test/tint/builtins/gen/literal/cosh/3b7bbf.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/cosh/3b7bbf.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
   cosh_3b7bbf();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000020A6F400DB0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/cosh/43b672.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/cosh/43b672.wgsl.expected.fxc.hlsl
index b1f7f46..30c509a 100644
--- a/test/tint/builtins/gen/literal/cosh/43b672.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/cosh/43b672.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
   cosh_43b672();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002ACB9EB1160(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/cosh/b1b8a0.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/cosh/b1b8a0.wgsl.expected.fxc.hlsl
index f6e2ac1..003dd06 100644
--- a/test/tint/builtins/gen/literal/cosh/b1b8a0.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/cosh/b1b8a0.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
   cosh_b1b8a0();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001D169B6EAF0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/cross/9857cb.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/cross/9857cb.wgsl.expected.fxc.hlsl
index f6d21a3..8dd8e41 100644
--- a/test/tint/builtins/gen/literal/cross/9857cb.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/cross/9857cb.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
   cross_9857cb();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001ABE1B9A830(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/degrees/3055d3.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/degrees/3055d3.wgsl.expected.fxc.hlsl
index 825ef73..f7ea54a 100644
--- a/test/tint/builtins/gen/literal/degrees/3055d3.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/degrees/3055d3.wgsl.expected.fxc.hlsl
@@ -34,6 +34,3 @@
   degrees_3055d3();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000020615990520(1,8-16): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/degrees/5e9805.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/degrees/5e9805.wgsl.expected.fxc.hlsl
index 7647535..b871168 100644
--- a/test/tint/builtins/gen/literal/degrees/5e9805.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/degrees/5e9805.wgsl.expected.fxc.hlsl
@@ -34,6 +34,3 @@
   degrees_5e9805();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000021D8DD40440(1,1-9): error X3000: unrecognized identifier 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/degrees/dfe8f4.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/degrees/dfe8f4.wgsl.expected.fxc.hlsl
index 2e49c90..6d77c30 100644
--- a/test/tint/builtins/gen/literal/degrees/dfe8f4.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/degrees/dfe8f4.wgsl.expected.fxc.hlsl
@@ -34,6 +34,3 @@
   degrees_dfe8f4();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001BA47346FD0(1,8-16): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/degrees/f59715.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/degrees/f59715.wgsl.expected.fxc.hlsl
index 5ada312..c6c9876 100644
--- a/test/tint/builtins/gen/literal/degrees/f59715.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/degrees/f59715.wgsl.expected.fxc.hlsl
@@ -34,6 +34,3 @@
   degrees_f59715();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000025AB33F0650(1,8-16): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/determinant/32bfde.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/determinant/32bfde.wgsl.expected.fxc.hlsl
index 919bf99..461b82a 100644
--- a/test/tint/builtins/gen/literal/determinant/32bfde.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/determinant/32bfde.wgsl.expected.fxc.hlsl
@@ -30,7 +30,3 @@
   determinant_32bfde();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000028760CE9820(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000028760CE9820(2,13-15): error X3000: unrecognized identifier 'res'
-
diff --git a/test/tint/builtins/gen/literal/determinant/d7c86f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/determinant/d7c86f.wgsl.expected.fxc.hlsl
index 0b82260..e64298d 100644
--- a/test/tint/builtins/gen/literal/determinant/d7c86f.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/determinant/d7c86f.wgsl.expected.fxc.hlsl
@@ -30,7 +30,3 @@
   determinant_d7c86f();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000017F01F7E050(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000017F01F7E050(2,13-15): error X3000: unrecognized identifier 'res'
-
diff --git a/test/tint/builtins/gen/literal/determinant/fc12a5.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/determinant/fc12a5.wgsl.expected.fxc.hlsl
index 0c7ad5c..23274eb 100644
--- a/test/tint/builtins/gen/literal/determinant/fc12a5.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/determinant/fc12a5.wgsl.expected.fxc.hlsl
@@ -30,7 +30,3 @@
   determinant_fc12a5();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002949F67AAF0(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002949F67AAF0(2,13-15): error X3000: unrecognized identifier 'res'
-
diff --git a/test/tint/builtins/gen/literal/distance/7272f3.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/distance/7272f3.wgsl.expected.fxc.hlsl
index 66ce4f3..ff8a9f0 100644
--- a/test/tint/builtins/gen/literal/distance/7272f3.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/distance/7272f3.wgsl.expected.fxc.hlsl
@@ -30,7 +30,3 @@
   distance_7272f3();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002AF01F7D600(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002AF01F7D600(2,13-15): error X3000: unrecognized identifier 'res'
-
diff --git a/test/tint/builtins/gen/literal/distance/7d201f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/distance/7d201f.wgsl.expected.fxc.hlsl
index 653ef2c..271dd40 100644
--- a/test/tint/builtins/gen/literal/distance/7d201f.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/distance/7d201f.wgsl.expected.fxc.hlsl
@@ -30,7 +30,3 @@
   distance_7d201f();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001D5BC336FD0(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001D5BC336FD0(2,13-15): error X3000: unrecognized identifier 'res'
-
diff --git a/test/tint/builtins/gen/literal/distance/892a5d.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/distance/892a5d.wgsl.expected.fxc.hlsl
index 198576c..bb842fc 100644
--- a/test/tint/builtins/gen/literal/distance/892a5d.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/distance/892a5d.wgsl.expected.fxc.hlsl
@@ -30,7 +30,3 @@
   distance_892a5d();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000026F67541620(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000026F67541620(2,13-15): error X3000: unrecognized identifier 'res'
-
diff --git a/test/tint/builtins/gen/literal/distance/928fa0.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/distance/928fa0.wgsl.expected.fxc.hlsl
index cd6b130..8546756 100644
--- a/test/tint/builtins/gen/literal/distance/928fa0.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/distance/928fa0.wgsl.expected.fxc.hlsl
@@ -30,7 +30,3 @@
   distance_928fa0();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001ECED3C83A0(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001ECED3C83A0(2,13-15): error X3000: unrecognized identifier 'res'
-
diff --git a/test/tint/builtins/gen/literal/dot/8e40f1.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/dot/8e40f1.wgsl.expected.fxc.hlsl
index c6a02e9..0d34f0f 100644
--- a/test/tint/builtins/gen/literal/dot/8e40f1.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/dot/8e40f1.wgsl.expected.fxc.hlsl
@@ -30,7 +30,3 @@
   dot_8e40f1();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001E9C49996F0(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001E9C49996F0(2,13-15): error X3000: unrecognized identifier 'res'
-
diff --git a/test/tint/builtins/gen/literal/dot/cd5a04.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/dot/cd5a04.wgsl.expected.fxc.hlsl
index d48d74e..9c84d25 100644
--- a/test/tint/builtins/gen/literal/dot/cd5a04.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/dot/cd5a04.wgsl.expected.fxc.hlsl
@@ -30,7 +30,3 @@
   dot_cd5a04();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001B52BF97850(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001B52BF97850(2,13-15): error X3000: unrecognized identifier 'res'
-
diff --git a/test/tint/builtins/gen/literal/dot/d0d179.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/dot/d0d179.wgsl.expected.fxc.hlsl
index 7c95a5e..e903bf7 100644
--- a/test/tint/builtins/gen/literal/dot/d0d179.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/dot/d0d179.wgsl.expected.fxc.hlsl
@@ -30,7 +30,3 @@
   dot_d0d179();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001E77FD80D40(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001E77FD80D40(2,13-15): error X3000: unrecognized identifier 'res'
-
diff --git a/test/tint/builtins/gen/literal/dot4I8Packed/881e62.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/dot4I8Packed/881e62.wgsl.expected.fxc.hlsl
index 8ccdb8d..5692ea0 100644
--- a/test/tint/builtins/gen/literal/dot4I8Packed/881e62.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/dot4I8Packed/881e62.wgsl.expected.fxc.hlsl
@@ -35,6 +35,3 @@
   dot4I8Packed_881e62();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000239A33210B0(3,10-56): error X3004: undeclared identifier 'dot4add_i8packed'
-
diff --git a/test/tint/builtins/gen/literal/dot4I8Packed/881e62.wgsl.expected.msl b/test/tint/builtins/gen/literal/dot4I8Packed/881e62.wgsl.expected.msl
index e88d385..82bb3cb 100644
--- a/test/tint/builtins/gen/literal/dot4I8Packed/881e62.wgsl.expected.msl
+++ b/test/tint/builtins/gen/literal/dot4I8Packed/881e62.wgsl.expected.msl
@@ -23,4 +23,7 @@
   dot4I8Packed_881e62();
 }
 
-Failed to generate: error: Unknown import method: dot4I8Packed
+Failed to generate: builtins/gen/literal/dot4I8Packed/881e62.wgsl:24:8 error: MSL backend does not support extension 'chromium_experimental_dp4a'
+enable chromium_experimental_dp4a;
+       ^^^^^^^^^^^^^^^^^^^^^^^^^^
+
diff --git a/test/tint/builtins/gen/literal/dot4U8Packed/fbed7b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/dot4U8Packed/fbed7b.wgsl.expected.fxc.hlsl
index e84c3da..c371939 100644
--- a/test/tint/builtins/gen/literal/dot4U8Packed/fbed7b.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/dot4U8Packed/fbed7b.wgsl.expected.fxc.hlsl
@@ -35,6 +35,3 @@
   dot4U8Packed_fbed7b();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001D2469D6CD0(3,10-56): error X3004: undeclared identifier 'dot4add_u8packed'
-
diff --git a/test/tint/builtins/gen/literal/dot4U8Packed/fbed7b.wgsl.expected.msl b/test/tint/builtins/gen/literal/dot4U8Packed/fbed7b.wgsl.expected.msl
index 10a682f..e1bd1eb 100644
--- a/test/tint/builtins/gen/literal/dot4U8Packed/fbed7b.wgsl.expected.msl
+++ b/test/tint/builtins/gen/literal/dot4U8Packed/fbed7b.wgsl.expected.msl
@@ -23,4 +23,7 @@
   dot4U8Packed_fbed7b();
 }
 
-Failed to generate: error: Unknown import method: dot4U8Packed
+Failed to generate: builtins/gen/literal/dot4U8Packed/fbed7b.wgsl:24:8 error: MSL backend does not support extension 'chromium_experimental_dp4a'
+enable chromium_experimental_dp4a;
+       ^^^^^^^^^^^^^^^^^^^^^^^^^^
+
diff --git a/test/tint/builtins/gen/literal/exp/13806d.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/exp/13806d.wgsl.expected.fxc.hlsl
index 5442169..45f4937 100644
--- a/test/tint/builtins/gen/literal/exp/13806d.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/exp/13806d.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
   exp_13806d();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001F8343687E0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/exp/2e08e2.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/exp/2e08e2.wgsl.expected.fxc.hlsl
index 408ebd5..203f106 100644
--- a/test/tint/builtins/gen/literal/exp/2e08e2.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/exp/2e08e2.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
   exp_2e08e2();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001E5CBC9ECC0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/exp/611a87.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/exp/611a87.wgsl.expected.fxc.hlsl
index 0c0949d..b3acd29 100644
--- a/test/tint/builtins/gen/literal/exp/611a87.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/exp/611a87.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
   exp_611a87();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001865DDB0AC0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/exp/c18fe9.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/exp/c18fe9.wgsl.expected.fxc.hlsl
index 58c5737..782a329 100644
--- a/test/tint/builtins/gen/literal/exp/c18fe9.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/exp/c18fe9.wgsl.expected.fxc.hlsl
@@ -30,7 +30,3 @@
   exp_c18fe9();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000189289FB7F0(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000189289FB7F0(2,13-15): error X3000: unrecognized identifier 'res'
-
diff --git a/test/tint/builtins/gen/literal/exp2/151a4c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/exp2/151a4c.wgsl.expected.fxc.hlsl
index 88d2e16..420ca41 100644
--- a/test/tint/builtins/gen/literal/exp2/151a4c.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/exp2/151a4c.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
   exp2_151a4c();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001D4AAF5DCB0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/exp2/751377.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/exp2/751377.wgsl.expected.fxc.hlsl
index b4aa1cd..9aa33ca 100644
--- a/test/tint/builtins/gen/literal/exp2/751377.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/exp2/751377.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
   exp2_751377();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000023A7CDE1160(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/exp2/b408e4.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/exp2/b408e4.wgsl.expected.fxc.hlsl
index ed6bb8d..b041bb4 100644
--- a/test/tint/builtins/gen/literal/exp2/b408e4.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/exp2/b408e4.wgsl.expected.fxc.hlsl
@@ -30,7 +30,3 @@
   exp2_b408e4();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000029A9E5D1160(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000029A9E5D1160(2,13-15): error X3000: unrecognized identifier 'res'
-
diff --git a/test/tint/builtins/gen/literal/exp2/ffa827.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/exp2/ffa827.wgsl.expected.fxc.hlsl
index 0806afc..8fd64a7 100644
--- a/test/tint/builtins/gen/literal/exp2/ffa827.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/exp2/ffa827.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
   exp2_ffa827();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001D88F07E620(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/faceForward/524986.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/faceForward/524986.wgsl.expected.fxc.hlsl
index d7c9b48..7ed18de 100644
--- a/test/tint/builtins/gen/literal/faceForward/524986.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/faceForward/524986.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
   faceForward_524986();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001E4AB906E90(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/faceForward/cc63dc.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/faceForward/cc63dc.wgsl.expected.fxc.hlsl
index b33b557..0164001 100644
--- a/test/tint/builtins/gen/literal/faceForward/cc63dc.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/faceForward/cc63dc.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
   faceForward_cc63dc();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000029C52499560(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/faceForward/fb0f2e.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/faceForward/fb0f2e.wgsl.expected.fxc.hlsl
index 9b647bd..3cb6b43 100644
--- a/test/tint/builtins/gen/literal/faceForward/fb0f2e.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/faceForward/fb0f2e.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
   faceForward_fb0f2e();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000153714C6E90(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/floor/3802c0.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/floor/3802c0.wgsl.expected.fxc.hlsl
index 2257a33..b2337a0 100644
--- a/test/tint/builtins/gen/literal/floor/3802c0.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/floor/3802c0.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
   floor_3802c0();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000024B0BC4CD50(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/floor/84658c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/floor/84658c.wgsl.expected.fxc.hlsl
index a7f1d04..10bfbb1 100644
--- a/test/tint/builtins/gen/literal/floor/84658c.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/floor/84658c.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
   floor_84658c();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001F339C96B50(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/floor/a2d31b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/floor/a2d31b.wgsl.expected.fxc.hlsl
index 2503575..f7fedb9 100644
--- a/test/tint/builtins/gen/literal/floor/a2d31b.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/floor/a2d31b.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
   floor_a2d31b();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002A78E20C3E0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/floor/b6e09c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/floor/b6e09c.wgsl.expected.fxc.hlsl
index b56d8ce..d210fdd 100644
--- a/test/tint/builtins/gen/literal/floor/b6e09c.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/floor/b6e09c.wgsl.expected.fxc.hlsl
@@ -30,7 +30,3 @@
   floor_b6e09c();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002DCF5190520(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002DCF5190520(2,13-15): error X3000: unrecognized identifier 'res'
-
diff --git a/test/tint/builtins/gen/literal/fma/ab7818.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/fma/ab7818.wgsl.expected.fxc.hlsl
index 4aee5ae..e9da9db 100644
--- a/test/tint/builtins/gen/literal/fma/ab7818.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/fma/ab7818.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
   fma_ab7818();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000130923E6FF0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/fma/bf21b6.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/fma/bf21b6.wgsl.expected.fxc.hlsl
index cad7d14..51ff8b3 100644
--- a/test/tint/builtins/gen/literal/fma/bf21b6.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/fma/bf21b6.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
   fma_bf21b6();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000018F50BF5D50(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/fma/c8abb3.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/fma/c8abb3.wgsl.expected.fxc.hlsl
index ce74e5a..3e21ac7 100644
--- a/test/tint/builtins/gen/literal/fma/c8abb3.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/fma/c8abb3.wgsl.expected.fxc.hlsl
@@ -30,7 +30,3 @@
   fma_c8abb3();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001A4E652BA80(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001A4E652BA80(2,13-15): error X3000: unrecognized identifier 'res'
-
diff --git a/test/tint/builtins/gen/literal/fma/e7abdc.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/fma/e7abdc.wgsl.expected.fxc.hlsl
index 2d0f609..1ddf2d33 100644
--- a/test/tint/builtins/gen/literal/fma/e7abdc.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/fma/e7abdc.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
   fma_e7abdc();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001A860253980(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/fract/181aa9.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/fract/181aa9.wgsl.expected.fxc.hlsl
index c6bb42e..23e5f82 100644
--- a/test/tint/builtins/gen/literal/fract/181aa9.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/fract/181aa9.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
   fract_181aa9();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000021E70B80AC0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/fract/498c77.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/fract/498c77.wgsl.expected.fxc.hlsl
index 579a05a..4351653 100644
--- a/test/tint/builtins/gen/literal/fract/498c77.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/fract/498c77.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
   fract_498c77();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000293E8528810(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/fract/958a1d.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/fract/958a1d.wgsl.expected.fxc.hlsl
index f2fcd48..40f9c43 100644
--- a/test/tint/builtins/gen/literal/fract/958a1d.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/fract/958a1d.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
   fract_958a1d();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001490DA5B940(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/fract/eb38ce.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/fract/eb38ce.wgsl.expected.fxc.hlsl
index 4bccb6ef..9cb9bf9 100644
--- a/test/tint/builtins/gen/literal/fract/eb38ce.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/fract/eb38ce.wgsl.expected.fxc.hlsl
@@ -30,7 +30,3 @@
   fract_eb38ce();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000230E569A8C0(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000230E569A8C0(2,13-15): error X3000: unrecognized identifier 'res'
-
diff --git a/test/tint/builtins/gen/literal/frexp/3dd21e.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/frexp/3dd21e.wgsl.expected.fxc.hlsl
index 45fbb59..8580f75 100644
--- a/test/tint/builtins/gen/literal/frexp/3dd21e.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/frexp/3dd21e.wgsl.expected.fxc.hlsl
@@ -41,6 +41,3 @@
   frexp_3dd21e();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001D4F5EB9720(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/frexp/5257dd.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/frexp/5257dd.wgsl.expected.fxc.hlsl
index 05c7d5f..af127fd 100644
--- a/test/tint/builtins/gen/literal/frexp/5257dd.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/frexp/5257dd.wgsl.expected.fxc.hlsl
@@ -41,6 +41,3 @@
   frexp_5257dd();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000017322E51900(2,3-11): error X3000: unrecognized identifier 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/frexp/5f47bf.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/frexp/5f47bf.wgsl.expected.fxc.hlsl
index acfc0ca..6b16ff6 100644
--- a/test/tint/builtins/gen/literal/frexp/5f47bf.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/frexp/5f47bf.wgsl.expected.fxc.hlsl
@@ -41,6 +41,3 @@
   frexp_5f47bf();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001D35F6E9740(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/frexp/ae4a66.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/frexp/ae4a66.wgsl.expected.fxc.hlsl
index b25e403..1ee378c 100644
--- a/test/tint/builtins/gen/literal/frexp/ae4a66.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/frexp/ae4a66.wgsl.expected.fxc.hlsl
@@ -41,6 +41,3 @@
   frexp_ae4a66();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001D8ABEFAB20(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/inverseSqrt/440300.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/inverseSqrt/440300.wgsl.expected.fxc.hlsl
index 81427b0..410b91e 100644
--- a/test/tint/builtins/gen/literal/inverseSqrt/440300.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/inverseSqrt/440300.wgsl.expected.fxc.hlsl
@@ -30,7 +30,3 @@
   inverseSqrt_440300();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000237636FBD30(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000237636FBD30(2,13-15): error X3000: unrecognized identifier 'res'
-
diff --git a/test/tint/builtins/gen/literal/inverseSqrt/5f51f8.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/inverseSqrt/5f51f8.wgsl.expected.fxc.hlsl
index 80d1b67..7732ac5 100644
--- a/test/tint/builtins/gen/literal/inverseSqrt/5f51f8.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/inverseSqrt/5f51f8.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
   inverseSqrt_5f51f8();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000288A2227E00(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/inverseSqrt/b85ebd.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/inverseSqrt/b85ebd.wgsl.expected.fxc.hlsl
index 6e08e83..07d5781 100644
--- a/test/tint/builtins/gen/literal/inverseSqrt/b85ebd.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/inverseSqrt/b85ebd.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
   inverseSqrt_b85ebd();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001FEA9110080(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/inverseSqrt/cbdc70.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/inverseSqrt/cbdc70.wgsl.expected.fxc.hlsl
index 6880c60..8f461ba 100644
--- a/test/tint/builtins/gen/literal/inverseSqrt/cbdc70.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/inverseSqrt/cbdc70.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
   inverseSqrt_cbdc70();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001E1CCE37DA0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/ldexp/3d90b4.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/ldexp/3d90b4.wgsl.expected.fxc.hlsl
index 0608e1f..f1e0c9a 100644
--- a/test/tint/builtins/gen/literal/ldexp/3d90b4.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/ldexp/3d90b4.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
   ldexp_3d90b4();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001808B7D81C0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/ldexp/624e0c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/ldexp/624e0c.wgsl.expected.fxc.hlsl
index d3e207e..0987375 100644
--- a/test/tint/builtins/gen/literal/ldexp/624e0c.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/ldexp/624e0c.wgsl.expected.fxc.hlsl
@@ -30,7 +30,3 @@
   ldexp_624e0c();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001F949F984D0(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001F949F984D0(2,13-15): error X3000: unrecognized identifier 'res'
-
diff --git a/test/tint/builtins/gen/literal/ldexp/7485ce.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/ldexp/7485ce.wgsl.expected.fxc.hlsl
index ac6b68f..b6b1506 100644
--- a/test/tint/builtins/gen/literal/ldexp/7485ce.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/ldexp/7485ce.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
   ldexp_7485ce();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001698F7B0100(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/ldexp/7fa13c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/ldexp/7fa13c.wgsl.expected.fxc.hlsl
index a53fa35..a84e2fa 100644
--- a/test/tint/builtins/gen/literal/ldexp/7fa13c.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/ldexp/7fa13c.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
   ldexp_7fa13c();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000018D79877AB0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/length/3f0e13.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/length/3f0e13.wgsl.expected.fxc.hlsl
index aaa0dce..579615e 100644
--- a/test/tint/builtins/gen/literal/length/3f0e13.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/length/3f0e13.wgsl.expected.fxc.hlsl
@@ -30,7 +30,3 @@
   length_3f0e13();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000025534170870(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000025534170870(2,13-15): error X3000: unrecognized identifier 'res'
-
diff --git a/test/tint/builtins/gen/literal/length/5b1a9b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/length/5b1a9b.wgsl.expected.fxc.hlsl
index 736654a..ac6e839 100644
--- a/test/tint/builtins/gen/literal/length/5b1a9b.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/length/5b1a9b.wgsl.expected.fxc.hlsl
@@ -30,7 +30,3 @@
   length_5b1a9b();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000206B010D5C0(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000206B010D5C0(2,13-15): error X3000: unrecognized identifier 'res'
-
diff --git a/test/tint/builtins/gen/literal/length/ba16d6.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/length/ba16d6.wgsl.expected.fxc.hlsl
index 99ff3bb..b1cdfca 100644
--- a/test/tint/builtins/gen/literal/length/ba16d6.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/length/ba16d6.wgsl.expected.fxc.hlsl
@@ -30,7 +30,3 @@
   length_ba16d6();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001EE9E8E87F0(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001EE9E8E87F0(2,13-15): error X3000: unrecognized identifier 'res'
-
diff --git a/test/tint/builtins/gen/literal/length/c158da.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/length/c158da.wgsl.expected.fxc.hlsl
index 2a73153..c5dafdc 100644
--- a/test/tint/builtins/gen/literal/length/c158da.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/length/c158da.wgsl.expected.fxc.hlsl
@@ -30,7 +30,3 @@
   length_c158da();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001B0C50014C0(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001B0C50014C0(2,13-15): error X3000: unrecognized identifier 'res'
-
diff --git a/test/tint/builtins/gen/literal/log/6ff86f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/log/6ff86f.wgsl.expected.fxc.hlsl
index 9f4b2ef..9610478 100644
--- a/test/tint/builtins/gen/literal/log/6ff86f.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/log/6ff86f.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
   log_6ff86f();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000269CEF087E0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/log/8f0e32.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/log/8f0e32.wgsl.expected.fxc.hlsl
index c8ce6df..a17a48b 100644
--- a/test/tint/builtins/gen/literal/log/8f0e32.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/log/8f0e32.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
   log_8f0e32();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000262B0B30AC0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/log/c9f489.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/log/c9f489.wgsl.expected.fxc.hlsl
index 9510d92..9ba56aa 100644
--- a/test/tint/builtins/gen/literal/log/c9f489.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/log/c9f489.wgsl.expected.fxc.hlsl
@@ -30,7 +30,3 @@
   log_c9f489();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000200F08314A0(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000200F08314A0(2,13-15): error X3000: unrecognized identifier 'res'
-
diff --git a/test/tint/builtins/gen/literal/log/cdbdc1.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/log/cdbdc1.wgsl.expected.fxc.hlsl
index 46491bc..dee6e11 100644
--- a/test/tint/builtins/gen/literal/log/cdbdc1.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/log/cdbdc1.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
   log_cdbdc1();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001EBFCF31A60(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/log2/38b478.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/log2/38b478.wgsl.expected.fxc.hlsl
index 76ffd38..23d8495 100644
--- a/test/tint/builtins/gen/literal/log2/38b478.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/log2/38b478.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
   log2_38b478();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001D9884A1160(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/log2/776088.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/log2/776088.wgsl.expected.fxc.hlsl
index cc463e0..dac6ba1 100644
--- a/test/tint/builtins/gen/literal/log2/776088.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/log2/776088.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
   log2_776088();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000254F7CB1160(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/log2/8c10b3.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/log2/8c10b3.wgsl.expected.fxc.hlsl
index a1f50c0..fb4c5c5 100644
--- a/test/tint/builtins/gen/literal/log2/8c10b3.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/log2/8c10b3.wgsl.expected.fxc.hlsl
@@ -30,7 +30,3 @@
   log2_8c10b3();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000021DFAAFB990(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000021DFAAFB990(2,13-15): error X3000: unrecognized identifier 'res'
-
diff --git a/test/tint/builtins/gen/literal/log2/fb9f0b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/log2/fb9f0b.wgsl.expected.fxc.hlsl
index 13779ea..0ca144b 100644
--- a/test/tint/builtins/gen/literal/log2/fb9f0b.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/log2/fb9f0b.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
   log2_fb9f0b();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001D63F9088D0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/max/111ac0.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/max/111ac0.wgsl.expected.fxc.hlsl
index e031d96..0dffb14 100644
--- a/test/tint/builtins/gen/literal/max/111ac0.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/max/111ac0.wgsl.expected.fxc.hlsl
@@ -30,7 +30,3 @@
   max_111ac0();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000215BA37C140(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000215BA37C140(2,13-15): error X3000: unrecognized identifier 'res'
-
diff --git a/test/tint/builtins/gen/literal/max/34956e.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/max/34956e.wgsl.expected.fxc.hlsl
index 54be2a8..3012d3c 100644
--- a/test/tint/builtins/gen/literal/max/34956e.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/max/34956e.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
   max_34956e();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000016DDE0B63C0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/max/445169.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/max/445169.wgsl.expected.fxc.hlsl
index bed53ac..56d365d 100644
--- a/test/tint/builtins/gen/literal/max/445169.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/max/445169.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
   max_445169();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000280F3D6A940(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/max/e14f2b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/max/e14f2b.wgsl.expected.fxc.hlsl
index cff4cc6..dfbfa9d 100644
--- a/test/tint/builtins/gen/literal/max/e14f2b.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/max/e14f2b.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
   max_e14f2b();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002878BF192B0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/min/7c710a.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/min/7c710a.wgsl.expected.fxc.hlsl
index 8a7bcbd..15ea82a 100644
--- a/test/tint/builtins/gen/literal/min/7c710a.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/min/7c710a.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
   min_7c710a();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000236F63CBD50(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/min/ab0acd.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/min/ab0acd.wgsl.expected.fxc.hlsl
index 9a20bd5..df4009f 100644
--- a/test/tint/builtins/gen/literal/min/ab0acd.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/min/ab0acd.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
   min_ab0acd();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002CE0B337DB0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/min/ac84d6.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/min/ac84d6.wgsl.expected.fxc.hlsl
index 4b61aaa..26e5f9b 100644
--- a/test/tint/builtins/gen/literal/min/ac84d6.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/min/ac84d6.wgsl.expected.fxc.hlsl
@@ -30,7 +30,3 @@
   min_ac84d6();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000024815ABE8C0(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000024815ABE8C0(2,13-15): error X3000: unrecognized identifier 'res'
-
diff --git a/test/tint/builtins/gen/literal/min/e780f9.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/min/e780f9.wgsl.expected.fxc.hlsl
index a176ab3..b0a7318 100644
--- a/test/tint/builtins/gen/literal/min/e780f9.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/min/e780f9.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
   min_e780f9();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001FEDC6E7DE0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/mix/38cbbb.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/mix/38cbbb.wgsl.expected.fxc.hlsl
index d8b981b..dbef3f6 100644
--- a/test/tint/builtins/gen/literal/mix/38cbbb.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/mix/38cbbb.wgsl.expected.fxc.hlsl
@@ -30,7 +30,3 @@
   mix_38cbbb();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001E08ADE7D50(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001E08ADE7D50(2,13-15): error X3000: unrecognized identifier 'res'
-
diff --git a/test/tint/builtins/gen/literal/mix/63f2fd.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/mix/63f2fd.wgsl.expected.fxc.hlsl
index 92c7608..2f46794 100644
--- a/test/tint/builtins/gen/literal/mix/63f2fd.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/mix/63f2fd.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
   mix_63f2fd();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001B9F0AF6FF0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/mix/98ee3e.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/mix/98ee3e.wgsl.expected.fxc.hlsl
index 784bfa3..88b49b6 100644
--- a/test/tint/builtins/gen/literal/mix/98ee3e.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/mix/98ee3e.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
   mix_98ee3e();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000019DF5529870(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/mix/c1aec6.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/mix/c1aec6.wgsl.expected.fxc.hlsl
index 90e3fb0..20f26c9 100644
--- a/test/tint/builtins/gen/literal/mix/c1aec6.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/mix/c1aec6.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
   mix_c1aec6();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000197E6FB4A90(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/mix/e46a83.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/mix/e46a83.wgsl.expected.fxc.hlsl
index 6ce6313..79505ff 100644
--- a/test/tint/builtins/gen/literal/mix/e46a83.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/mix/e46a83.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
   mix_e46a83();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001F8B7BA68A0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/mix/ee2468.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/mix/ee2468.wgsl.expected.fxc.hlsl
index 012c441..c0b47c2 100644
--- a/test/tint/builtins/gen/literal/mix/ee2468.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/mix/ee2468.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
   mix_ee2468();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001B8684C57F0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/mix/f1a543.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/mix/f1a543.wgsl.expected.fxc.hlsl
index 26ebdc4..60d5d206 100644
--- a/test/tint/builtins/gen/literal/mix/f1a543.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/mix/f1a543.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
   mix_f1a543();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000020D39006FD0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/modf/45005f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/modf/45005f.wgsl.expected.fxc.hlsl
index 9f164da..b455907 100644
--- a/test/tint/builtins/gen/literal/modf/45005f.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/modf/45005f.wgsl.expected.fxc.hlsl
@@ -40,6 +40,3 @@
   modf_45005f();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001B818324B80(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/modf/8dbbbf.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/modf/8dbbbf.wgsl.expected.fxc.hlsl
index ce161cd..3d55a32 100644
--- a/test/tint/builtins/gen/literal/modf/8dbbbf.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/modf/8dbbbf.wgsl.expected.fxc.hlsl
@@ -40,6 +40,3 @@
   modf_8dbbbf();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000024604C24BA0(2,3-11): error X3000: unrecognized identifier 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/modf/995934.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/modf/995934.wgsl.expected.fxc.hlsl
index 7a708c7..7074c4e 100644
--- a/test/tint/builtins/gen/literal/modf/995934.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/modf/995934.wgsl.expected.fxc.hlsl
@@ -40,6 +40,3 @@
   modf_995934();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000016E71A92D00(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/modf/a545b9.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/modf/a545b9.wgsl.expected.fxc.hlsl
index 63d6da7..aed1027 100644
--- a/test/tint/builtins/gen/literal/modf/a545b9.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/modf/a545b9.wgsl.expected.fxc.hlsl
@@ -40,6 +40,3 @@
   modf_a545b9();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002393F2A4B80(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/normalize/39d5ec.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/normalize/39d5ec.wgsl.expected.fxc.hlsl
index 2533db5..1264893 100644
--- a/test/tint/builtins/gen/literal/normalize/39d5ec.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/normalize/39d5ec.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
   normalize_39d5ec();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002467316DBB0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/normalize/7990f3.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/normalize/7990f3.wgsl.expected.fxc.hlsl
index 52cbb8b..fd543f6 100644
--- a/test/tint/builtins/gen/literal/normalize/7990f3.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/normalize/7990f3.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
   normalize_7990f3();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001E10FCEEA50(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/normalize/b8cb8d.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/normalize/b8cb8d.wgsl.expected.fxc.hlsl
index 3eafadc..70f8748 100644
--- a/test/tint/builtins/gen/literal/normalize/b8cb8d.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/normalize/b8cb8d.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
   normalize_b8cb8d();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000027C766AD380(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/pow/4f33b2.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/pow/4f33b2.wgsl.expected.fxc.hlsl
index bca42d2..24ae102 100644
--- a/test/tint/builtins/gen/literal/pow/4f33b2.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/pow/4f33b2.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
   pow_4f33b2();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000027797C56270(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/pow/ce9ef5.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/pow/ce9ef5.wgsl.expected.fxc.hlsl
index a10ed77..8e63234 100644
--- a/test/tint/builtins/gen/literal/pow/ce9ef5.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/pow/ce9ef5.wgsl.expected.fxc.hlsl
@@ -30,7 +30,3 @@
   pow_ce9ef5();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000022B8A05C140(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000022B8A05C140(2,13-15): error X3000: unrecognized identifier 'res'
-
diff --git a/test/tint/builtins/gen/literal/pow/f37b25.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/pow/f37b25.wgsl.expected.fxc.hlsl
index fa7eaa6..6fea07e 100644
--- a/test/tint/builtins/gen/literal/pow/f37b25.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/pow/f37b25.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
   pow_f37b25();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001EE95DF6780(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/pow/fa5429.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/pow/fa5429.wgsl.expected.fxc.hlsl
index cae49c5..6663956 100644
--- a/test/tint/builtins/gen/literal/pow/fa5429.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/pow/fa5429.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
   pow_fa5429();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000028F07286290(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/radians/208fd9.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/radians/208fd9.wgsl.expected.fxc.hlsl
index d1aeace..e765dd7 100644
--- a/test/tint/builtins/gen/literal/radians/208fd9.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/radians/208fd9.wgsl.expected.fxc.hlsl
@@ -34,6 +34,3 @@
   radians_208fd9();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001B5647B0440(1,1-9): error X3000: unrecognized identifier 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/radians/44f20b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/radians/44f20b.wgsl.expected.fxc.hlsl
index ac64196..a75c8d2 100644
--- a/test/tint/builtins/gen/literal/radians/44f20b.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/radians/44f20b.wgsl.expected.fxc.hlsl
@@ -34,6 +34,3 @@
   radians_44f20b();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000024C9C3BC350(1,8-16): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/radians/7ea4c7.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/radians/7ea4c7.wgsl.expected.fxc.hlsl
index 6a13fc2..f2869e0 100644
--- a/test/tint/builtins/gen/literal/radians/7ea4c7.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/radians/7ea4c7.wgsl.expected.fxc.hlsl
@@ -34,6 +34,3 @@
   radians_7ea4c7();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001C0F82EE760(1,8-16): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/radians/fbacf0.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/radians/fbacf0.wgsl.expected.fxc.hlsl
index 880018a..df149a6 100644
--- a/test/tint/builtins/gen/literal/radians/fbacf0.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/radians/fbacf0.wgsl.expected.fxc.hlsl
@@ -34,6 +34,3 @@
   radians_fbacf0();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000028D5138C350(1,8-16): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/reflect/310de5.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/reflect/310de5.wgsl.expected.fxc.hlsl
index e4fb2cc..17cc843 100644
--- a/test/tint/builtins/gen/literal/reflect/310de5.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/reflect/310de5.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
   reflect_310de5();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001EFC20B7D70(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/reflect/61ca21.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/reflect/61ca21.wgsl.expected.fxc.hlsl
index 3e8b180..7ab3dc5 100644
--- a/test/tint/builtins/gen/literal/reflect/61ca21.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/reflect/61ca21.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
   reflect_61ca21();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001E16EDB83B0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/reflect/bb15ac.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/reflect/bb15ac.wgsl.expected.fxc.hlsl
index 983ff2a..6df7fb5 100644
--- a/test/tint/builtins/gen/literal/reflect/bb15ac.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/reflect/bb15ac.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
   reflect_bb15ac();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001E110B86630(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/refract/0594ba.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/refract/0594ba.wgsl.expected.fxc.hlsl
index 776bfd5..41d1449 100644
--- a/test/tint/builtins/gen/literal/refract/0594ba.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/refract/0594ba.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
   refract_0594ba();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001B24EF980B0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/refract/570cb3.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/refract/570cb3.wgsl.expected.fxc.hlsl
index 10ae4be..2bfba7b 100644
--- a/test/tint/builtins/gen/literal/refract/570cb3.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/refract/570cb3.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
   refract_570cb3();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001F32B087F20(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/refract/8984af.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/refract/8984af.wgsl.expected.fxc.hlsl
index fd30a49..47692c9 100644
--- a/test/tint/builtins/gen/literal/refract/8984af.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/refract/8984af.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
   refract_8984af();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000019FDBAB9D00(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/round/9078ef.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/round/9078ef.wgsl.expected.fxc.hlsl
index ba25fa1..3e7bb1c 100644
--- a/test/tint/builtins/gen/literal/round/9078ef.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/round/9078ef.wgsl.expected.fxc.hlsl
@@ -30,7 +30,3 @@
   round_9078ef();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001AFF97C0AC0(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001AFF97C0AC0(2,13-15): error X3000: unrecognized identifier 'res'
-
diff --git a/test/tint/builtins/gen/literal/round/d87e84.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/round/d87e84.wgsl.expected.fxc.hlsl
index b025eb8..53cbe3d 100644
--- a/test/tint/builtins/gen/literal/round/d87e84.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/round/d87e84.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
   round_d87e84();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001D031328810(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/round/e1bba2.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/round/e1bba2.wgsl.expected.fxc.hlsl
index 899f28d..f5a3cd7 100644
--- a/test/tint/builtins/gen/literal/round/e1bba2.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/round/e1bba2.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
   round_e1bba2();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000021F98A3E5C0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/round/f665b5.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/round/f665b5.wgsl.expected.fxc.hlsl
index c73645a..ab7ae6a 100644
--- a/test/tint/builtins/gen/literal/round/f665b5.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/round/f665b5.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
   round_f665b5();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000017F6B0D8810(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/saturate/462535.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/saturate/462535.wgsl.expected.fxc.hlsl
index 6698fae..6dc96e5 100644
--- a/test/tint/builtins/gen/literal/saturate/462535.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/saturate/462535.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
   saturate_462535();
   return;
 }
-FXC validation failure:
-C:\src\dawn\test\tint\Shader@0x00000234CFF040C0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/saturate/cd2028.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/saturate/cd2028.wgsl.expected.fxc.hlsl
index 50c0dd1..599fee5 100644
--- a/test/tint/builtins/gen/literal/saturate/cd2028.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/saturate/cd2028.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
   saturate_cd2028();
   return;
 }
-FXC validation failure:
-C:\src\dawn\test\tint\Shader@0x00000147A2EDE4A0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/saturate/dcde71.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/saturate/dcde71.wgsl.expected.fxc.hlsl
index 548bc74..e2e1210 100644
--- a/test/tint/builtins/gen/literal/saturate/dcde71.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/saturate/dcde71.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
   saturate_dcde71();
   return;
 }
-FXC validation failure:
-C:\src\dawn\test\tint\Shader@0x000002580D780150(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/saturate/e8df56.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/saturate/e8df56.wgsl.expected.fxc.hlsl
index 8bc21b2..4342705 100644
--- a/test/tint/builtins/gen/literal/saturate/e8df56.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/saturate/e8df56.wgsl.expected.fxc.hlsl
@@ -30,7 +30,3 @@
   saturate_e8df56();
   return;
 }
-FXC validation failure:
-C:\src\dawn\test\tint\Shader@0x0000020A83F5F990(2,3-11): error X3000: unrecognized identifier 'float16_t'
-C:\src\dawn\test\tint\Shader@0x0000020A83F5F990(2,13-15): error X3000: unrecognized identifier 'res'
-
diff --git a/test/tint/builtins/gen/literal/select/10e73b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/select/10e73b.wgsl.expected.fxc.hlsl
index 9d0c5f2..27a4b01 100644
--- a/test/tint/builtins/gen/literal/select/10e73b.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/select/10e73b.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@
 SKIP: FAILED
 
 void select_10e73b() {
-  float16_t res = (true ? float16_t(0.0h) : float16_t(0.0h));
+  float16_t res = float16_t(0.0h);
 }
 
 struct tint_symbol {
@@ -30,7 +30,3 @@
   select_10e73b();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001A45741F510(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001A45741F510(2,13-15): error X3000: unrecognized identifier 'res'
-
diff --git a/test/tint/builtins/gen/literal/select/1ada2a.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/select/1ada2a.wgsl.expected.fxc.hlsl
index 2165304..202fc05 100644
--- a/test/tint/builtins/gen/literal/select/1ada2a.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/select/1ada2a.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@
 SKIP: FAILED
 
 void select_1ada2a() {
-  vector<float16_t, 3> res = (true ? (float16_t(0.0h)).xxx : (float16_t(0.0h)).xxx);
+  vector<float16_t, 3> res = (float16_t(0.0h)).xxx;
 }
 
 struct tint_symbol {
@@ -30,6 +30,3 @@
   select_1ada2a();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001FD85D20100(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/select/53d518.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/select/53d518.wgsl.expected.fxc.hlsl
index 3117c7b..dd64e1f 100644
--- a/test/tint/builtins/gen/literal/select/53d518.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/select/53d518.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@
 SKIP: FAILED
 
 void select_53d518() {
-  vector<float16_t, 3> res = ((true).xxx ? (float16_t(0.0h)).xxx : (float16_t(0.0h)).xxx);
+  vector<float16_t, 3> res = (float16_t(0.0h)).xxx;
 }
 
 struct tint_symbol {
@@ -30,6 +30,3 @@
   select_53d518();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000025E61DB8680(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/select/830dd9.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/select/830dd9.wgsl.expected.fxc.hlsl
index 522a9e3..24445f6 100644
--- a/test/tint/builtins/gen/literal/select/830dd9.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/select/830dd9.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@
 SKIP: FAILED
 
 void select_830dd9() {
-  vector<float16_t, 4> res = (true ? (float16_t(0.0h)).xxxx : (float16_t(0.0h)).xxxx);
+  vector<float16_t, 4> res = (float16_t(0.0h)).xxxx;
 }
 
 struct tint_symbol {
@@ -30,6 +30,3 @@
   select_830dd9();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001E721C969A0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/select/86f9bd.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/select/86f9bd.wgsl.expected.fxc.hlsl
index d789a21..0d877fb 100644
--- a/test/tint/builtins/gen/literal/select/86f9bd.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/select/86f9bd.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@
 SKIP: FAILED
 
 void select_86f9bd() {
-  vector<float16_t, 2> res = (true ? (float16_t(0.0h)).xx : (float16_t(0.0h)).xx);
+  vector<float16_t, 2> res = (float16_t(0.0h)).xx;
 }
 
 struct tint_symbol {
@@ -30,6 +30,3 @@
   select_86f9bd();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000021328920540(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/select/a081f1.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/select/a081f1.wgsl.expected.fxc.hlsl
index 651eaf7..f399e8a 100644
--- a/test/tint/builtins/gen/literal/select/a081f1.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/select/a081f1.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@
 SKIP: FAILED
 
 void select_a081f1() {
-  vector<float16_t, 4> res = ((true).xxxx ? (float16_t(0.0h)).xxxx : (float16_t(0.0h)).xxxx);
+  vector<float16_t, 4> res = (float16_t(0.0h)).xxxx;
 }
 
 struct tint_symbol {
@@ -30,6 +30,3 @@
   select_a081f1();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000202B4A94A10(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/select/ed7c13.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/select/ed7c13.wgsl.expected.fxc.hlsl
index 0006a34..1895543 100644
--- a/test/tint/builtins/gen/literal/select/ed7c13.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/select/ed7c13.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@
 SKIP: FAILED
 
 void select_ed7c13() {
-  vector<float16_t, 2> res = ((true).xx ? (float16_t(0.0h)).xx : (float16_t(0.0h)).xx);
+  vector<float16_t, 2> res = (float16_t(0.0h)).xx;
 }
 
 struct tint_symbol {
@@ -30,6 +30,3 @@
   select_ed7c13();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000024686E0D4B0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/sign/160933.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/sign/160933.wgsl.expected.fxc.hlsl
index b111818..f007800 100644
--- a/test/tint/builtins/gen/literal/sign/160933.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/sign/160933.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
   sign_160933();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001A1A601ACD0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/sign/5d283a.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/sign/5d283a.wgsl.expected.fxc.hlsl
index 7493bb0..35361f8 100644
--- a/test/tint/builtins/gen/literal/sign/5d283a.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/sign/5d283a.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
   sign_5d283a();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002BE5E5FBCB0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/sign/7c85ea.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/sign/7c85ea.wgsl.expected.fxc.hlsl
index 6690d62..7f140a8 100644
--- a/test/tint/builtins/gen/literal/sign/7c85ea.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/sign/7c85ea.wgsl.expected.fxc.hlsl
@@ -30,7 +30,3 @@
   sign_7c85ea();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001A85B767D00(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001A85B767D00(2,13-15): error X3000: unrecognized identifier 'res'
-
diff --git a/test/tint/builtins/gen/literal/sign/ccdb3c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/sign/ccdb3c.wgsl.expected.fxc.hlsl
index a77b50b..ac5e5bd 100644
--- a/test/tint/builtins/gen/literal/sign/ccdb3c.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/sign/ccdb3c.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
   sign_ccdb3c();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001FE218EE9E0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/sin/2c903b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/sin/2c903b.wgsl.expected.fxc.hlsl
index b22e708..474f706 100644
--- a/test/tint/builtins/gen/literal/sin/2c903b.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/sin/2c903b.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
   sin_2c903b();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000153299087E0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/sin/3cca11.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/sin/3cca11.wgsl.expected.fxc.hlsl
index 38960b6..3121443 100644
--- a/test/tint/builtins/gen/literal/sin/3cca11.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/sin/3cca11.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
   sin_3cca11();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000025136111160(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/sin/5c0712.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/sin/5c0712.wgsl.expected.fxc.hlsl
index 26e763a..61b62da 100644
--- a/test/tint/builtins/gen/literal/sin/5c0712.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/sin/5c0712.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
   sin_5c0712();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001FE3DAE1580(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/sin/66a59f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/sin/66a59f.wgsl.expected.fxc.hlsl
index f6b54ff..ce25b8b 100644
--- a/test/tint/builtins/gen/literal/sin/66a59f.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/sin/66a59f.wgsl.expected.fxc.hlsl
@@ -30,7 +30,3 @@
   sin_66a59f();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002CA5CAC0100(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002CA5CAC0100(2,13-15): error X3000: unrecognized identifier 'res'
-
diff --git a/test/tint/builtins/gen/literal/sinh/0908c1.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/sinh/0908c1.wgsl.expected.fxc.hlsl
index cac1c4b..992ccac 100644
--- a/test/tint/builtins/gen/literal/sinh/0908c1.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/sinh/0908c1.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
   sinh_0908c1();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001E72E75B6A0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/sinh/69cce2.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/sinh/69cce2.wgsl.expected.fxc.hlsl
index 4dca58e2..17ff268 100644
--- a/test/tint/builtins/gen/literal/sinh/69cce2.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/sinh/69cce2.wgsl.expected.fxc.hlsl
@@ -30,7 +30,3 @@
   sinh_69cce2();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001EB249D0520(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001EB249D0520(2,13-15): error X3000: unrecognized identifier 'res'
-
diff --git a/test/tint/builtins/gen/literal/sinh/924f19.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/sinh/924f19.wgsl.expected.fxc.hlsl
index 357854d..e9b6ea2 100644
--- a/test/tint/builtins/gen/literal/sinh/924f19.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/sinh/924f19.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
   sinh_924f19();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000019A6900E9E0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/sinh/ba7e25.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/sinh/ba7e25.wgsl.expected.fxc.hlsl
index 1100cab..2fd547e 100644
--- a/test/tint/builtins/gen/literal/sinh/ba7e25.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/sinh/ba7e25.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
   sinh_ba7e25();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000024997A21160(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/smoothstep/12c031.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/smoothstep/12c031.wgsl.expected.fxc.hlsl
index ab2bc4c..479195e 100644
--- a/test/tint/builtins/gen/literal/smoothstep/12c031.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/smoothstep/12c031.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
   smoothstep_12c031();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000298CE8896B0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/smoothstep/586e12.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/smoothstep/586e12.wgsl.expected.fxc.hlsl
index ac1f915..ced8574 100644
--- a/test/tint/builtins/gen/literal/smoothstep/586e12.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/smoothstep/586e12.wgsl.expected.fxc.hlsl
@@ -30,7 +30,3 @@
   smoothstep_586e12();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000272E8A60100(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000272E8A60100(2,13-15): error X3000: unrecognized identifier 'res'
-
diff --git a/test/tint/builtins/gen/literal/smoothstep/6e7a74.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/smoothstep/6e7a74.wgsl.expected.fxc.hlsl
index 9837ccc..d02eae3 100644
--- a/test/tint/builtins/gen/literal/smoothstep/6e7a74.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/smoothstep/6e7a74.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
   smoothstep_6e7a74();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000023CD6C4BC30(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/smoothstep/c43ebd.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/smoothstep/c43ebd.wgsl.expected.fxc.hlsl
index 92388b8..474ec39 100644
--- a/test/tint/builtins/gen/literal/smoothstep/c43ebd.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/smoothstep/c43ebd.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
   smoothstep_c43ebd();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000023328C496C0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/sqrt/803d1c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/sqrt/803d1c.wgsl.expected.fxc.hlsl
index 56a2453..ac14731 100644
--- a/test/tint/builtins/gen/literal/sqrt/803d1c.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/sqrt/803d1c.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
   sqrt_803d1c();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002342D12DCF0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/sqrt/895a0c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/sqrt/895a0c.wgsl.expected.fxc.hlsl
index 8d0d057..efc91d1 100644
--- a/test/tint/builtins/gen/literal/sqrt/895a0c.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/sqrt/895a0c.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
   sqrt_895a0c();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001FD1487D710(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/sqrt/d9ab4d.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/sqrt/d9ab4d.wgsl.expected.fxc.hlsl
index a2088d6..ac7cd4c 100644
--- a/test/tint/builtins/gen/literal/sqrt/d9ab4d.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/sqrt/d9ab4d.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
   sqrt_d9ab4d();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000256F2C5EAF0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/sqrt/ec33e9.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/sqrt/ec33e9.wgsl.expected.fxc.hlsl
index 71be999..ce63d1d 100644
--- a/test/tint/builtins/gen/literal/sqrt/ec33e9.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/sqrt/ec33e9.wgsl.expected.fxc.hlsl
@@ -30,7 +30,3 @@
   sqrt_ec33e9();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001C2CF8D7D20(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001C2CF8D7D20(2,13-15): error X3000: unrecognized identifier 'res'
-
diff --git a/test/tint/builtins/gen/literal/step/07cb06.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/step/07cb06.wgsl.expected.fxc.hlsl
index 9be8957..ee0a830 100644
--- a/test/tint/builtins/gen/literal/step/07cb06.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/step/07cb06.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
   step_07cb06();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000190D7A566C0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/step/630d07.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/step/630d07.wgsl.expected.fxc.hlsl
index 634d34b..6f92708 100644
--- a/test/tint/builtins/gen/literal/step/630d07.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/step/630d07.wgsl.expected.fxc.hlsl
@@ -30,7 +30,3 @@
   step_630d07();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001EFB6F7D2D0(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001EFB6F7D2D0(2,13-15): error X3000: unrecognized identifier 'res'
-
diff --git a/test/tint/builtins/gen/literal/step/baa320.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/step/baa320.wgsl.expected.fxc.hlsl
index a394391..679912f 100644
--- a/test/tint/builtins/gen/literal/step/baa320.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/step/baa320.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
   step_baa320();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000023DD42966C0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/step/cc6b61.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/step/cc6b61.wgsl.expected.fxc.hlsl
index 00514c5..e15af36 100644
--- a/test/tint/builtins/gen/literal/step/cc6b61.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/step/cc6b61.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
   step_cc6b61();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000015E30CB9FC0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/tan/539e54.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/tan/539e54.wgsl.expected.fxc.hlsl
index ec31619..081aa61 100644
--- a/test/tint/builtins/gen/literal/tan/539e54.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/tan/539e54.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
   tan_539e54();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002A069448210(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/tan/9f7c9c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/tan/9f7c9c.wgsl.expected.fxc.hlsl
index 63c3d76..3bc918f 100644
--- a/test/tint/builtins/gen/literal/tan/9f7c9c.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/tan/9f7c9c.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
   tan_9f7c9c();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000211853A84A0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/tan/d4d491.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/tan/d4d491.wgsl.expected.fxc.hlsl
index 2057021..ab61bca 100644
--- a/test/tint/builtins/gen/literal/tan/d4d491.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/tan/d4d491.wgsl.expected.fxc.hlsl
@@ -30,7 +30,3 @@
   tan_d4d491();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001FE0D3A0520(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001FE0D3A0520(2,13-15): error X3000: unrecognized identifier 'res'
-
diff --git a/test/tint/builtins/gen/literal/tan/db0456.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/tan/db0456.wgsl.expected.fxc.hlsl
index d84a308..b3beb99 100644
--- a/test/tint/builtins/gen/literal/tan/db0456.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/tan/db0456.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
   tan_db0456();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001B50B7A7080(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/tanh/06a4fe.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/tanh/06a4fe.wgsl.expected.fxc.hlsl
index 34fa18b..43d81b4 100644
--- a/test/tint/builtins/gen/literal/tanh/06a4fe.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/tanh/06a4fe.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
   tanh_06a4fe();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000025833A77D70(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/tanh/5b19af.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/tanh/5b19af.wgsl.expected.fxc.hlsl
index de2732f..83f1f22 100644
--- a/test/tint/builtins/gen/literal/tanh/5b19af.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/tanh/5b19af.wgsl.expected.fxc.hlsl
@@ -30,7 +30,3 @@
   tanh_5b19af();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000016C55EB1160(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000016C55EB1160(2,13-15): error X3000: unrecognized identifier 'res'
-
diff --git a/test/tint/builtins/gen/literal/tanh/6d105a.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/tanh/6d105a.wgsl.expected.fxc.hlsl
index fce0b80..0edca60 100644
--- a/test/tint/builtins/gen/literal/tanh/6d105a.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/tanh/6d105a.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
   tanh_6d105a();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000015291DA1160(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/tanh/e8efb3.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/tanh/e8efb3.wgsl.expected.fxc.hlsl
index cc5d017..3403351 100644
--- a/test/tint/builtins/gen/literal/tanh/e8efb3.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/tanh/e8efb3.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
   tanh_e8efb3();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001E87C8DF490(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/textureDimensions/0a1ce8.wgsl b/test/tint/builtins/gen/literal/textureDimensions/0a1ce8.wgsl
new file mode 100644
index 0000000..07e738a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/0a1ce8.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_depth_2d_array;
+
+// fn textureDimensions(texture: texture_depth_2d_array, level: u32) -> vec2<i32>
+fn textureDimensions_0a1ce8() {
+  var res: vec2<i32> = textureDimensions(arg_0, 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_0a1ce8();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_0a1ce8();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_0a1ce8();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/0a1ce8.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/0a1ce8.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..b2765b3
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/0a1ce8.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DArray arg_0 : register(t0, space1);
+
+void textureDimensions_0a1ce8() {
+  int4 tint_tmp;
+  arg_0.GetDimensions(1u, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
+  int2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_0a1ce8();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_0a1ce8();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_0a1ce8();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/0a1ce8.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/0a1ce8.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..b2765b3
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/0a1ce8.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DArray arg_0 : register(t0, space1);
+
+void textureDimensions_0a1ce8() {
+  int4 tint_tmp;
+  arg_0.GetDimensions(1u, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
+  int2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_0a1ce8();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_0a1ce8();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_0a1ce8();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/0a1ce8.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureDimensions/0a1ce8.wgsl.expected.glsl
new file mode 100644
index 0000000..c1709179
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/0a1ce8.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+uniform highp sampler2DArray arg_0_1;
+void textureDimensions_0a1ce8() {
+  ivec2 res = textureSize(arg_0_1, int(1u)).xy;
+}
+
+vec4 vertex_main() {
+  textureDimensions_0a1ce8();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2DArray arg_0_1;
+void textureDimensions_0a1ce8() {
+  ivec2 res = textureSize(arg_0_1, int(1u)).xy;
+}
+
+void fragment_main() {
+  textureDimensions_0a1ce8();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp sampler2DArray arg_0_1;
+void textureDimensions_0a1ce8() {
+  ivec2 res = textureSize(arg_0_1, int(1u)).xy;
+}
+
+void compute_main() {
+  textureDimensions_0a1ce8();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/0a1ce8.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureDimensions/0a1ce8.wgsl.expected.msl
new file mode 100644
index 0000000..224368f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/0a1ce8.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_0a1ce8(depth2d_array<float, access::sample> tint_symbol_1) {
+  int2 res = int2(tint_symbol_1.get_width(1u), tint_symbol_1.get_height(1u));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(depth2d_array<float, access::sample> tint_symbol_2) {
+  textureDimensions_0a1ce8(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(depth2d_array<float, access::sample> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(depth2d_array<float, access::sample> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_0a1ce8(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(depth2d_array<float, access::sample> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_0a1ce8(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/0a1ce8.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureDimensions/0a1ce8.wgsl.expected.spvasm
new file mode 100644
index 0000000..b602707
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/0a1ce8.wgsl.expected.spvasm
@@ -0,0 +1,79 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 41
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_0a1ce8 "textureDimensions_0a1ce8"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %12 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %v2int = OpTypeVector %int 2
+      %v3int = OpTypeVector %int 3
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_v2int = OpTypePointer Function %v2int
+         %26 = OpConstantNull %v2int
+         %27 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_0a1ce8 = OpFunction %void None %12
+         %15 = OpLabel
+        %res = OpVariable %_ptr_Function_v2int Function %26
+         %21 = OpLoad %11 %arg_0
+         %19 = OpImageQuerySizeLod %v3int %21 %uint_1
+         %16 = OpVectorShuffle %v2int %19 %19 0 1
+               OpStore %res %16
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %27
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %textureDimensions_0a1ce8
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+         %32 = OpLabel
+         %33 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %33
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %textureDimensions_0a1ce8
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %12
+         %39 = OpLabel
+         %40 = OpFunctionCall %void %textureDimensions_0a1ce8
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureDimensions/0a1ce8.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureDimensions/0a1ce8.wgsl.expected.wgsl
new file mode 100644
index 0000000..d050a46
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/0a1ce8.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_depth_2d_array;
+
+fn textureDimensions_0a1ce8() {
+  var res : vec2<i32> = textureDimensions(arg_0, 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_0a1ce8();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_0a1ce8();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_0a1ce8();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/0d7633.wgsl b/test/tint/builtins/gen/literal/textureDimensions/0d7633.wgsl
new file mode 100644
index 0000000..cb2ee6d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/0d7633.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_1d<i32>;
+
+// fn textureDimensions(texture: texture_1d<i32>, level: u32) -> i32
+fn textureDimensions_0d7633() {
+  var res: i32 = textureDimensions(arg_0, 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_0d7633();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_0d7633();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_0d7633();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/0d7633.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/0d7633.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..c7d1560
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/0d7633.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture1D<int4> arg_0 : register(t0, space1);
+
+void textureDimensions_0d7633() {
+  int2 tint_tmp;
+  arg_0.GetDimensions(1u, tint_tmp.x, tint_tmp.y);
+  int res = tint_tmp.x;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_0d7633();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_0d7633();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_0d7633();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/0d7633.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/0d7633.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..c7d1560
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/0d7633.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture1D<int4> arg_0 : register(t0, space1);
+
+void textureDimensions_0d7633() {
+  int2 tint_tmp;
+  arg_0.GetDimensions(1u, tint_tmp.x, tint_tmp.y);
+  int res = tint_tmp.x;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_0d7633();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_0d7633();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_0d7633();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/0d7633.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureDimensions/0d7633.wgsl.expected.glsl
new file mode 100644
index 0000000..8650ac5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/0d7633.wgsl.expected.glsl
@@ -0,0 +1,75 @@
+SKIP: FAILED
+
+#version 310 es
+
+uniform highp isampler1D arg_0_1;
+void textureDimensions_0d7633() {
+  int res = textureSize(arg_0_1, int(1u));
+}
+
+vec4 vertex_main() {
+  textureDimensions_0d7633();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'isampler1D' : Reserved word. 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+uniform highp isampler1D arg_0_1;
+void textureDimensions_0d7633() {
+  int res = textureSize(arg_0_1, int(1u));
+}
+
+void fragment_main() {
+  textureDimensions_0d7633();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'isampler1D' : Reserved word. 
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+uniform highp isampler1D arg_0_1;
+void textureDimensions_0d7633() {
+  int res = textureSize(arg_0_1, int(1u));
+}
+
+void compute_main() {
+  textureDimensions_0d7633();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'isampler1D' : Reserved word. 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/0d7633.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureDimensions/0d7633.wgsl.expected.msl
new file mode 100644
index 0000000..e8ba8c2
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/0d7633.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_0d7633(texture1d<int, access::sample> tint_symbol_1) {
+  int res = int(tint_symbol_1.get_width(0));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<int, access::sample> tint_symbol_2) {
+  textureDimensions_0d7633(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<int, access::sample> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<int, access::sample> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_0d7633(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture1d<int, access::sample> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_0d7633(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/0d7633.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureDimensions/0d7633.wgsl.expected.spvasm
new file mode 100644
index 0000000..3622ddf
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/0d7633.wgsl.expected.spvasm
@@ -0,0 +1,77 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 38
+; Schema: 0
+               OpCapability Shader
+               OpCapability Sampled1D
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_0d7633 "textureDimensions_0d7633"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 1D 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_int = OpTypePointer Function %int
+         %23 = OpConstantNull %int
+         %24 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_0d7633 = OpFunction %void None %13
+         %16 = OpLabel
+        %res = OpVariable %_ptr_Function_int Function %23
+         %18 = OpLoad %11 %arg_0
+         %17 = OpImageQuerySizeLod %int %18 %uint_1
+               OpStore %res %17
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %24
+         %26 = OpLabel
+         %27 = OpFunctionCall %void %textureDimensions_0d7633
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %29 = OpLabel
+         %30 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %30
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %textureDimensions_0d7633
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %textureDimensions_0d7633
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureDimensions/0d7633.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureDimensions/0d7633.wgsl.expected.wgsl
new file mode 100644
index 0000000..231bad1
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/0d7633.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_1d<i32>;
+
+fn textureDimensions_0d7633() {
+  var res : i32 = textureDimensions(arg_0, 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_0d7633();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_0d7633();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_0d7633();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/0e28d3.wgsl b/test/tint/builtins/gen/literal/textureDimensions/0e28d3.wgsl
new file mode 100644
index 0000000..377cba0
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/0e28d3.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_cube_array<f32>;
+
+// fn textureDimensions(texture: texture_cube_array<f32>, level: u32) -> vec2<i32>
+fn textureDimensions_0e28d3() {
+  var res: vec2<i32> = textureDimensions(arg_0, 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_0e28d3();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_0e28d3();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_0e28d3();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/0e28d3.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/0e28d3.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..e30632c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/0e28d3.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+TextureCubeArray<float4> arg_0 : register(t0, space1);
+
+void textureDimensions_0e28d3() {
+  int4 tint_tmp;
+  arg_0.GetDimensions(1u, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
+  int2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_0e28d3();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_0e28d3();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_0e28d3();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/0e28d3.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/0e28d3.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..e30632c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/0e28d3.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+TextureCubeArray<float4> arg_0 : register(t0, space1);
+
+void textureDimensions_0e28d3() {
+  int4 tint_tmp;
+  arg_0.GetDimensions(1u, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
+  int2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_0e28d3();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_0e28d3();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_0e28d3();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/0e28d3.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureDimensions/0e28d3.wgsl.expected.glsl
new file mode 100644
index 0000000..58d893a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/0e28d3.wgsl.expected.glsl
@@ -0,0 +1,75 @@
+SKIP: FAILED
+
+#version 310 es
+
+uniform highp samplerCubeArray arg_0_1;
+void textureDimensions_0e28d3() {
+  ivec2 res = textureSize(arg_0_1, int(1u)).xy;
+}
+
+vec4 vertex_main() {
+  textureDimensions_0e28d3();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'samplerCubeArray' : Reserved word. 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+uniform highp samplerCubeArray arg_0_1;
+void textureDimensions_0e28d3() {
+  ivec2 res = textureSize(arg_0_1, int(1u)).xy;
+}
+
+void fragment_main() {
+  textureDimensions_0e28d3();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'samplerCubeArray' : Reserved word. 
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+uniform highp samplerCubeArray arg_0_1;
+void textureDimensions_0e28d3() {
+  ivec2 res = textureSize(arg_0_1, int(1u)).xy;
+}
+
+void compute_main() {
+  textureDimensions_0e28d3();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'samplerCubeArray' : Reserved word. 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/0e28d3.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureDimensions/0e28d3.wgsl.expected.msl
new file mode 100644
index 0000000..e774b54
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/0e28d3.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_0e28d3(texturecube_array<float, access::sample> tint_symbol_1) {
+  int2 res = int2(tint_symbol_1.get_width(1u), tint_symbol_1.get_height(1u));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texturecube_array<float, access::sample> tint_symbol_2) {
+  textureDimensions_0e28d3(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texturecube_array<float, access::sample> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texturecube_array<float, access::sample> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_0e28d3(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texturecube_array<float, access::sample> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_0e28d3(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/0e28d3.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureDimensions/0e28d3.wgsl.expected.spvasm
new file mode 100644
index 0000000..f72b374
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/0e28d3.wgsl.expected.spvasm
@@ -0,0 +1,80 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 41
+; Schema: 0
+               OpCapability Shader
+               OpCapability SampledCubeArray
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_0e28d3 "textureDimensions_0e28d3"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float Cube 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %12 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %v2int = OpTypeVector %int 2
+      %v3int = OpTypeVector %int 3
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_v2int = OpTypePointer Function %v2int
+         %26 = OpConstantNull %v2int
+         %27 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_0e28d3 = OpFunction %void None %12
+         %15 = OpLabel
+        %res = OpVariable %_ptr_Function_v2int Function %26
+         %21 = OpLoad %11 %arg_0
+         %19 = OpImageQuerySizeLod %v3int %21 %uint_1
+         %16 = OpVectorShuffle %v2int %19 %19 0 1
+               OpStore %res %16
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %27
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %textureDimensions_0e28d3
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+         %32 = OpLabel
+         %33 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %33
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %textureDimensions_0e28d3
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %12
+         %39 = OpLabel
+         %40 = OpFunctionCall %void %textureDimensions_0e28d3
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureDimensions/0e28d3.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureDimensions/0e28d3.wgsl.expected.wgsl
new file mode 100644
index 0000000..f9c360a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/0e28d3.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_cube_array<f32>;
+
+fn textureDimensions_0e28d3() {
+  var res : vec2<i32> = textureDimensions(arg_0, 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_0e28d3();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_0e28d3();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_0e28d3();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/16f7cb.wgsl b/test/tint/builtins/gen/literal/textureDimensions/16f7cb.wgsl
new file mode 100644
index 0000000..049b3af
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/16f7cb.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_1d<f32>;
+
+// fn textureDimensions(texture: texture_1d<f32>, level: u32) -> i32
+fn textureDimensions_16f7cb() {
+  var res: i32 = textureDimensions(arg_0, 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_16f7cb();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_16f7cb();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_16f7cb();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/16f7cb.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/16f7cb.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..711c3d5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/16f7cb.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture1D<float4> arg_0 : register(t0, space1);
+
+void textureDimensions_16f7cb() {
+  int2 tint_tmp;
+  arg_0.GetDimensions(1u, tint_tmp.x, tint_tmp.y);
+  int res = tint_tmp.x;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_16f7cb();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_16f7cb();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_16f7cb();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/16f7cb.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/16f7cb.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..711c3d5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/16f7cb.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture1D<float4> arg_0 : register(t0, space1);
+
+void textureDimensions_16f7cb() {
+  int2 tint_tmp;
+  arg_0.GetDimensions(1u, tint_tmp.x, tint_tmp.y);
+  int res = tint_tmp.x;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_16f7cb();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_16f7cb();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_16f7cb();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/16f7cb.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureDimensions/16f7cb.wgsl.expected.glsl
new file mode 100644
index 0000000..a856a6f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/16f7cb.wgsl.expected.glsl
@@ -0,0 +1,75 @@
+SKIP: FAILED
+
+#version 310 es
+
+uniform highp sampler1D arg_0_1;
+void textureDimensions_16f7cb() {
+  int res = textureSize(arg_0_1, int(1u));
+}
+
+vec4 vertex_main() {
+  textureDimensions_16f7cb();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'sampler1D' : Reserved word. 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+uniform highp sampler1D arg_0_1;
+void textureDimensions_16f7cb() {
+  int res = textureSize(arg_0_1, int(1u));
+}
+
+void fragment_main() {
+  textureDimensions_16f7cb();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'sampler1D' : Reserved word. 
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+uniform highp sampler1D arg_0_1;
+void textureDimensions_16f7cb() {
+  int res = textureSize(arg_0_1, int(1u));
+}
+
+void compute_main() {
+  textureDimensions_16f7cb();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'sampler1D' : Reserved word. 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/16f7cb.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureDimensions/16f7cb.wgsl.expected.msl
new file mode 100644
index 0000000..a358067
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/16f7cb.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_16f7cb(texture1d<float, access::sample> tint_symbol_1) {
+  int res = int(tint_symbol_1.get_width(0));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<float, access::sample> tint_symbol_2) {
+  textureDimensions_16f7cb(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<float, access::sample> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<float, access::sample> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_16f7cb(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture1d<float, access::sample> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_16f7cb(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/16f7cb.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureDimensions/16f7cb.wgsl.expected.spvasm
new file mode 100644
index 0000000..ec32af4
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/16f7cb.wgsl.expected.spvasm
@@ -0,0 +1,77 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 38
+; Schema: 0
+               OpCapability Shader
+               OpCapability Sampled1D
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_16f7cb "textureDimensions_16f7cb"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 1D 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %12 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_int = OpTypePointer Function %int
+         %23 = OpConstantNull %int
+         %24 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_16f7cb = OpFunction %void None %12
+         %15 = OpLabel
+        %res = OpVariable %_ptr_Function_int Function %23
+         %18 = OpLoad %11 %arg_0
+         %16 = OpImageQuerySizeLod %int %18 %uint_1
+               OpStore %res %16
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %24
+         %26 = OpLabel
+         %27 = OpFunctionCall %void %textureDimensions_16f7cb
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+         %29 = OpLabel
+         %30 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %30
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %textureDimensions_16f7cb
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %12
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %textureDimensions_16f7cb
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureDimensions/16f7cb.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureDimensions/16f7cb.wgsl.expected.wgsl
new file mode 100644
index 0000000..3ce015d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/16f7cb.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_1d<f32>;
+
+fn textureDimensions_16f7cb() {
+  var res : i32 = textureDimensions(arg_0, 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_16f7cb();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_16f7cb();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_16f7cb();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/1e3981.wgsl b/test/tint/builtins/gen/literal/textureDimensions/1e3981.wgsl
new file mode 100644
index 0000000..ed361fe
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/1e3981.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_1d<u32>;
+
+// fn textureDimensions(texture: texture_1d<u32>, level: u32) -> i32
+fn textureDimensions_1e3981() {
+  var res: i32 = textureDimensions(arg_0, 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_1e3981();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_1e3981();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_1e3981();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/1e3981.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/1e3981.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..38cf7e0
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/1e3981.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture1D<uint4> arg_0 : register(t0, space1);
+
+void textureDimensions_1e3981() {
+  int2 tint_tmp;
+  arg_0.GetDimensions(1u, tint_tmp.x, tint_tmp.y);
+  int res = tint_tmp.x;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_1e3981();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_1e3981();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_1e3981();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/1e3981.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/1e3981.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..38cf7e0
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/1e3981.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture1D<uint4> arg_0 : register(t0, space1);
+
+void textureDimensions_1e3981() {
+  int2 tint_tmp;
+  arg_0.GetDimensions(1u, tint_tmp.x, tint_tmp.y);
+  int res = tint_tmp.x;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_1e3981();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_1e3981();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_1e3981();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/1e3981.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureDimensions/1e3981.wgsl.expected.glsl
new file mode 100644
index 0000000..24f7b92
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/1e3981.wgsl.expected.glsl
@@ -0,0 +1,75 @@
+SKIP: FAILED
+
+#version 310 es
+
+uniform highp usampler1D arg_0_1;
+void textureDimensions_1e3981() {
+  int res = textureSize(arg_0_1, int(1u));
+}
+
+vec4 vertex_main() {
+  textureDimensions_1e3981();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'usampler1D' : Reserved word. 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+uniform highp usampler1D arg_0_1;
+void textureDimensions_1e3981() {
+  int res = textureSize(arg_0_1, int(1u));
+}
+
+void fragment_main() {
+  textureDimensions_1e3981();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'usampler1D' : Reserved word. 
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+uniform highp usampler1D arg_0_1;
+void textureDimensions_1e3981() {
+  int res = textureSize(arg_0_1, int(1u));
+}
+
+void compute_main() {
+  textureDimensions_1e3981();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'usampler1D' : Reserved word. 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/1e3981.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureDimensions/1e3981.wgsl.expected.msl
new file mode 100644
index 0000000..9651af1
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/1e3981.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_1e3981(texture1d<uint, access::sample> tint_symbol_1) {
+  int res = int(tint_symbol_1.get_width(0));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<uint, access::sample> tint_symbol_2) {
+  textureDimensions_1e3981(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<uint, access::sample> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<uint, access::sample> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_1e3981(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture1d<uint, access::sample> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_1e3981(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/1e3981.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureDimensions/1e3981.wgsl.expected.spvasm
new file mode 100644
index 0000000..90f1292
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/1e3981.wgsl.expected.spvasm
@@ -0,0 +1,77 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 38
+; Schema: 0
+               OpCapability Shader
+               OpCapability Sampled1D
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_1e3981 "textureDimensions_1e3981"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 1D 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_int = OpTypePointer Function %int
+         %23 = OpConstantNull %int
+         %24 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_1e3981 = OpFunction %void None %13
+         %16 = OpLabel
+        %res = OpVariable %_ptr_Function_int Function %23
+         %19 = OpLoad %11 %arg_0
+         %17 = OpImageQuerySizeLod %int %19 %uint_1
+               OpStore %res %17
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %24
+         %26 = OpLabel
+         %27 = OpFunctionCall %void %textureDimensions_1e3981
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %29 = OpLabel
+         %30 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %30
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %textureDimensions_1e3981
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %textureDimensions_1e3981
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureDimensions/1e3981.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureDimensions/1e3981.wgsl.expected.wgsl
new file mode 100644
index 0000000..65d87df
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/1e3981.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_1d<u32>;
+
+fn textureDimensions_1e3981() {
+  var res : i32 = textureDimensions(arg_0, 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_1e3981();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_1e3981();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_1e3981();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/216688.wgsl b/test/tint/builtins/gen/literal/textureDimensions/216688.wgsl
new file mode 100644
index 0000000..08978c5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/216688.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_2d_array<f32>;
+
+// fn textureDimensions(texture: texture_2d_array<f32>, level: u32) -> vec2<i32>
+fn textureDimensions_216688() {
+  var res: vec2<i32> = textureDimensions(arg_0, 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_216688();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_216688();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_216688();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/216688.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/216688.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..c4c2066
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/216688.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+
+void textureDimensions_216688() {
+  int4 tint_tmp;
+  arg_0.GetDimensions(1u, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
+  int2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_216688();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_216688();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_216688();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/216688.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/216688.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..c4c2066
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/216688.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+
+void textureDimensions_216688() {
+  int4 tint_tmp;
+  arg_0.GetDimensions(1u, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
+  int2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_216688();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_216688();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_216688();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/216688.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureDimensions/216688.wgsl.expected.glsl
new file mode 100644
index 0000000..653c714
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/216688.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+uniform highp sampler2DArray arg_0_1;
+void textureDimensions_216688() {
+  ivec2 res = textureSize(arg_0_1, int(1u)).xy;
+}
+
+vec4 vertex_main() {
+  textureDimensions_216688();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2DArray arg_0_1;
+void textureDimensions_216688() {
+  ivec2 res = textureSize(arg_0_1, int(1u)).xy;
+}
+
+void fragment_main() {
+  textureDimensions_216688();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp sampler2DArray arg_0_1;
+void textureDimensions_216688() {
+  ivec2 res = textureSize(arg_0_1, int(1u)).xy;
+}
+
+void compute_main() {
+  textureDimensions_216688();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/216688.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureDimensions/216688.wgsl.expected.msl
new file mode 100644
index 0000000..79a21ca
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/216688.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_216688(texture2d_array<float, access::sample> tint_symbol_1) {
+  int2 res = int2(tint_symbol_1.get_width(1u), tint_symbol_1.get_height(1u));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<float, access::sample> tint_symbol_2) {
+  textureDimensions_216688(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<float, access::sample> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<float, access::sample> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_216688(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d_array<float, access::sample> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_216688(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/216688.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureDimensions/216688.wgsl.expected.spvasm
new file mode 100644
index 0000000..f5abe15
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/216688.wgsl.expected.spvasm
@@ -0,0 +1,79 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 41
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_216688 "textureDimensions_216688"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %12 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %v2int = OpTypeVector %int 2
+      %v3int = OpTypeVector %int 3
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_v2int = OpTypePointer Function %v2int
+         %26 = OpConstantNull %v2int
+         %27 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_216688 = OpFunction %void None %12
+         %15 = OpLabel
+        %res = OpVariable %_ptr_Function_v2int Function %26
+         %21 = OpLoad %11 %arg_0
+         %19 = OpImageQuerySizeLod %v3int %21 %uint_1
+         %16 = OpVectorShuffle %v2int %19 %19 0 1
+               OpStore %res %16
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %27
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %textureDimensions_216688
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+         %32 = OpLabel
+         %33 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %33
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %textureDimensions_216688
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %12
+         %39 = OpLabel
+         %40 = OpFunctionCall %void %textureDimensions_216688
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureDimensions/216688.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureDimensions/216688.wgsl.expected.wgsl
new file mode 100644
index 0000000..2480c8f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/216688.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_2d_array<f32>;
+
+fn textureDimensions_216688() {
+  var res : vec2<i32> = textureDimensions(arg_0, 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_216688();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_216688();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_216688();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/220dc3.wgsl b/test/tint/builtins/gen/literal/textureDimensions/220dc3.wgsl
new file mode 100644
index 0000000..4328aef
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/220dc3.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_2d<u32>;
+
+// fn textureDimensions(texture: texture_2d<u32>, level: u32) -> vec2<i32>
+fn textureDimensions_220dc3() {
+  var res: vec2<i32> = textureDimensions(arg_0, 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_220dc3();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_220dc3();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_220dc3();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/220dc3.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/220dc3.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..faf57cf
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/220dc3.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture2D<uint4> arg_0 : register(t0, space1);
+
+void textureDimensions_220dc3() {
+  int3 tint_tmp;
+  arg_0.GetDimensions(1u, tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  int2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_220dc3();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_220dc3();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_220dc3();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/220dc3.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/220dc3.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..faf57cf
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/220dc3.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture2D<uint4> arg_0 : register(t0, space1);
+
+void textureDimensions_220dc3() {
+  int3 tint_tmp;
+  arg_0.GetDimensions(1u, tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  int2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_220dc3();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_220dc3();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_220dc3();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/220dc3.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureDimensions/220dc3.wgsl.expected.glsl
new file mode 100644
index 0000000..4977181
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/220dc3.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+uniform highp usampler2D arg_0_1;
+void textureDimensions_220dc3() {
+  ivec2 res = textureSize(arg_0_1, int(1u));
+}
+
+vec4 vertex_main() {
+  textureDimensions_220dc3();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp usampler2D arg_0_1;
+void textureDimensions_220dc3() {
+  ivec2 res = textureSize(arg_0_1, int(1u));
+}
+
+void fragment_main() {
+  textureDimensions_220dc3();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp usampler2D arg_0_1;
+void textureDimensions_220dc3() {
+  ivec2 res = textureSize(arg_0_1, int(1u));
+}
+
+void compute_main() {
+  textureDimensions_220dc3();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/220dc3.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureDimensions/220dc3.wgsl.expected.msl
new file mode 100644
index 0000000..953e48a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/220dc3.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_220dc3(texture2d<uint, access::sample> tint_symbol_1) {
+  int2 res = int2(tint_symbol_1.get_width(1u), tint_symbol_1.get_height(1u));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<uint, access::sample> tint_symbol_2) {
+  textureDimensions_220dc3(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<uint, access::sample> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<uint, access::sample> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_220dc3(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d<uint, access::sample> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_220dc3(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/220dc3.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureDimensions/220dc3.wgsl.expected.spvasm
new file mode 100644
index 0000000..41ca029
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/220dc3.wgsl.expected.spvasm
@@ -0,0 +1,77 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 39
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_220dc3 "textureDimensions_220dc3"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 2D 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %v2int = OpTypeVector %int 2
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_v2int = OpTypePointer Function %v2int
+         %24 = OpConstantNull %v2int
+         %25 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_220dc3 = OpFunction %void None %13
+         %16 = OpLabel
+        %res = OpVariable %_ptr_Function_v2int Function %24
+         %20 = OpLoad %11 %arg_0
+         %17 = OpImageQuerySizeLod %v2int %20 %uint_1
+               OpStore %res %17
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %25
+         %27 = OpLabel
+         %28 = OpFunctionCall %void %textureDimensions_220dc3
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %30 = OpLabel
+         %31 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %31
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %textureDimensions_220dc3
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %37 = OpLabel
+         %38 = OpFunctionCall %void %textureDimensions_220dc3
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureDimensions/220dc3.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureDimensions/220dc3.wgsl.expected.wgsl
new file mode 100644
index 0000000..35cc4dd
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/220dc3.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_2d<u32>;
+
+fn textureDimensions_220dc3() {
+  var res : vec2<i32> = textureDimensions(arg_0, 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_220dc3();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_220dc3();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_220dc3();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/2d4299.wgsl b/test/tint/builtins/gen/literal/textureDimensions/2d4299.wgsl
new file mode 100644
index 0000000..082fab0
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/2d4299.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_cube_array<i32>;
+
+// fn textureDimensions(texture: texture_cube_array<i32>, level: u32) -> vec2<i32>
+fn textureDimensions_2d4299() {
+  var res: vec2<i32> = textureDimensions(arg_0, 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_2d4299();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_2d4299();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_2d4299();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/2d4299.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/2d4299.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..1c2051f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/2d4299.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+TextureCubeArray<int4> arg_0 : register(t0, space1);
+
+void textureDimensions_2d4299() {
+  int4 tint_tmp;
+  arg_0.GetDimensions(1u, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
+  int2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_2d4299();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_2d4299();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_2d4299();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/2d4299.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/2d4299.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..1c2051f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/2d4299.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+TextureCubeArray<int4> arg_0 : register(t0, space1);
+
+void textureDimensions_2d4299() {
+  int4 tint_tmp;
+  arg_0.GetDimensions(1u, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
+  int2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_2d4299();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_2d4299();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_2d4299();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/2d4299.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureDimensions/2d4299.wgsl.expected.glsl
new file mode 100644
index 0000000..c5a791c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/2d4299.wgsl.expected.glsl
@@ -0,0 +1,75 @@
+SKIP: FAILED
+
+#version 310 es
+
+uniform highp isamplerCubeArray arg_0_1;
+void textureDimensions_2d4299() {
+  ivec2 res = textureSize(arg_0_1, int(1u)).xy;
+}
+
+vec4 vertex_main() {
+  textureDimensions_2d4299();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'isamplerCubeArray' : Reserved word. 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+uniform highp isamplerCubeArray arg_0_1;
+void textureDimensions_2d4299() {
+  ivec2 res = textureSize(arg_0_1, int(1u)).xy;
+}
+
+void fragment_main() {
+  textureDimensions_2d4299();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'isamplerCubeArray' : Reserved word. 
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+uniform highp isamplerCubeArray arg_0_1;
+void textureDimensions_2d4299() {
+  ivec2 res = textureSize(arg_0_1, int(1u)).xy;
+}
+
+void compute_main() {
+  textureDimensions_2d4299();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'isamplerCubeArray' : Reserved word. 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/2d4299.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureDimensions/2d4299.wgsl.expected.msl
new file mode 100644
index 0000000..dcc5aa1
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/2d4299.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_2d4299(texturecube_array<int, access::sample> tint_symbol_1) {
+  int2 res = int2(tint_symbol_1.get_width(1u), tint_symbol_1.get_height(1u));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texturecube_array<int, access::sample> tint_symbol_2) {
+  textureDimensions_2d4299(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texturecube_array<int, access::sample> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texturecube_array<int, access::sample> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_2d4299(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texturecube_array<int, access::sample> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_2d4299(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/2d4299.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureDimensions/2d4299.wgsl.expected.spvasm
new file mode 100644
index 0000000..9a78821
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/2d4299.wgsl.expected.spvasm
@@ -0,0 +1,80 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 41
+; Schema: 0
+               OpCapability Shader
+               OpCapability SampledCubeArray
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_2d4299 "textureDimensions_2d4299"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int Cube 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+      %v2int = OpTypeVector %int 2
+      %v3int = OpTypeVector %int 3
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_v2int = OpTypePointer Function %v2int
+         %26 = OpConstantNull %v2int
+         %27 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_2d4299 = OpFunction %void None %13
+         %16 = OpLabel
+        %res = OpVariable %_ptr_Function_v2int Function %26
+         %21 = OpLoad %11 %arg_0
+         %19 = OpImageQuerySizeLod %v3int %21 %uint_1
+         %17 = OpVectorShuffle %v2int %19 %19 0 1
+               OpStore %res %17
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %27
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %textureDimensions_2d4299
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %32 = OpLabel
+         %33 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %33
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %textureDimensions_2d4299
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %39 = OpLabel
+         %40 = OpFunctionCall %void %textureDimensions_2d4299
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureDimensions/2d4299.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureDimensions/2d4299.wgsl.expected.wgsl
new file mode 100644
index 0000000..41da16a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/2d4299.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_cube_array<i32>;
+
+fn textureDimensions_2d4299() {
+  var res : vec2<i32> = textureDimensions(arg_0, 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_2d4299();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_2d4299();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_2d4299();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/4d42cf.wgsl b/test/tint/builtins/gen/literal/textureDimensions/4d42cf.wgsl
new file mode 100644
index 0000000..28c7b44
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/4d42cf.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_2d<i32>;
+
+// fn textureDimensions(texture: texture_2d<i32>, level: u32) -> vec2<i32>
+fn textureDimensions_4d42cf() {
+  var res: vec2<i32> = textureDimensions(arg_0, 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_4d42cf();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_4d42cf();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_4d42cf();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/4d42cf.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/4d42cf.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..335abdb
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/4d42cf.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture2D<int4> arg_0 : register(t0, space1);
+
+void textureDimensions_4d42cf() {
+  int3 tint_tmp;
+  arg_0.GetDimensions(1u, tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  int2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_4d42cf();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_4d42cf();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_4d42cf();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/4d42cf.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/4d42cf.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..335abdb
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/4d42cf.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture2D<int4> arg_0 : register(t0, space1);
+
+void textureDimensions_4d42cf() {
+  int3 tint_tmp;
+  arg_0.GetDimensions(1u, tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  int2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_4d42cf();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_4d42cf();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_4d42cf();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/4d42cf.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureDimensions/4d42cf.wgsl.expected.glsl
new file mode 100644
index 0000000..a303a97
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/4d42cf.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+uniform highp isampler2D arg_0_1;
+void textureDimensions_4d42cf() {
+  ivec2 res = textureSize(arg_0_1, int(1u));
+}
+
+vec4 vertex_main() {
+  textureDimensions_4d42cf();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp isampler2D arg_0_1;
+void textureDimensions_4d42cf() {
+  ivec2 res = textureSize(arg_0_1, int(1u));
+}
+
+void fragment_main() {
+  textureDimensions_4d42cf();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp isampler2D arg_0_1;
+void textureDimensions_4d42cf() {
+  ivec2 res = textureSize(arg_0_1, int(1u));
+}
+
+void compute_main() {
+  textureDimensions_4d42cf();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/4d42cf.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureDimensions/4d42cf.wgsl.expected.msl
new file mode 100644
index 0000000..b77d856
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/4d42cf.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_4d42cf(texture2d<int, access::sample> tint_symbol_1) {
+  int2 res = int2(tint_symbol_1.get_width(1u), tint_symbol_1.get_height(1u));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<int, access::sample> tint_symbol_2) {
+  textureDimensions_4d42cf(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<int, access::sample> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<int, access::sample> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_4d42cf(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d<int, access::sample> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_4d42cf(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/4d42cf.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureDimensions/4d42cf.wgsl.expected.spvasm
new file mode 100644
index 0000000..b8e96d0
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/4d42cf.wgsl.expected.spvasm
@@ -0,0 +1,77 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 39
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_4d42cf "textureDimensions_4d42cf"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 2D 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+      %v2int = OpTypeVector %int 2
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_v2int = OpTypePointer Function %v2int
+         %24 = OpConstantNull %v2int
+         %25 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_4d42cf = OpFunction %void None %13
+         %16 = OpLabel
+        %res = OpVariable %_ptr_Function_v2int Function %24
+         %19 = OpLoad %11 %arg_0
+         %17 = OpImageQuerySizeLod %v2int %19 %uint_1
+               OpStore %res %17
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %25
+         %27 = OpLabel
+         %28 = OpFunctionCall %void %textureDimensions_4d42cf
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %30 = OpLabel
+         %31 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %31
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %textureDimensions_4d42cf
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %37 = OpLabel
+         %38 = OpFunctionCall %void %textureDimensions_4d42cf
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureDimensions/4d42cf.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureDimensions/4d42cf.wgsl.expected.wgsl
new file mode 100644
index 0000000..4185202
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/4d42cf.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_2d<i32>;
+
+fn textureDimensions_4d42cf() {
+  var res : vec2<i32> = textureDimensions(arg_0, 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_4d42cf();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_4d42cf();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_4d42cf();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/5331e0.wgsl b/test/tint/builtins/gen/literal/textureDimensions/5331e0.wgsl
new file mode 100644
index 0000000..617f0df
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/5331e0.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_2d<f32>;
+
+// fn textureDimensions(texture: texture_2d<f32>, level: u32) -> vec2<i32>
+fn textureDimensions_5331e0() {
+  var res: vec2<i32> = textureDimensions(arg_0, 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_5331e0();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_5331e0();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_5331e0();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/5331e0.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/5331e0.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..970329b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/5331e0.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture2D<float4> arg_0 : register(t0, space1);
+
+void textureDimensions_5331e0() {
+  int3 tint_tmp;
+  arg_0.GetDimensions(1u, tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  int2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_5331e0();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_5331e0();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_5331e0();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/5331e0.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/5331e0.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..970329b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/5331e0.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture2D<float4> arg_0 : register(t0, space1);
+
+void textureDimensions_5331e0() {
+  int3 tint_tmp;
+  arg_0.GetDimensions(1u, tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  int2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_5331e0();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_5331e0();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_5331e0();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/5331e0.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureDimensions/5331e0.wgsl.expected.glsl
new file mode 100644
index 0000000..9d7c5ef
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/5331e0.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+uniform highp sampler2D arg_0_1;
+void textureDimensions_5331e0() {
+  ivec2 res = textureSize(arg_0_1, int(1u));
+}
+
+vec4 vertex_main() {
+  textureDimensions_5331e0();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2D arg_0_1;
+void textureDimensions_5331e0() {
+  ivec2 res = textureSize(arg_0_1, int(1u));
+}
+
+void fragment_main() {
+  textureDimensions_5331e0();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp sampler2D arg_0_1;
+void textureDimensions_5331e0() {
+  ivec2 res = textureSize(arg_0_1, int(1u));
+}
+
+void compute_main() {
+  textureDimensions_5331e0();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/5331e0.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureDimensions/5331e0.wgsl.expected.msl
new file mode 100644
index 0000000..70ffada
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/5331e0.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_5331e0(texture2d<float, access::sample> tint_symbol_1) {
+  int2 res = int2(tint_symbol_1.get_width(1u), tint_symbol_1.get_height(1u));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<float, access::sample> tint_symbol_2) {
+  textureDimensions_5331e0(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<float, access::sample> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<float, access::sample> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_5331e0(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d<float, access::sample> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_5331e0(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/5331e0.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureDimensions/5331e0.wgsl.expected.spvasm
new file mode 100644
index 0000000..be5f6cd
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/5331e0.wgsl.expected.spvasm
@@ -0,0 +1,77 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 39
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_5331e0 "textureDimensions_5331e0"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %12 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %v2int = OpTypeVector %int 2
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_v2int = OpTypePointer Function %v2int
+         %24 = OpConstantNull %v2int
+         %25 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_5331e0 = OpFunction %void None %12
+         %15 = OpLabel
+        %res = OpVariable %_ptr_Function_v2int Function %24
+         %19 = OpLoad %11 %arg_0
+         %16 = OpImageQuerySizeLod %v2int %19 %uint_1
+               OpStore %res %16
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %25
+         %27 = OpLabel
+         %28 = OpFunctionCall %void %textureDimensions_5331e0
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+         %30 = OpLabel
+         %31 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %31
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %textureDimensions_5331e0
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %12
+         %37 = OpLabel
+         %38 = OpFunctionCall %void %textureDimensions_5331e0
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureDimensions/5331e0.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureDimensions/5331e0.wgsl.expected.wgsl
new file mode 100644
index 0000000..2f4c8ac
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/5331e0.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_2d<f32>;
+
+fn textureDimensions_5331e0() {
+  var res : vec2<i32> = textureDimensions(arg_0, 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_5331e0();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_5331e0();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_5331e0();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/647386.wgsl b/test/tint/builtins/gen/literal/textureDimensions/647386.wgsl
new file mode 100644
index 0000000..427c713
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/647386.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_depth_cube;
+
+// fn textureDimensions(texture: texture_depth_cube, level: u32) -> vec2<i32>
+fn textureDimensions_647386() {
+  var res: vec2<i32> = textureDimensions(arg_0, 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_647386();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_647386();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_647386();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/647386.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/647386.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..940a060
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/647386.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+TextureCube arg_0 : register(t0, space1);
+
+void textureDimensions_647386() {
+  int3 tint_tmp;
+  arg_0.GetDimensions(1u, tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  int2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_647386();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_647386();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_647386();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/647386.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/647386.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..940a060
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/647386.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+TextureCube arg_0 : register(t0, space1);
+
+void textureDimensions_647386() {
+  int3 tint_tmp;
+  arg_0.GetDimensions(1u, tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  int2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_647386();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_647386();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_647386();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/647386.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureDimensions/647386.wgsl.expected.glsl
new file mode 100644
index 0000000..7e35c07
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/647386.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+uniform highp samplerCube arg_0_1;
+void textureDimensions_647386() {
+  ivec2 res = textureSize(arg_0_1, int(1u));
+}
+
+vec4 vertex_main() {
+  textureDimensions_647386();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp samplerCube arg_0_1;
+void textureDimensions_647386() {
+  ivec2 res = textureSize(arg_0_1, int(1u));
+}
+
+void fragment_main() {
+  textureDimensions_647386();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp samplerCube arg_0_1;
+void textureDimensions_647386() {
+  ivec2 res = textureSize(arg_0_1, int(1u));
+}
+
+void compute_main() {
+  textureDimensions_647386();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/647386.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureDimensions/647386.wgsl.expected.msl
new file mode 100644
index 0000000..03d3ff9
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/647386.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_647386(depthcube<float, access::sample> tint_symbol_1) {
+  int2 res = int2(tint_symbol_1.get_width(1u), tint_symbol_1.get_height(1u));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(depthcube<float, access::sample> tint_symbol_2) {
+  textureDimensions_647386(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(depthcube<float, access::sample> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(depthcube<float, access::sample> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_647386(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(depthcube<float, access::sample> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_647386(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/647386.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureDimensions/647386.wgsl.expected.spvasm
new file mode 100644
index 0000000..2411956
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/647386.wgsl.expected.spvasm
@@ -0,0 +1,77 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 39
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_647386 "textureDimensions_647386"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float Cube 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %12 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %v2int = OpTypeVector %int 2
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_v2int = OpTypePointer Function %v2int
+         %24 = OpConstantNull %v2int
+         %25 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_647386 = OpFunction %void None %12
+         %15 = OpLabel
+        %res = OpVariable %_ptr_Function_v2int Function %24
+         %19 = OpLoad %11 %arg_0
+         %16 = OpImageQuerySizeLod %v2int %19 %uint_1
+               OpStore %res %16
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %25
+         %27 = OpLabel
+         %28 = OpFunctionCall %void %textureDimensions_647386
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+         %30 = OpLabel
+         %31 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %31
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %textureDimensions_647386
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %12
+         %37 = OpLabel
+         %38 = OpFunctionCall %void %textureDimensions_647386
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureDimensions/647386.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureDimensions/647386.wgsl.expected.wgsl
new file mode 100644
index 0000000..6339c96
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/647386.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_depth_cube;
+
+fn textureDimensions_647386() {
+  var res : vec2<i32> = textureDimensions(arg_0, 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_647386();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_647386();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_647386();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/6eae7f.wgsl b/test/tint/builtins/gen/literal/textureDimensions/6eae7f.wgsl
new file mode 100644
index 0000000..ea06df4
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/6eae7f.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_cube<i32>;
+
+// fn textureDimensions(texture: texture_cube<i32>, level: u32) -> vec2<i32>
+fn textureDimensions_6eae7f() {
+  var res: vec2<i32> = textureDimensions(arg_0, 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_6eae7f();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_6eae7f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_6eae7f();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/6eae7f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/6eae7f.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..2fb9257
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/6eae7f.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+TextureCube<int4> arg_0 : register(t0, space1);
+
+void textureDimensions_6eae7f() {
+  int3 tint_tmp;
+  arg_0.GetDimensions(1u, tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  int2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_6eae7f();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_6eae7f();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_6eae7f();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/6eae7f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/6eae7f.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..2fb9257
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/6eae7f.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+TextureCube<int4> arg_0 : register(t0, space1);
+
+void textureDimensions_6eae7f() {
+  int3 tint_tmp;
+  arg_0.GetDimensions(1u, tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  int2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_6eae7f();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_6eae7f();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_6eae7f();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/6eae7f.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureDimensions/6eae7f.wgsl.expected.glsl
new file mode 100644
index 0000000..6758f41
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/6eae7f.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+uniform highp isamplerCube arg_0_1;
+void textureDimensions_6eae7f() {
+  ivec2 res = textureSize(arg_0_1, int(1u));
+}
+
+vec4 vertex_main() {
+  textureDimensions_6eae7f();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp isamplerCube arg_0_1;
+void textureDimensions_6eae7f() {
+  ivec2 res = textureSize(arg_0_1, int(1u));
+}
+
+void fragment_main() {
+  textureDimensions_6eae7f();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp isamplerCube arg_0_1;
+void textureDimensions_6eae7f() {
+  ivec2 res = textureSize(arg_0_1, int(1u));
+}
+
+void compute_main() {
+  textureDimensions_6eae7f();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/6eae7f.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureDimensions/6eae7f.wgsl.expected.msl
new file mode 100644
index 0000000..28bbf37
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/6eae7f.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_6eae7f(texturecube<int, access::sample> tint_symbol_1) {
+  int2 res = int2(tint_symbol_1.get_width(1u), tint_symbol_1.get_height(1u));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texturecube<int, access::sample> tint_symbol_2) {
+  textureDimensions_6eae7f(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texturecube<int, access::sample> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texturecube<int, access::sample> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_6eae7f(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texturecube<int, access::sample> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_6eae7f(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/6eae7f.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureDimensions/6eae7f.wgsl.expected.spvasm
new file mode 100644
index 0000000..a51782d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/6eae7f.wgsl.expected.spvasm
@@ -0,0 +1,77 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 39
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_6eae7f "textureDimensions_6eae7f"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int Cube 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+      %v2int = OpTypeVector %int 2
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_v2int = OpTypePointer Function %v2int
+         %24 = OpConstantNull %v2int
+         %25 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_6eae7f = OpFunction %void None %13
+         %16 = OpLabel
+        %res = OpVariable %_ptr_Function_v2int Function %24
+         %19 = OpLoad %11 %arg_0
+         %17 = OpImageQuerySizeLod %v2int %19 %uint_1
+               OpStore %res %17
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %25
+         %27 = OpLabel
+         %28 = OpFunctionCall %void %textureDimensions_6eae7f
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %30 = OpLabel
+         %31 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %31
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %textureDimensions_6eae7f
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %37 = OpLabel
+         %38 = OpFunctionCall %void %textureDimensions_6eae7f
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureDimensions/6eae7f.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureDimensions/6eae7f.wgsl.expected.wgsl
new file mode 100644
index 0000000..0415add
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/6eae7f.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_cube<i32>;
+
+fn textureDimensions_6eae7f() {
+  var res : vec2<i32> = textureDimensions(arg_0, 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_6eae7f();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_6eae7f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_6eae7f();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/71b9f4.wgsl b/test/tint/builtins/gen/literal/textureDimensions/71b9f4.wgsl
new file mode 100644
index 0000000..0d093ec
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/71b9f4.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_3d<i32>;
+
+// fn textureDimensions(texture: texture_3d<i32>, level: u32) -> vec3<i32>
+fn textureDimensions_71b9f4() {
+  var res: vec3<i32> = textureDimensions(arg_0, 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_71b9f4();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_71b9f4();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_71b9f4();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/71b9f4.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/71b9f4.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..df1d04e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/71b9f4.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture3D<int4> arg_0 : register(t0, space1);
+
+void textureDimensions_71b9f4() {
+  int4 tint_tmp;
+  arg_0.GetDimensions(1u, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
+  int3 res = tint_tmp.xyz;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_71b9f4();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_71b9f4();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_71b9f4();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/71b9f4.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/71b9f4.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..df1d04e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/71b9f4.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture3D<int4> arg_0 : register(t0, space1);
+
+void textureDimensions_71b9f4() {
+  int4 tint_tmp;
+  arg_0.GetDimensions(1u, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
+  int3 res = tint_tmp.xyz;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_71b9f4();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_71b9f4();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_71b9f4();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/71b9f4.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureDimensions/71b9f4.wgsl.expected.glsl
new file mode 100644
index 0000000..d43d997
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/71b9f4.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+uniform highp isampler3D arg_0_1;
+void textureDimensions_71b9f4() {
+  ivec3 res = textureSize(arg_0_1, int(1u));
+}
+
+vec4 vertex_main() {
+  textureDimensions_71b9f4();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp isampler3D arg_0_1;
+void textureDimensions_71b9f4() {
+  ivec3 res = textureSize(arg_0_1, int(1u));
+}
+
+void fragment_main() {
+  textureDimensions_71b9f4();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp isampler3D arg_0_1;
+void textureDimensions_71b9f4() {
+  ivec3 res = textureSize(arg_0_1, int(1u));
+}
+
+void compute_main() {
+  textureDimensions_71b9f4();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/71b9f4.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureDimensions/71b9f4.wgsl.expected.msl
new file mode 100644
index 0000000..2815e84
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/71b9f4.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_71b9f4(texture3d<int, access::sample> tint_symbol_1) {
+  int3 res = int3(tint_symbol_1.get_width(1u), tint_symbol_1.get_height(1u), tint_symbol_1.get_depth(1u));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<int, access::sample> tint_symbol_2) {
+  textureDimensions_71b9f4(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<int, access::sample> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture3d<int, access::sample> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_71b9f4(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture3d<int, access::sample> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_71b9f4(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/71b9f4.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureDimensions/71b9f4.wgsl.expected.spvasm
new file mode 100644
index 0000000..4d1cb17
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/71b9f4.wgsl.expected.spvasm
@@ -0,0 +1,77 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 39
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_71b9f4 "textureDimensions_71b9f4"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 3D 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+      %v3int = OpTypeVector %int 3
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_v3int = OpTypePointer Function %v3int
+         %24 = OpConstantNull %v3int
+         %25 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_71b9f4 = OpFunction %void None %13
+         %16 = OpLabel
+        %res = OpVariable %_ptr_Function_v3int Function %24
+         %19 = OpLoad %11 %arg_0
+         %17 = OpImageQuerySizeLod %v3int %19 %uint_1
+               OpStore %res %17
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %25
+         %27 = OpLabel
+         %28 = OpFunctionCall %void %textureDimensions_71b9f4
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %30 = OpLabel
+         %31 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %31
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %textureDimensions_71b9f4
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %37 = OpLabel
+         %38 = OpFunctionCall %void %textureDimensions_71b9f4
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureDimensions/71b9f4.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureDimensions/71b9f4.wgsl.expected.wgsl
new file mode 100644
index 0000000..8a0ff1b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/71b9f4.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_3d<i32>;
+
+fn textureDimensions_71b9f4() {
+  var res : vec3<i32> = textureDimensions(arg_0, 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_71b9f4();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_71b9f4();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_71b9f4();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/7c8821.wgsl b/test/tint/builtins/gen/literal/textureDimensions/7c8821.wgsl
new file mode 100644
index 0000000..182b849
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/7c8821.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_2d_array<i32>;
+
+// fn textureDimensions(texture: texture_2d_array<i32>, level: u32) -> vec2<i32>
+fn textureDimensions_7c8821() {
+  var res: vec2<i32> = textureDimensions(arg_0, 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_7c8821();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_7c8821();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_7c8821();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/7c8821.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/7c8821.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..efa39ce
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/7c8821.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DArray<int4> arg_0 : register(t0, space1);
+
+void textureDimensions_7c8821() {
+  int4 tint_tmp;
+  arg_0.GetDimensions(1u, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
+  int2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_7c8821();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_7c8821();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_7c8821();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/7c8821.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/7c8821.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..efa39ce
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/7c8821.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DArray<int4> arg_0 : register(t0, space1);
+
+void textureDimensions_7c8821() {
+  int4 tint_tmp;
+  arg_0.GetDimensions(1u, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
+  int2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_7c8821();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_7c8821();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_7c8821();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/7c8821.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureDimensions/7c8821.wgsl.expected.glsl
new file mode 100644
index 0000000..fa19d29
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/7c8821.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+uniform highp isampler2DArray arg_0_1;
+void textureDimensions_7c8821() {
+  ivec2 res = textureSize(arg_0_1, int(1u)).xy;
+}
+
+vec4 vertex_main() {
+  textureDimensions_7c8821();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp isampler2DArray arg_0_1;
+void textureDimensions_7c8821() {
+  ivec2 res = textureSize(arg_0_1, int(1u)).xy;
+}
+
+void fragment_main() {
+  textureDimensions_7c8821();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp isampler2DArray arg_0_1;
+void textureDimensions_7c8821() {
+  ivec2 res = textureSize(arg_0_1, int(1u)).xy;
+}
+
+void compute_main() {
+  textureDimensions_7c8821();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/7c8821.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureDimensions/7c8821.wgsl.expected.msl
new file mode 100644
index 0000000..dd07d8b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/7c8821.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_7c8821(texture2d_array<int, access::sample> tint_symbol_1) {
+  int2 res = int2(tint_symbol_1.get_width(1u), tint_symbol_1.get_height(1u));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<int, access::sample> tint_symbol_2) {
+  textureDimensions_7c8821(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<int, access::sample> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<int, access::sample> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_7c8821(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d_array<int, access::sample> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_7c8821(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/7c8821.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureDimensions/7c8821.wgsl.expected.spvasm
new file mode 100644
index 0000000..af64de4
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/7c8821.wgsl.expected.spvasm
@@ -0,0 +1,79 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 41
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_7c8821 "textureDimensions_7c8821"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+      %v2int = OpTypeVector %int 2
+      %v3int = OpTypeVector %int 3
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_v2int = OpTypePointer Function %v2int
+         %26 = OpConstantNull %v2int
+         %27 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_7c8821 = OpFunction %void None %13
+         %16 = OpLabel
+        %res = OpVariable %_ptr_Function_v2int Function %26
+         %21 = OpLoad %11 %arg_0
+         %19 = OpImageQuerySizeLod %v3int %21 %uint_1
+         %17 = OpVectorShuffle %v2int %19 %19 0 1
+               OpStore %res %17
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %27
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %textureDimensions_7c8821
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %32 = OpLabel
+         %33 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %33
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %textureDimensions_7c8821
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %39 = OpLabel
+         %40 = OpFunctionCall %void %textureDimensions_7c8821
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureDimensions/7c8821.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureDimensions/7c8821.wgsl.expected.wgsl
new file mode 100644
index 0000000..4156043
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/7c8821.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_2d_array<i32>;
+
+fn textureDimensions_7c8821() {
+  var res : vec2<i32> = textureDimensions(arg_0, 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_7c8821();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_7c8821();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_7c8821();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/8d87ed.wgsl b/test/tint/builtins/gen/literal/textureDimensions/8d87ed.wgsl
new file mode 100644
index 0000000..2142832
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/8d87ed.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_cube<u32>;
+
+// fn textureDimensions(texture: texture_cube<u32>, level: u32) -> vec2<i32>
+fn textureDimensions_8d87ed() {
+  var res: vec2<i32> = textureDimensions(arg_0, 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_8d87ed();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_8d87ed();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_8d87ed();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/8d87ed.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/8d87ed.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..e554d37
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/8d87ed.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+TextureCube<uint4> arg_0 : register(t0, space1);
+
+void textureDimensions_8d87ed() {
+  int3 tint_tmp;
+  arg_0.GetDimensions(1u, tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  int2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_8d87ed();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_8d87ed();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_8d87ed();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/8d87ed.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/8d87ed.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..e554d37
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/8d87ed.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+TextureCube<uint4> arg_0 : register(t0, space1);
+
+void textureDimensions_8d87ed() {
+  int3 tint_tmp;
+  arg_0.GetDimensions(1u, tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  int2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_8d87ed();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_8d87ed();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_8d87ed();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/8d87ed.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureDimensions/8d87ed.wgsl.expected.glsl
new file mode 100644
index 0000000..19bfcef
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/8d87ed.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+uniform highp usamplerCube arg_0_1;
+void textureDimensions_8d87ed() {
+  ivec2 res = textureSize(arg_0_1, int(1u));
+}
+
+vec4 vertex_main() {
+  textureDimensions_8d87ed();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp usamplerCube arg_0_1;
+void textureDimensions_8d87ed() {
+  ivec2 res = textureSize(arg_0_1, int(1u));
+}
+
+void fragment_main() {
+  textureDimensions_8d87ed();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp usamplerCube arg_0_1;
+void textureDimensions_8d87ed() {
+  ivec2 res = textureSize(arg_0_1, int(1u));
+}
+
+void compute_main() {
+  textureDimensions_8d87ed();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/8d87ed.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureDimensions/8d87ed.wgsl.expected.msl
new file mode 100644
index 0000000..da5758b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/8d87ed.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_8d87ed(texturecube<uint, access::sample> tint_symbol_1) {
+  int2 res = int2(tint_symbol_1.get_width(1u), tint_symbol_1.get_height(1u));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texturecube<uint, access::sample> tint_symbol_2) {
+  textureDimensions_8d87ed(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texturecube<uint, access::sample> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texturecube<uint, access::sample> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_8d87ed(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texturecube<uint, access::sample> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_8d87ed(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/8d87ed.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureDimensions/8d87ed.wgsl.expected.spvasm
new file mode 100644
index 0000000..2bf40fc
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/8d87ed.wgsl.expected.spvasm
@@ -0,0 +1,77 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 39
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_8d87ed "textureDimensions_8d87ed"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint Cube 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %v2int = OpTypeVector %int 2
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_v2int = OpTypePointer Function %v2int
+         %24 = OpConstantNull %v2int
+         %25 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_8d87ed = OpFunction %void None %13
+         %16 = OpLabel
+        %res = OpVariable %_ptr_Function_v2int Function %24
+         %20 = OpLoad %11 %arg_0
+         %17 = OpImageQuerySizeLod %v2int %20 %uint_1
+               OpStore %res %17
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %25
+         %27 = OpLabel
+         %28 = OpFunctionCall %void %textureDimensions_8d87ed
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %30 = OpLabel
+         %31 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %31
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %textureDimensions_8d87ed
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %37 = OpLabel
+         %38 = OpFunctionCall %void %textureDimensions_8d87ed
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureDimensions/8d87ed.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureDimensions/8d87ed.wgsl.expected.wgsl
new file mode 100644
index 0000000..6a88207
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/8d87ed.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_cube<u32>;
+
+fn textureDimensions_8d87ed() {
+  var res : vec2<i32> = textureDimensions(arg_0, 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_8d87ed();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_8d87ed();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_8d87ed();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/941d6e.wgsl b/test/tint/builtins/gen/literal/textureDimensions/941d6e.wgsl
new file mode 100644
index 0000000..bb326a9
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/941d6e.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_depth_2d;
+
+// fn textureDimensions(texture: texture_depth_2d, level: u32) -> vec2<i32>
+fn textureDimensions_941d6e() {
+  var res: vec2<i32> = textureDimensions(arg_0, 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_941d6e();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_941d6e();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_941d6e();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/941d6e.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/941d6e.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..d1de2e5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/941d6e.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture2D arg_0 : register(t0, space1);
+
+void textureDimensions_941d6e() {
+  int3 tint_tmp;
+  arg_0.GetDimensions(1u, tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  int2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_941d6e();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_941d6e();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_941d6e();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/941d6e.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/941d6e.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..d1de2e5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/941d6e.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture2D arg_0 : register(t0, space1);
+
+void textureDimensions_941d6e() {
+  int3 tint_tmp;
+  arg_0.GetDimensions(1u, tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  int2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_941d6e();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_941d6e();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_941d6e();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/941d6e.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureDimensions/941d6e.wgsl.expected.glsl
new file mode 100644
index 0000000..5a05fed
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/941d6e.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+uniform highp sampler2D arg_0_1;
+void textureDimensions_941d6e() {
+  ivec2 res = textureSize(arg_0_1, int(1u));
+}
+
+vec4 vertex_main() {
+  textureDimensions_941d6e();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2D arg_0_1;
+void textureDimensions_941d6e() {
+  ivec2 res = textureSize(arg_0_1, int(1u));
+}
+
+void fragment_main() {
+  textureDimensions_941d6e();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp sampler2D arg_0_1;
+void textureDimensions_941d6e() {
+  ivec2 res = textureSize(arg_0_1, int(1u));
+}
+
+void compute_main() {
+  textureDimensions_941d6e();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/941d6e.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureDimensions/941d6e.wgsl.expected.msl
new file mode 100644
index 0000000..efb87fe
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/941d6e.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_941d6e(depth2d<float, access::sample> tint_symbol_1) {
+  int2 res = int2(tint_symbol_1.get_width(1u), tint_symbol_1.get_height(1u));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(depth2d<float, access::sample> tint_symbol_2) {
+  textureDimensions_941d6e(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(depth2d<float, access::sample> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(depth2d<float, access::sample> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_941d6e(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(depth2d<float, access::sample> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_941d6e(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/941d6e.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureDimensions/941d6e.wgsl.expected.spvasm
new file mode 100644
index 0000000..0ed6d4a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/941d6e.wgsl.expected.spvasm
@@ -0,0 +1,77 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 39
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_941d6e "textureDimensions_941d6e"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %12 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %v2int = OpTypeVector %int 2
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_v2int = OpTypePointer Function %v2int
+         %24 = OpConstantNull %v2int
+         %25 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_941d6e = OpFunction %void None %12
+         %15 = OpLabel
+        %res = OpVariable %_ptr_Function_v2int Function %24
+         %19 = OpLoad %11 %arg_0
+         %16 = OpImageQuerySizeLod %v2int %19 %uint_1
+               OpStore %res %16
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %25
+         %27 = OpLabel
+         %28 = OpFunctionCall %void %textureDimensions_941d6e
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+         %30 = OpLabel
+         %31 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %31
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %textureDimensions_941d6e
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %12
+         %37 = OpLabel
+         %38 = OpFunctionCall %void %textureDimensions_941d6e
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureDimensions/941d6e.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureDimensions/941d6e.wgsl.expected.wgsl
new file mode 100644
index 0000000..5fd586e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/941d6e.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_depth_2d;
+
+fn textureDimensions_941d6e() {
+  var res : vec2<i32> = textureDimensions(arg_0, 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_941d6e();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_941d6e();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_941d6e();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/95b2db.wgsl b/test/tint/builtins/gen/literal/textureDimensions/95b2db.wgsl
new file mode 100644
index 0000000..48a77d1
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/95b2db.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_cube<f32>;
+
+// fn textureDimensions(texture: texture_cube<f32>, level: u32) -> vec2<i32>
+fn textureDimensions_95b2db() {
+  var res: vec2<i32> = textureDimensions(arg_0, 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_95b2db();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_95b2db();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_95b2db();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/95b2db.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/95b2db.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..f550adc
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/95b2db.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+TextureCube<float4> arg_0 : register(t0, space1);
+
+void textureDimensions_95b2db() {
+  int3 tint_tmp;
+  arg_0.GetDimensions(1u, tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  int2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_95b2db();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_95b2db();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_95b2db();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/95b2db.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/95b2db.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..f550adc
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/95b2db.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+TextureCube<float4> arg_0 : register(t0, space1);
+
+void textureDimensions_95b2db() {
+  int3 tint_tmp;
+  arg_0.GetDimensions(1u, tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  int2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_95b2db();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_95b2db();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_95b2db();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/95b2db.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureDimensions/95b2db.wgsl.expected.glsl
new file mode 100644
index 0000000..645a437
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/95b2db.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+uniform highp samplerCube arg_0_1;
+void textureDimensions_95b2db() {
+  ivec2 res = textureSize(arg_0_1, int(1u));
+}
+
+vec4 vertex_main() {
+  textureDimensions_95b2db();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp samplerCube arg_0_1;
+void textureDimensions_95b2db() {
+  ivec2 res = textureSize(arg_0_1, int(1u));
+}
+
+void fragment_main() {
+  textureDimensions_95b2db();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp samplerCube arg_0_1;
+void textureDimensions_95b2db() {
+  ivec2 res = textureSize(arg_0_1, int(1u));
+}
+
+void compute_main() {
+  textureDimensions_95b2db();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/95b2db.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureDimensions/95b2db.wgsl.expected.msl
new file mode 100644
index 0000000..b6cabc6
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/95b2db.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_95b2db(texturecube<float, access::sample> tint_symbol_1) {
+  int2 res = int2(tint_symbol_1.get_width(1u), tint_symbol_1.get_height(1u));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texturecube<float, access::sample> tint_symbol_2) {
+  textureDimensions_95b2db(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texturecube<float, access::sample> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texturecube<float, access::sample> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_95b2db(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texturecube<float, access::sample> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_95b2db(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/95b2db.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureDimensions/95b2db.wgsl.expected.spvasm
new file mode 100644
index 0000000..0f784cb
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/95b2db.wgsl.expected.spvasm
@@ -0,0 +1,77 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 39
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_95b2db "textureDimensions_95b2db"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float Cube 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %12 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %v2int = OpTypeVector %int 2
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_v2int = OpTypePointer Function %v2int
+         %24 = OpConstantNull %v2int
+         %25 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_95b2db = OpFunction %void None %12
+         %15 = OpLabel
+        %res = OpVariable %_ptr_Function_v2int Function %24
+         %19 = OpLoad %11 %arg_0
+         %16 = OpImageQuerySizeLod %v2int %19 %uint_1
+               OpStore %res %16
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %25
+         %27 = OpLabel
+         %28 = OpFunctionCall %void %textureDimensions_95b2db
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+         %30 = OpLabel
+         %31 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %31
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %textureDimensions_95b2db
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %12
+         %37 = OpLabel
+         %38 = OpFunctionCall %void %textureDimensions_95b2db
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureDimensions/95b2db.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureDimensions/95b2db.wgsl.expected.wgsl
new file mode 100644
index 0000000..928eafb
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/95b2db.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_cube<f32>;
+
+fn textureDimensions_95b2db() {
+  var res : vec2<i32> = textureDimensions(arg_0, 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_95b2db();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_95b2db();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_95b2db();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/d1a23d.wgsl b/test/tint/builtins/gen/literal/textureDimensions/d1a23d.wgsl
new file mode 100644
index 0000000..adef2a5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/d1a23d.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_depth_cube_array;
+
+// fn textureDimensions(texture: texture_depth_cube_array, level: u32) -> vec2<i32>
+fn textureDimensions_d1a23d() {
+  var res: vec2<i32> = textureDimensions(arg_0, 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_d1a23d();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_d1a23d();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_d1a23d();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/d1a23d.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/d1a23d.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..6c343f2
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/d1a23d.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+TextureCubeArray arg_0 : register(t0, space1);
+
+void textureDimensions_d1a23d() {
+  int4 tint_tmp;
+  arg_0.GetDimensions(1u, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
+  int2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_d1a23d();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_d1a23d();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_d1a23d();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/d1a23d.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/d1a23d.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..6c343f2
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/d1a23d.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+TextureCubeArray arg_0 : register(t0, space1);
+
+void textureDimensions_d1a23d() {
+  int4 tint_tmp;
+  arg_0.GetDimensions(1u, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
+  int2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_d1a23d();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_d1a23d();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_d1a23d();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/d1a23d.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureDimensions/d1a23d.wgsl.expected.glsl
new file mode 100644
index 0000000..7cd9cbc
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/d1a23d.wgsl.expected.glsl
@@ -0,0 +1,75 @@
+SKIP: FAILED
+
+#version 310 es
+
+uniform highp samplerCubeArray arg_0_1;
+void textureDimensions_d1a23d() {
+  ivec2 res = textureSize(arg_0_1, int(1u)).xy;
+}
+
+vec4 vertex_main() {
+  textureDimensions_d1a23d();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'samplerCubeArray' : Reserved word. 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+uniform highp samplerCubeArray arg_0_1;
+void textureDimensions_d1a23d() {
+  ivec2 res = textureSize(arg_0_1, int(1u)).xy;
+}
+
+void fragment_main() {
+  textureDimensions_d1a23d();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'samplerCubeArray' : Reserved word. 
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+uniform highp samplerCubeArray arg_0_1;
+void textureDimensions_d1a23d() {
+  ivec2 res = textureSize(arg_0_1, int(1u)).xy;
+}
+
+void compute_main() {
+  textureDimensions_d1a23d();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'samplerCubeArray' : Reserved word. 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/d1a23d.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureDimensions/d1a23d.wgsl.expected.msl
new file mode 100644
index 0000000..047e514
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/d1a23d.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_d1a23d(depthcube_array<float, access::sample> tint_symbol_1) {
+  int2 res = int2(tint_symbol_1.get_width(1u), tint_symbol_1.get_height(1u));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(depthcube_array<float, access::sample> tint_symbol_2) {
+  textureDimensions_d1a23d(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(depthcube_array<float, access::sample> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(depthcube_array<float, access::sample> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_d1a23d(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(depthcube_array<float, access::sample> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_d1a23d(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/d1a23d.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureDimensions/d1a23d.wgsl.expected.spvasm
new file mode 100644
index 0000000..76d262c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/d1a23d.wgsl.expected.spvasm
@@ -0,0 +1,80 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 41
+; Schema: 0
+               OpCapability Shader
+               OpCapability SampledCubeArray
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_d1a23d "textureDimensions_d1a23d"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float Cube 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %12 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %v2int = OpTypeVector %int 2
+      %v3int = OpTypeVector %int 3
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_v2int = OpTypePointer Function %v2int
+         %26 = OpConstantNull %v2int
+         %27 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_d1a23d = OpFunction %void None %12
+         %15 = OpLabel
+        %res = OpVariable %_ptr_Function_v2int Function %26
+         %21 = OpLoad %11 %arg_0
+         %19 = OpImageQuerySizeLod %v3int %21 %uint_1
+         %16 = OpVectorShuffle %v2int %19 %19 0 1
+               OpStore %res %16
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %27
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %textureDimensions_d1a23d
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+         %32 = OpLabel
+         %33 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %33
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %textureDimensions_d1a23d
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %12
+         %39 = OpLabel
+         %40 = OpFunctionCall %void %textureDimensions_d1a23d
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureDimensions/d1a23d.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureDimensions/d1a23d.wgsl.expected.wgsl
new file mode 100644
index 0000000..59389d8
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/d1a23d.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_depth_cube_array;
+
+fn textureDimensions_d1a23d() {
+  var res : vec2<i32> = textureDimensions(arg_0, 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_d1a23d();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_d1a23d();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_d1a23d();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/dc7798.wgsl b/test/tint/builtins/gen/literal/textureDimensions/dc7798.wgsl
new file mode 100644
index 0000000..064b0b8
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/dc7798.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_2d_array<u32>;
+
+// fn textureDimensions(texture: texture_2d_array<u32>, level: u32) -> vec2<i32>
+fn textureDimensions_dc7798() {
+  var res: vec2<i32> = textureDimensions(arg_0, 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_dc7798();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_dc7798();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_dc7798();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/dc7798.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/dc7798.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..ccc7f18
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/dc7798.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DArray<uint4> arg_0 : register(t0, space1);
+
+void textureDimensions_dc7798() {
+  int4 tint_tmp;
+  arg_0.GetDimensions(1u, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
+  int2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_dc7798();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_dc7798();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_dc7798();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/dc7798.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/dc7798.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..ccc7f18
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/dc7798.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DArray<uint4> arg_0 : register(t0, space1);
+
+void textureDimensions_dc7798() {
+  int4 tint_tmp;
+  arg_0.GetDimensions(1u, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
+  int2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_dc7798();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_dc7798();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_dc7798();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/dc7798.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureDimensions/dc7798.wgsl.expected.glsl
new file mode 100644
index 0000000..aa97b96
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/dc7798.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+uniform highp usampler2DArray arg_0_1;
+void textureDimensions_dc7798() {
+  ivec2 res = textureSize(arg_0_1, int(1u)).xy;
+}
+
+vec4 vertex_main() {
+  textureDimensions_dc7798();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp usampler2DArray arg_0_1;
+void textureDimensions_dc7798() {
+  ivec2 res = textureSize(arg_0_1, int(1u)).xy;
+}
+
+void fragment_main() {
+  textureDimensions_dc7798();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp usampler2DArray arg_0_1;
+void textureDimensions_dc7798() {
+  ivec2 res = textureSize(arg_0_1, int(1u)).xy;
+}
+
+void compute_main() {
+  textureDimensions_dc7798();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/dc7798.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureDimensions/dc7798.wgsl.expected.msl
new file mode 100644
index 0000000..01e28d2
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/dc7798.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_dc7798(texture2d_array<uint, access::sample> tint_symbol_1) {
+  int2 res = int2(tint_symbol_1.get_width(1u), tint_symbol_1.get_height(1u));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<uint, access::sample> tint_symbol_2) {
+  textureDimensions_dc7798(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<uint, access::sample> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<uint, access::sample> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_dc7798(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d_array<uint, access::sample> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_dc7798(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/dc7798.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureDimensions/dc7798.wgsl.expected.spvasm
new file mode 100644
index 0000000..fbd3442
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/dc7798.wgsl.expected.spvasm
@@ -0,0 +1,79 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 41
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_dc7798 "textureDimensions_dc7798"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %v2int = OpTypeVector %int 2
+      %v3int = OpTypeVector %int 3
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_v2int = OpTypePointer Function %v2int
+         %26 = OpConstantNull %v2int
+         %27 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_dc7798 = OpFunction %void None %13
+         %16 = OpLabel
+        %res = OpVariable %_ptr_Function_v2int Function %26
+         %22 = OpLoad %11 %arg_0
+         %20 = OpImageQuerySizeLod %v3int %22 %uint_1
+         %17 = OpVectorShuffle %v2int %20 %20 0 1
+               OpStore %res %17
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %27
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %textureDimensions_dc7798
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %32 = OpLabel
+         %33 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %33
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %textureDimensions_dc7798
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %39 = OpLabel
+         %40 = OpFunctionCall %void %textureDimensions_dc7798
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureDimensions/dc7798.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureDimensions/dc7798.wgsl.expected.wgsl
new file mode 100644
index 0000000..14e5b16
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/dc7798.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_2d_array<u32>;
+
+fn textureDimensions_dc7798() {
+  var res : vec2<i32> = textureDimensions(arg_0, 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_dc7798();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_dc7798();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_dc7798();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/e17db8.wgsl b/test/tint/builtins/gen/literal/textureDimensions/e17db8.wgsl
new file mode 100644
index 0000000..deca2cb
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/e17db8.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_cube_array<u32>;
+
+// fn textureDimensions(texture: texture_cube_array<u32>, level: u32) -> vec2<i32>
+fn textureDimensions_e17db8() {
+  var res: vec2<i32> = textureDimensions(arg_0, 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_e17db8();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_e17db8();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_e17db8();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/e17db8.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/e17db8.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..5012db7
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/e17db8.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+TextureCubeArray<uint4> arg_0 : register(t0, space1);
+
+void textureDimensions_e17db8() {
+  int4 tint_tmp;
+  arg_0.GetDimensions(1u, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
+  int2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_e17db8();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_e17db8();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_e17db8();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/e17db8.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/e17db8.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..5012db7
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/e17db8.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+TextureCubeArray<uint4> arg_0 : register(t0, space1);
+
+void textureDimensions_e17db8() {
+  int4 tint_tmp;
+  arg_0.GetDimensions(1u, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
+  int2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_e17db8();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_e17db8();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_e17db8();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/e17db8.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureDimensions/e17db8.wgsl.expected.glsl
new file mode 100644
index 0000000..f97ce9b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/e17db8.wgsl.expected.glsl
@@ -0,0 +1,75 @@
+SKIP: FAILED
+
+#version 310 es
+
+uniform highp usamplerCubeArray arg_0_1;
+void textureDimensions_e17db8() {
+  ivec2 res = textureSize(arg_0_1, int(1u)).xy;
+}
+
+vec4 vertex_main() {
+  textureDimensions_e17db8();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'usamplerCubeArray' : Reserved word. 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+uniform highp usamplerCubeArray arg_0_1;
+void textureDimensions_e17db8() {
+  ivec2 res = textureSize(arg_0_1, int(1u)).xy;
+}
+
+void fragment_main() {
+  textureDimensions_e17db8();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'usamplerCubeArray' : Reserved word. 
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+uniform highp usamplerCubeArray arg_0_1;
+void textureDimensions_e17db8() {
+  ivec2 res = textureSize(arg_0_1, int(1u)).xy;
+}
+
+void compute_main() {
+  textureDimensions_e17db8();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'usamplerCubeArray' : Reserved word. 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/e17db8.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureDimensions/e17db8.wgsl.expected.msl
new file mode 100644
index 0000000..a823db1
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/e17db8.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_e17db8(texturecube_array<uint, access::sample> tint_symbol_1) {
+  int2 res = int2(tint_symbol_1.get_width(1u), tint_symbol_1.get_height(1u));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texturecube_array<uint, access::sample> tint_symbol_2) {
+  textureDimensions_e17db8(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texturecube_array<uint, access::sample> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texturecube_array<uint, access::sample> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_e17db8(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texturecube_array<uint, access::sample> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_e17db8(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/e17db8.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureDimensions/e17db8.wgsl.expected.spvasm
new file mode 100644
index 0000000..07a61ee
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/e17db8.wgsl.expected.spvasm
@@ -0,0 +1,80 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 41
+; Schema: 0
+               OpCapability Shader
+               OpCapability SampledCubeArray
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_e17db8 "textureDimensions_e17db8"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint Cube 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %v2int = OpTypeVector %int 2
+      %v3int = OpTypeVector %int 3
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_v2int = OpTypePointer Function %v2int
+         %26 = OpConstantNull %v2int
+         %27 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_e17db8 = OpFunction %void None %13
+         %16 = OpLabel
+        %res = OpVariable %_ptr_Function_v2int Function %26
+         %22 = OpLoad %11 %arg_0
+         %20 = OpImageQuerySizeLod %v3int %22 %uint_1
+         %17 = OpVectorShuffle %v2int %20 %20 0 1
+               OpStore %res %17
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %27
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %textureDimensions_e17db8
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %32 = OpLabel
+         %33 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %33
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %textureDimensions_e17db8
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %39 = OpLabel
+         %40 = OpFunctionCall %void %textureDimensions_e17db8
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureDimensions/e17db8.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureDimensions/e17db8.wgsl.expected.wgsl
new file mode 100644
index 0000000..ed7d8d3
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/e17db8.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_cube_array<u32>;
+
+fn textureDimensions_e17db8() {
+  var res : vec2<i32> = textureDimensions(arg_0, 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_e17db8();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_e17db8();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_e17db8();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/f32242.wgsl b/test/tint/builtins/gen/literal/textureDimensions/f32242.wgsl
new file mode 100644
index 0000000..dfee32c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/f32242.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_3d<u32>;
+
+// fn textureDimensions(texture: texture_3d<u32>, level: u32) -> vec3<i32>
+fn textureDimensions_f32242() {
+  var res: vec3<i32> = textureDimensions(arg_0, 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_f32242();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_f32242();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_f32242();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/f32242.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/f32242.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..c90e9c1
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/f32242.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture3D<uint4> arg_0 : register(t0, space1);
+
+void textureDimensions_f32242() {
+  int4 tint_tmp;
+  arg_0.GetDimensions(1u, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
+  int3 res = tint_tmp.xyz;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_f32242();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_f32242();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_f32242();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/f32242.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/f32242.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..c90e9c1
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/f32242.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture3D<uint4> arg_0 : register(t0, space1);
+
+void textureDimensions_f32242() {
+  int4 tint_tmp;
+  arg_0.GetDimensions(1u, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
+  int3 res = tint_tmp.xyz;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_f32242();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_f32242();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_f32242();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/f32242.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureDimensions/f32242.wgsl.expected.glsl
new file mode 100644
index 0000000..67a1990
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/f32242.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+uniform highp usampler3D arg_0_1;
+void textureDimensions_f32242() {
+  ivec3 res = textureSize(arg_0_1, int(1u));
+}
+
+vec4 vertex_main() {
+  textureDimensions_f32242();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp usampler3D arg_0_1;
+void textureDimensions_f32242() {
+  ivec3 res = textureSize(arg_0_1, int(1u));
+}
+
+void fragment_main() {
+  textureDimensions_f32242();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp usampler3D arg_0_1;
+void textureDimensions_f32242() {
+  ivec3 res = textureSize(arg_0_1, int(1u));
+}
+
+void compute_main() {
+  textureDimensions_f32242();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/f32242.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureDimensions/f32242.wgsl.expected.msl
new file mode 100644
index 0000000..fa7482b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/f32242.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_f32242(texture3d<uint, access::sample> tint_symbol_1) {
+  int3 res = int3(tint_symbol_1.get_width(1u), tint_symbol_1.get_height(1u), tint_symbol_1.get_depth(1u));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<uint, access::sample> tint_symbol_2) {
+  textureDimensions_f32242(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<uint, access::sample> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture3d<uint, access::sample> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_f32242(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture3d<uint, access::sample> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_f32242(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/f32242.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureDimensions/f32242.wgsl.expected.spvasm
new file mode 100644
index 0000000..21d3c38
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/f32242.wgsl.expected.spvasm
@@ -0,0 +1,77 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 39
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_f32242 "textureDimensions_f32242"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 3D 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %v3int = OpTypeVector %int 3
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_v3int = OpTypePointer Function %v3int
+         %24 = OpConstantNull %v3int
+         %25 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_f32242 = OpFunction %void None %13
+         %16 = OpLabel
+        %res = OpVariable %_ptr_Function_v3int Function %24
+         %20 = OpLoad %11 %arg_0
+         %17 = OpImageQuerySizeLod %v3int %20 %uint_1
+               OpStore %res %17
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %25
+         %27 = OpLabel
+         %28 = OpFunctionCall %void %textureDimensions_f32242
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %30 = OpLabel
+         %31 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %31
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %textureDimensions_f32242
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %37 = OpLabel
+         %38 = OpFunctionCall %void %textureDimensions_f32242
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureDimensions/f32242.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureDimensions/f32242.wgsl.expected.wgsl
new file mode 100644
index 0000000..cfe186d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/f32242.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_3d<u32>;
+
+fn textureDimensions_f32242() {
+  var res : vec3<i32> = textureDimensions(arg_0, 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_f32242();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_f32242();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_f32242();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/fbdfb6.wgsl b/test/tint/builtins/gen/literal/textureDimensions/fbdfb6.wgsl
new file mode 100644
index 0000000..87397ec
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/fbdfb6.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_3d<f32>;
+
+// fn textureDimensions(texture: texture_3d<f32>, level: u32) -> vec3<i32>
+fn textureDimensions_fbdfb6() {
+  var res: vec3<i32> = textureDimensions(arg_0, 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_fbdfb6();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_fbdfb6();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_fbdfb6();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/fbdfb6.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/fbdfb6.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..9ea42e4
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/fbdfb6.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture3D<float4> arg_0 : register(t0, space1);
+
+void textureDimensions_fbdfb6() {
+  int4 tint_tmp;
+  arg_0.GetDimensions(1u, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
+  int3 res = tint_tmp.xyz;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_fbdfb6();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_fbdfb6();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_fbdfb6();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/fbdfb6.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/fbdfb6.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..9ea42e4
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/fbdfb6.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture3D<float4> arg_0 : register(t0, space1);
+
+void textureDimensions_fbdfb6() {
+  int4 tint_tmp;
+  arg_0.GetDimensions(1u, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
+  int3 res = tint_tmp.xyz;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_fbdfb6();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_fbdfb6();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_fbdfb6();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/fbdfb6.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureDimensions/fbdfb6.wgsl.expected.glsl
new file mode 100644
index 0000000..ca657c6
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/fbdfb6.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+uniform highp sampler3D arg_0_1;
+void textureDimensions_fbdfb6() {
+  ivec3 res = textureSize(arg_0_1, int(1u));
+}
+
+vec4 vertex_main() {
+  textureDimensions_fbdfb6();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp sampler3D arg_0_1;
+void textureDimensions_fbdfb6() {
+  ivec3 res = textureSize(arg_0_1, int(1u));
+}
+
+void fragment_main() {
+  textureDimensions_fbdfb6();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp sampler3D arg_0_1;
+void textureDimensions_fbdfb6() {
+  ivec3 res = textureSize(arg_0_1, int(1u));
+}
+
+void compute_main() {
+  textureDimensions_fbdfb6();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/fbdfb6.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureDimensions/fbdfb6.wgsl.expected.msl
new file mode 100644
index 0000000..4b1a68f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/fbdfb6.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_fbdfb6(texture3d<float, access::sample> tint_symbol_1) {
+  int3 res = int3(tint_symbol_1.get_width(1u), tint_symbol_1.get_height(1u), tint_symbol_1.get_depth(1u));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<float, access::sample> tint_symbol_2) {
+  textureDimensions_fbdfb6(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<float, access::sample> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture3d<float, access::sample> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_fbdfb6(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture3d<float, access::sample> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_fbdfb6(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/fbdfb6.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureDimensions/fbdfb6.wgsl.expected.spvasm
new file mode 100644
index 0000000..32f2237
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/fbdfb6.wgsl.expected.spvasm
@@ -0,0 +1,77 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 39
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_fbdfb6 "textureDimensions_fbdfb6"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 3D 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %12 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %v3int = OpTypeVector %int 3
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_v3int = OpTypePointer Function %v3int
+         %24 = OpConstantNull %v3int
+         %25 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_fbdfb6 = OpFunction %void None %12
+         %15 = OpLabel
+        %res = OpVariable %_ptr_Function_v3int Function %24
+         %19 = OpLoad %11 %arg_0
+         %16 = OpImageQuerySizeLod %v3int %19 %uint_1
+               OpStore %res %16
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %25
+         %27 = OpLabel
+         %28 = OpFunctionCall %void %textureDimensions_fbdfb6
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+         %30 = OpLabel
+         %31 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %31
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %textureDimensions_fbdfb6
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %12
+         %37 = OpLabel
+         %38 = OpFunctionCall %void %textureDimensions_fbdfb6
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureDimensions/fbdfb6.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureDimensions/fbdfb6.wgsl.expected.wgsl
new file mode 100644
index 0000000..91ba137
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/fbdfb6.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_3d<f32>;
+
+fn textureDimensions_fbdfb6() {
+  var res : vec3<i32> = textureDimensions(arg_0, 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_fbdfb6();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_fbdfb6();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_fbdfb6();
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/0166ec.wgsl b/test/tint/builtins/gen/literal/textureGather/0166ec.wgsl
new file mode 100644
index 0000000..43f2d69
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/0166ec.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(1) var arg_1: texture_cube<i32>;
+@group(1) @binding(2) var arg_2: sampler;
+
+// fn textureGather(@const component: u32, texture: texture_cube<i32>, sampler: sampler, coords: vec3<f32>) -> vec4<i32>
+fn textureGather_0166ec() {
+  var res: vec4<i32> = textureGather(1u, arg_1, arg_2, vec3<f32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGather_0166ec();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureGather_0166ec();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureGather_0166ec();
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/0166ec.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/0166ec.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..d830838
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/0166ec.wgsl.expected.dxc.hlsl
@@ -0,0 +1,33 @@
+TextureCube<int4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_0166ec() {
+  int4 res = arg_1.GatherGreen(arg_2, (0.0f).xxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureGather_0166ec();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureGather_0166ec();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureGather_0166ec();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/0166ec.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/0166ec.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..d830838
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/0166ec.wgsl.expected.fxc.hlsl
@@ -0,0 +1,33 @@
+TextureCube<int4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_0166ec() {
+  int4 res = arg_1.GatherGreen(arg_2, (0.0f).xxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureGather_0166ec();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureGather_0166ec();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureGather_0166ec();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/0166ec.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGather/0166ec.wgsl.expected.glsl
new file mode 100644
index 0000000..4c7cbf8
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/0166ec.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+
+uniform highp isamplerCube arg_1_arg_2;
+
+void textureGather_0166ec() {
+  ivec4 res = textureGather(arg_1_arg_2, vec3(0.0f), int(1u));
+}
+
+vec4 vertex_main() {
+  textureGather_0166ec();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp isamplerCube arg_1_arg_2;
+
+void textureGather_0166ec() {
+  ivec4 res = textureGather(arg_1_arg_2, vec3(0.0f), int(1u));
+}
+
+void fragment_main() {
+  textureGather_0166ec();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp isamplerCube arg_1_arg_2;
+
+void textureGather_0166ec() {
+  ivec4 res = textureGather(arg_1_arg_2, vec3(0.0f), int(1u));
+}
+
+void compute_main() {
+  textureGather_0166ec();
+}
+
+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/textureGather/0166ec.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/0166ec.wgsl.expected.msl
new file mode 100644
index 0000000..71d1318
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/0166ec.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureGather_0166ec(texturecube<int, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+  int4 res = tint_symbol_1.gather(tint_symbol_2, float3(0.0f), component::y);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texturecube<int, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+  textureGather_0166ec(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texturecube<int, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texturecube<int, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+  textureGather_0166ec(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texturecube<int, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+  textureGather_0166ec(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureGather/0166ec.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/0166ec.wgsl.expected.spvasm
new file mode 100644
index 0000000..0604de6
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/0166ec.wgsl.expected.spvasm
@@ -0,0 +1,87 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 47
+; 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_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %textureGather_0166ec "textureGather_0166ec"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_1 DescriptorSet 1
+               OpDecorate %arg_1 Binding 1
+               OpDecorate %arg_2 DescriptorSet 1
+               OpDecorate %arg_2 Binding 2
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int Cube 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_1 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+         %15 = OpTypeSampler
+%_ptr_UniformConstant_15 = OpTypePointer UniformConstant %15
+      %arg_2 = OpVariable %_ptr_UniformConstant_15 UniformConstant
+       %void = OpTypeVoid
+         %16 = OpTypeFunction %void
+      %v4int = OpTypeVector %int 4
+         %24 = OpTypeSampledImage %11
+    %v3float = OpTypeVector %float 3
+         %27 = OpConstantNull %v3float
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+         %32 = OpConstantNull %v4int
+         %33 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureGather_0166ec = OpFunction %void None %16
+         %19 = OpLabel
+        %res = OpVariable %_ptr_Function_v4int Function %32
+         %22 = OpLoad %15 %arg_2
+         %23 = OpLoad %11 %arg_1
+         %25 = OpSampledImage %24 %23 %22
+         %20 = OpImageGather %v4int %25 %27 %uint_1
+               OpStore %res %20
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %33
+         %35 = OpLabel
+         %36 = OpFunctionCall %void %textureGather_0166ec
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %16
+         %38 = OpLabel
+         %39 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %39
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %16
+         %42 = OpLabel
+         %43 = OpFunctionCall %void %textureGather_0166ec
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %16
+         %45 = OpLabel
+         %46 = OpFunctionCall %void %textureGather_0166ec
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureGather/0166ec.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/0166ec.wgsl.expected.wgsl
new file mode 100644
index 0000000..0ed3403
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/0166ec.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(1) var arg_1 : texture_cube<i32>;
+
+@group(1) @binding(2) var arg_2 : sampler;
+
+fn textureGather_0166ec() {
+  var res : vec4<i32> = textureGather(1u, arg_1, arg_2, vec3<f32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGather_0166ec();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureGather_0166ec();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureGather_0166ec();
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/04fa78.wgsl b/test/tint/builtins/gen/literal/textureGather/04fa78.wgsl
new file mode 100644
index 0000000..fa8bb16
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/04fa78.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(1) var arg_1: texture_cube_array<i32>;
+@group(1) @binding(2) var arg_2: sampler;
+
+// fn textureGather(@const component: u32, texture: texture_cube_array<i32>, sampler: sampler, coords: vec3<f32>, array_index: u32) -> vec4<i32>
+fn textureGather_04fa78() {
+  var res: vec4<i32> = textureGather(1u, arg_1, arg_2, vec3<f32>(), 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGather_04fa78();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureGather_04fa78();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureGather_04fa78();
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/04fa78.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/04fa78.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..ab6b555
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/04fa78.wgsl.expected.dxc.hlsl
@@ -0,0 +1,33 @@
+TextureCubeArray<int4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_04fa78() {
+  int4 res = arg_1.GatherGreen(arg_2, float4(0.0f, 0.0f, 0.0f, float(1u)));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureGather_04fa78();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureGather_04fa78();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureGather_04fa78();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/04fa78.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/04fa78.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..ab6b555
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/04fa78.wgsl.expected.fxc.hlsl
@@ -0,0 +1,33 @@
+TextureCubeArray<int4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_04fa78() {
+  int4 res = arg_1.GatherGreen(arg_2, float4(0.0f, 0.0f, 0.0f, float(1u)));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureGather_04fa78();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureGather_04fa78();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureGather_04fa78();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/04fa78.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGather/04fa78.wgsl.expected.glsl
new file mode 100644
index 0000000..e7ccd0b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/04fa78.wgsl.expected.glsl
@@ -0,0 +1,78 @@
+SKIP: FAILED
+
+#version 310 es
+
+uniform highp isamplerCubeArray arg_1_arg_2;
+
+void textureGather_04fa78() {
+  ivec4 res = textureGather(arg_1_arg_2, vec4(0.0f, 0.0f, 0.0f, float(1u)), int(1u));
+}
+
+vec4 vertex_main() {
+  textureGather_04fa78();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'isamplerCubeArray' : Reserved word. 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+uniform highp isamplerCubeArray arg_1_arg_2;
+
+void textureGather_04fa78() {
+  ivec4 res = textureGather(arg_1_arg_2, vec4(0.0f, 0.0f, 0.0f, float(1u)), int(1u));
+}
+
+void fragment_main() {
+  textureGather_04fa78();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'isamplerCubeArray' : Reserved word. 
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+uniform highp isamplerCubeArray arg_1_arg_2;
+
+void textureGather_04fa78() {
+  ivec4 res = textureGather(arg_1_arg_2, vec4(0.0f, 0.0f, 0.0f, float(1u)), int(1u));
+}
+
+void compute_main() {
+  textureGather_04fa78();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'isamplerCubeArray' : Reserved word. 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureGather/04fa78.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/04fa78.wgsl.expected.msl
new file mode 100644
index 0000000..567f692
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/04fa78.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureGather_04fa78(texturecube_array<int, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+  int4 res = tint_symbol_1.gather(tint_symbol_2, float3(0.0f), 1u, component::y);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texturecube_array<int, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+  textureGather_04fa78(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texturecube_array<int, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texturecube_array<int, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+  textureGather_04fa78(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texturecube_array<int, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+  textureGather_04fa78(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureGather/04fa78.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/04fa78.wgsl.expected.spvasm
new file mode 100644
index 0000000..ea71a5e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/04fa78.wgsl.expected.spvasm
@@ -0,0 +1,89 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 48
+; Schema: 0
+               OpCapability Shader
+               OpCapability SampledCubeArray
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %textureGather_04fa78 "textureGather_04fa78"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_1 DescriptorSet 1
+               OpDecorate %arg_1 Binding 1
+               OpDecorate %arg_2 DescriptorSet 1
+               OpDecorate %arg_2 Binding 2
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int Cube 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_1 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+         %15 = OpTypeSampler
+%_ptr_UniformConstant_15 = OpTypePointer UniformConstant %15
+      %arg_2 = OpVariable %_ptr_UniformConstant_15 UniformConstant
+       %void = OpTypeVoid
+         %16 = OpTypeFunction %void
+      %v4int = OpTypeVector %int 4
+         %24 = OpTypeSampledImage %11
+    %float_0 = OpConstant %float 0
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+         %33 = OpConstantNull %v4int
+         %34 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureGather_04fa78 = OpFunction %void None %16
+         %19 = OpLabel
+        %res = OpVariable %_ptr_Function_v4int Function %33
+         %22 = OpLoad %15 %arg_2
+         %23 = OpLoad %11 %arg_1
+         %25 = OpSampledImage %24 %23 %22
+         %27 = OpConvertUToF %float %uint_1
+         %30 = OpCompositeConstruct %v4float %float_0 %float_0 %float_0 %27
+         %20 = OpImageGather %v4int %25 %30 %uint_1
+               OpStore %res %20
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %34
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %textureGather_04fa78
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %16
+         %39 = OpLabel
+         %40 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %40
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %16
+         %43 = OpLabel
+         %44 = OpFunctionCall %void %textureGather_04fa78
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %16
+         %46 = OpLabel
+         %47 = OpFunctionCall %void %textureGather_04fa78
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureGather/04fa78.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/04fa78.wgsl.expected.wgsl
new file mode 100644
index 0000000..4d93ff5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/04fa78.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(1) var arg_1 : texture_cube_array<i32>;
+
+@group(1) @binding(2) var arg_2 : sampler;
+
+fn textureGather_04fa78() {
+  var res : vec4<i32> = textureGather(1u, arg_1, arg_2, vec3<f32>(), 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGather_04fa78();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureGather_04fa78();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureGather_04fa78();
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/11b2db.wgsl b/test/tint/builtins/gen/literal/textureGather/11b2db.wgsl
new file mode 100644
index 0000000..91d42e6
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/11b2db.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(1) var arg_1: texture_cube<f32>;
+@group(1) @binding(2) var arg_2: sampler;
+
+// fn textureGather(@const component: u32, texture: texture_cube<f32>, sampler: sampler, coords: vec3<f32>) -> vec4<f32>
+fn textureGather_11b2db() {
+  var res: vec4<f32> = textureGather(1u, arg_1, arg_2, vec3<f32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGather_11b2db();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureGather_11b2db();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureGather_11b2db();
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/11b2db.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/11b2db.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..2a83a5c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/11b2db.wgsl.expected.dxc.hlsl
@@ -0,0 +1,33 @@
+TextureCube<float4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_11b2db() {
+  float4 res = arg_1.GatherGreen(arg_2, (0.0f).xxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureGather_11b2db();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureGather_11b2db();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureGather_11b2db();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/11b2db.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/11b2db.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..2a83a5c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/11b2db.wgsl.expected.fxc.hlsl
@@ -0,0 +1,33 @@
+TextureCube<float4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_11b2db() {
+  float4 res = arg_1.GatherGreen(arg_2, (0.0f).xxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureGather_11b2db();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureGather_11b2db();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureGather_11b2db();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/11b2db.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGather/11b2db.wgsl.expected.glsl
new file mode 100644
index 0000000..9e24c71
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/11b2db.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+
+uniform highp samplerCube arg_1_arg_2;
+
+void textureGather_11b2db() {
+  vec4 res = textureGather(arg_1_arg_2, vec3(0.0f), int(1u));
+}
+
+vec4 vertex_main() {
+  textureGather_11b2db();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp samplerCube arg_1_arg_2;
+
+void textureGather_11b2db() {
+  vec4 res = textureGather(arg_1_arg_2, vec3(0.0f), int(1u));
+}
+
+void fragment_main() {
+  textureGather_11b2db();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp samplerCube arg_1_arg_2;
+
+void textureGather_11b2db() {
+  vec4 res = textureGather(arg_1_arg_2, vec3(0.0f), int(1u));
+}
+
+void compute_main() {
+  textureGather_11b2db();
+}
+
+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/textureGather/11b2db.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/11b2db.wgsl.expected.msl
new file mode 100644
index 0000000..759ae4a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/11b2db.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureGather_11b2db(texturecube<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+  float4 res = tint_symbol_1.gather(tint_symbol_2, float3(0.0f), component::y);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texturecube<float, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+  textureGather_11b2db(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texturecube<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texturecube<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+  textureGather_11b2db(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texturecube<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+  textureGather_11b2db(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureGather/11b2db.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/11b2db.wgsl.expected.spvasm
new file mode 100644
index 0000000..2a4f5dd
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/11b2db.wgsl.expected.spvasm
@@ -0,0 +1,84 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 44
+; 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_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %textureGather_11b2db "textureGather_11b2db"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_1 DescriptorSet 1
+               OpDecorate %arg_1 Binding 1
+               OpDecorate %arg_2 DescriptorSet 1
+               OpDecorate %arg_2 Binding 2
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float Cube 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_1 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+         %14 = OpTypeSampler
+%_ptr_UniformConstant_14 = OpTypePointer UniformConstant %14
+      %arg_2 = OpVariable %_ptr_UniformConstant_14 UniformConstant
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+         %22 = OpTypeSampledImage %11
+    %v3float = OpTypeVector %float 3
+         %25 = OpConstantNull %v3float
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+         %30 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureGather_11b2db = OpFunction %void None %15
+         %18 = OpLabel
+        %res = OpVariable %_ptr_Function_v4float Function %5
+         %20 = OpLoad %14 %arg_2
+         %21 = OpLoad %11 %arg_1
+         %23 = OpSampledImage %22 %21 %20
+         %19 = OpImageGather %v4float %23 %25 %uint_1
+               OpStore %res %19
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %30
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %textureGather_11b2db
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %35 = OpLabel
+         %36 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %36
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %39 = OpLabel
+         %40 = OpFunctionCall %void %textureGather_11b2db
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %42 = OpLabel
+         %43 = OpFunctionCall %void %textureGather_11b2db
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureGather/11b2db.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/11b2db.wgsl.expected.wgsl
new file mode 100644
index 0000000..f4c60b3
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/11b2db.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(1) var arg_1 : texture_cube<f32>;
+
+@group(1) @binding(2) var arg_2 : sampler;
+
+fn textureGather_11b2db() {
+  var res : vec4<f32> = textureGather(1u, arg_1, arg_2, vec3<f32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGather_11b2db();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureGather_11b2db();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureGather_11b2db();
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/17baac.wgsl b/test/tint/builtins/gen/literal/textureGather/17baac.wgsl
new file mode 100644
index 0000000..6d12c78
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/17baac.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(1) var arg_1: texture_2d_array<f32>;
+@group(1) @binding(2) var arg_2: sampler;
+
+// fn textureGather(@const component: i32, texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: u32) -> vec4<f32>
+fn textureGather_17baac() {
+  var res: vec4<f32> = textureGather(1, arg_1, arg_2, vec2<f32>(), 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGather_17baac();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureGather_17baac();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureGather_17baac();
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/17baac.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/17baac.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..d61645c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/17baac.wgsl.expected.dxc.hlsl
@@ -0,0 +1,33 @@
+Texture2DArray<float4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_17baac() {
+  float4 res = arg_1.GatherGreen(arg_2, float3(0.0f, 0.0f, float(1u)));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureGather_17baac();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureGather_17baac();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureGather_17baac();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/17baac.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/17baac.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..d61645c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/17baac.wgsl.expected.fxc.hlsl
@@ -0,0 +1,33 @@
+Texture2DArray<float4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_17baac() {
+  float4 res = arg_1.GatherGreen(arg_2, float3(0.0f, 0.0f, float(1u)));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureGather_17baac();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureGather_17baac();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureGather_17baac();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/17baac.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGather/17baac.wgsl.expected.glsl
new file mode 100644
index 0000000..25e22eb
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/17baac.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+
+uniform highp sampler2DArray arg_1_arg_2;
+
+void textureGather_17baac() {
+  vec4 res = textureGather(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), int(1u));
+}
+
+vec4 vertex_main() {
+  textureGather_17baac();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2DArray arg_1_arg_2;
+
+void textureGather_17baac() {
+  vec4 res = textureGather(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), int(1u));
+}
+
+void fragment_main() {
+  textureGather_17baac();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp sampler2DArray arg_1_arg_2;
+
+void textureGather_17baac() {
+  vec4 res = textureGather(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), int(1u));
+}
+
+void compute_main() {
+  textureGather_17baac();
+}
+
+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/textureGather/17baac.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/17baac.wgsl.expected.msl
new file mode 100644
index 0000000..5741331
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/17baac.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureGather_17baac(texture2d_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+  float4 res = tint_symbol_1.gather(tint_symbol_2, float2(0.0f), 1u, int2(0), component::y);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<float, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+  textureGather_17baac(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+  textureGather_17baac(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+  textureGather_17baac(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureGather/17baac.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/17baac.wgsl.expected.spvasm
new file mode 100644
index 0000000..3e3e581
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/17baac.wgsl.expected.spvasm
@@ -0,0 +1,86 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 46
+; 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_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %textureGather_17baac "textureGather_17baac"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_1 DescriptorSet 1
+               OpDecorate %arg_1 Binding 1
+               OpDecorate %arg_2 DescriptorSet 1
+               OpDecorate %arg_2 Binding 2
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_1 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+         %14 = OpTypeSampler
+%_ptr_UniformConstant_14 = OpTypePointer UniformConstant %14
+      %arg_2 = OpVariable %_ptr_UniformConstant_14 UniformConstant
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+         %22 = OpTypeSampledImage %11
+    %v3float = OpTypeVector %float 3
+    %float_0 = OpConstant %float 0
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+         %32 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureGather_17baac = OpFunction %void None %15
+         %18 = OpLabel
+        %res = OpVariable %_ptr_Function_v4float Function %5
+         %20 = OpLoad %14 %arg_2
+         %21 = OpLoad %11 %arg_1
+         %23 = OpSampledImage %22 %21 %20
+         %26 = OpConvertUToF %float %uint_1
+         %29 = OpCompositeConstruct %v3float %float_0 %float_0 %26
+         %19 = OpImageGather %v4float %23 %29 %uint_1
+               OpStore %res %19
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %32
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %textureGather_17baac
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %37 = OpLabel
+         %38 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %38
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %41 = OpLabel
+         %42 = OpFunctionCall %void %textureGather_17baac
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %44 = OpLabel
+         %45 = OpFunctionCall %void %textureGather_17baac
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureGather/17baac.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/17baac.wgsl.expected.wgsl
new file mode 100644
index 0000000..52cc99b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/17baac.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(1) var arg_1 : texture_2d_array<f32>;
+
+@group(1) @binding(2) var arg_2 : sampler;
+
+fn textureGather_17baac() {
+  var res : vec4<f32> = textureGather(1, arg_1, arg_2, vec2<f32>(), 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGather_17baac();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureGather_17baac();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureGather_17baac();
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/1bf0ab.wgsl b/test/tint/builtins/gen/literal/textureGather/1bf0ab.wgsl
new file mode 100644
index 0000000..f4d677f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/1bf0ab.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(1) var arg_1: texture_2d_array<u32>;
+@group(1) @binding(2) var arg_2: sampler;
+
+// fn textureGather(@const component: u32, texture: texture_2d_array<u32>, sampler: sampler, coords: vec2<f32>, array_index: u32) -> vec4<u32>
+fn textureGather_1bf0ab() {
+  var res: vec4<u32> = textureGather(1u, arg_1, arg_2, vec2<f32>(), 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGather_1bf0ab();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureGather_1bf0ab();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureGather_1bf0ab();
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/1bf0ab.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/1bf0ab.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..07ebb25
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/1bf0ab.wgsl.expected.dxc.hlsl
@@ -0,0 +1,33 @@
+Texture2DArray<uint4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_1bf0ab() {
+  uint4 res = arg_1.GatherGreen(arg_2, float3(0.0f, 0.0f, float(1u)));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureGather_1bf0ab();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureGather_1bf0ab();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureGather_1bf0ab();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/1bf0ab.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/1bf0ab.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..07ebb25
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/1bf0ab.wgsl.expected.fxc.hlsl
@@ -0,0 +1,33 @@
+Texture2DArray<uint4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_1bf0ab() {
+  uint4 res = arg_1.GatherGreen(arg_2, float3(0.0f, 0.0f, float(1u)));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureGather_1bf0ab();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureGather_1bf0ab();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureGather_1bf0ab();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/1bf0ab.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGather/1bf0ab.wgsl.expected.glsl
new file mode 100644
index 0000000..fa40fb1
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/1bf0ab.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+
+uniform highp usampler2DArray arg_1_arg_2;
+
+void textureGather_1bf0ab() {
+  uvec4 res = textureGather(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), int(1u));
+}
+
+vec4 vertex_main() {
+  textureGather_1bf0ab();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp usampler2DArray arg_1_arg_2;
+
+void textureGather_1bf0ab() {
+  uvec4 res = textureGather(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), int(1u));
+}
+
+void fragment_main() {
+  textureGather_1bf0ab();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp usampler2DArray arg_1_arg_2;
+
+void textureGather_1bf0ab() {
+  uvec4 res = textureGather(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), int(1u));
+}
+
+void compute_main() {
+  textureGather_1bf0ab();
+}
+
+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/textureGather/1bf0ab.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/1bf0ab.wgsl.expected.msl
new file mode 100644
index 0000000..8d68cea
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/1bf0ab.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureGather_1bf0ab(texture2d_array<uint, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+  uint4 res = tint_symbol_1.gather(tint_symbol_2, float2(0.0f), 1u, int2(0), component::y);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<uint, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+  textureGather_1bf0ab(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<uint, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<uint, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+  textureGather_1bf0ab(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<uint, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+  textureGather_1bf0ab(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureGather/1bf0ab.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/1bf0ab.wgsl.expected.spvasm
new file mode 100644
index 0000000..c3a739e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/1bf0ab.wgsl.expected.spvasm
@@ -0,0 +1,88 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 48
+; 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_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %textureGather_1bf0ab "textureGather_1bf0ab"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_1 DescriptorSet 1
+               OpDecorate %arg_1 Binding 1
+               OpDecorate %arg_2 DescriptorSet 1
+               OpDecorate %arg_2 Binding 2
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_1 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+         %15 = OpTypeSampler
+%_ptr_UniformConstant_15 = OpTypePointer UniformConstant %15
+      %arg_2 = OpVariable %_ptr_UniformConstant_15 UniformConstant
+       %void = OpTypeVoid
+         %16 = OpTypeFunction %void
+     %v4uint = OpTypeVector %uint 4
+         %24 = OpTypeSampledImage %11
+    %v3float = OpTypeVector %float 3
+    %float_0 = OpConstant %float 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+         %33 = OpConstantNull %v4uint
+         %34 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureGather_1bf0ab = OpFunction %void None %16
+         %19 = OpLabel
+        %res = OpVariable %_ptr_Function_v4uint Function %33
+         %22 = OpLoad %15 %arg_2
+         %23 = OpLoad %11 %arg_1
+         %25 = OpSampledImage %24 %23 %22
+         %28 = OpConvertUToF %float %uint_1
+         %30 = OpCompositeConstruct %v3float %float_0 %float_0 %28
+         %20 = OpImageGather %v4uint %25 %30 %uint_1
+               OpStore %res %20
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %34
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %textureGather_1bf0ab
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %16
+         %39 = OpLabel
+         %40 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %40
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %16
+         %43 = OpLabel
+         %44 = OpFunctionCall %void %textureGather_1bf0ab
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %16
+         %46 = OpLabel
+         %47 = OpFunctionCall %void %textureGather_1bf0ab
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureGather/1bf0ab.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/1bf0ab.wgsl.expected.wgsl
new file mode 100644
index 0000000..a909ade
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/1bf0ab.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(1) var arg_1 : texture_2d_array<u32>;
+
+@group(1) @binding(2) var arg_2 : sampler;
+
+fn textureGather_1bf0ab() {
+  var res : vec4<u32> = textureGather(1u, arg_1, arg_2, vec2<f32>(), 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGather_1bf0ab();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureGather_1bf0ab();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureGather_1bf0ab();
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/238ec4.wgsl b/test/tint/builtins/gen/literal/textureGather/238ec4.wgsl
new file mode 100644
index 0000000..8af9040
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/238ec4.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(1) var arg_1: texture_2d_array<f32>;
+@group(1) @binding(2) var arg_2: sampler;
+
+// fn textureGather(@const component: u32, texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: u32, @const offset: vec2<i32>) -> vec4<f32>
+fn textureGather_238ec4() {
+  var res: vec4<f32> = textureGather(1u, arg_1, arg_2, vec2<f32>(), 1u, vec2<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGather_238ec4();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureGather_238ec4();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureGather_238ec4();
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/238ec4.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/238ec4.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..5a96bad
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/238ec4.wgsl.expected.dxc.hlsl
@@ -0,0 +1,33 @@
+Texture2DArray<float4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_238ec4() {
+  float4 res = arg_1.GatherGreen(arg_2, float3(0.0f, 0.0f, float(1u)), (0).xx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureGather_238ec4();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureGather_238ec4();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureGather_238ec4();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/238ec4.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/238ec4.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..5a96bad
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/238ec4.wgsl.expected.fxc.hlsl
@@ -0,0 +1,33 @@
+Texture2DArray<float4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_238ec4() {
+  float4 res = arg_1.GatherGreen(arg_2, float3(0.0f, 0.0f, float(1u)), (0).xx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureGather_238ec4();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureGather_238ec4();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureGather_238ec4();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/238ec4.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGather/238ec4.wgsl.expected.glsl
new file mode 100644
index 0000000..43df0a4
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/238ec4.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+
+uniform highp sampler2DArray arg_1_arg_2;
+
+void textureGather_238ec4() {
+  vec4 res = textureGatherOffset(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), ivec2(0), int(1u));
+}
+
+vec4 vertex_main() {
+  textureGather_238ec4();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2DArray arg_1_arg_2;
+
+void textureGather_238ec4() {
+  vec4 res = textureGatherOffset(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), ivec2(0), int(1u));
+}
+
+void fragment_main() {
+  textureGather_238ec4();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp sampler2DArray arg_1_arg_2;
+
+void textureGather_238ec4() {
+  vec4 res = textureGatherOffset(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), ivec2(0), int(1u));
+}
+
+void compute_main() {
+  textureGather_238ec4();
+}
+
+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/textureGather/238ec4.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/238ec4.wgsl.expected.msl
new file mode 100644
index 0000000..32e3b88
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/238ec4.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureGather_238ec4(texture2d_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+  float4 res = tint_symbol_1.gather(tint_symbol_2, float2(0.0f), 1u, int2(0), component::y);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<float, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+  textureGather_238ec4(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+  textureGather_238ec4(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+  textureGather_238ec4(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureGather/238ec4.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/238ec4.wgsl.expected.spvasm
new file mode 100644
index 0000000..a637fed
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/238ec4.wgsl.expected.spvasm
@@ -0,0 +1,89 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 49
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %textureGather_238ec4 "textureGather_238ec4"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_1 DescriptorSet 1
+               OpDecorate %arg_1 Binding 1
+               OpDecorate %arg_2 DescriptorSet 1
+               OpDecorate %arg_2 Binding 2
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_1 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+         %14 = OpTypeSampler
+%_ptr_UniformConstant_14 = OpTypePointer UniformConstant %14
+      %arg_2 = OpVariable %_ptr_UniformConstant_14 UniformConstant
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+         %22 = OpTypeSampledImage %11
+    %v3float = OpTypeVector %float 3
+    %float_0 = OpConstant %float 0
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+        %int = OpTypeInt 32 1
+      %v2int = OpTypeVector %int 2
+         %32 = OpConstantNull %v2int
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+         %35 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureGather_238ec4 = OpFunction %void None %15
+         %18 = OpLabel
+        %res = OpVariable %_ptr_Function_v4float Function %5
+         %20 = OpLoad %14 %arg_2
+         %21 = OpLoad %11 %arg_1
+         %23 = OpSampledImage %22 %21 %20
+         %26 = OpConvertUToF %float %uint_1
+         %29 = OpCompositeConstruct %v3float %float_0 %float_0 %26
+         %19 = OpImageGather %v4float %23 %29 %uint_1 ConstOffset %32
+               OpStore %res %19
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %35
+         %37 = OpLabel
+         %38 = OpFunctionCall %void %textureGather_238ec4
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %40 = OpLabel
+         %41 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %41
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %44 = OpLabel
+         %45 = OpFunctionCall %void %textureGather_238ec4
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %47 = OpLabel
+         %48 = OpFunctionCall %void %textureGather_238ec4
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureGather/238ec4.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/238ec4.wgsl.expected.wgsl
new file mode 100644
index 0000000..37d0344
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/238ec4.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(1) var arg_1 : texture_2d_array<f32>;
+
+@group(1) @binding(2) var arg_2 : sampler;
+
+fn textureGather_238ec4() {
+  var res : vec4<f32> = textureGather(1u, arg_1, arg_2, vec2<f32>(), 1u, vec2<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGather_238ec4();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureGather_238ec4();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureGather_238ec4();
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/269250.wgsl b/test/tint/builtins/gen/literal/textureGather/269250.wgsl
new file mode 100644
index 0000000..38fb051
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/269250.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(1) var arg_1: texture_2d_array<i32>;
+@group(1) @binding(2) var arg_2: sampler;
+
+// fn textureGather(@const component: u32, texture: texture_2d_array<i32>, sampler: sampler, coords: vec2<f32>, array_index: u32) -> vec4<i32>
+fn textureGather_269250() {
+  var res: vec4<i32> = textureGather(1u, arg_1, arg_2, vec2<f32>(), 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGather_269250();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureGather_269250();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureGather_269250();
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/269250.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/269250.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..844cf71
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/269250.wgsl.expected.dxc.hlsl
@@ -0,0 +1,33 @@
+Texture2DArray<int4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_269250() {
+  int4 res = arg_1.GatherGreen(arg_2, float3(0.0f, 0.0f, float(1u)));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureGather_269250();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureGather_269250();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureGather_269250();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/269250.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/269250.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..844cf71
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/269250.wgsl.expected.fxc.hlsl
@@ -0,0 +1,33 @@
+Texture2DArray<int4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_269250() {
+  int4 res = arg_1.GatherGreen(arg_2, float3(0.0f, 0.0f, float(1u)));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureGather_269250();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureGather_269250();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureGather_269250();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/269250.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGather/269250.wgsl.expected.glsl
new file mode 100644
index 0000000..73f7dc6
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/269250.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+
+uniform highp isampler2DArray arg_1_arg_2;
+
+void textureGather_269250() {
+  ivec4 res = textureGather(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), int(1u));
+}
+
+vec4 vertex_main() {
+  textureGather_269250();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp isampler2DArray arg_1_arg_2;
+
+void textureGather_269250() {
+  ivec4 res = textureGather(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), int(1u));
+}
+
+void fragment_main() {
+  textureGather_269250();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp isampler2DArray arg_1_arg_2;
+
+void textureGather_269250() {
+  ivec4 res = textureGather(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), int(1u));
+}
+
+void compute_main() {
+  textureGather_269250();
+}
+
+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/textureGather/269250.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/269250.wgsl.expected.msl
new file mode 100644
index 0000000..d7c68bc
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/269250.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureGather_269250(texture2d_array<int, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+  int4 res = tint_symbol_1.gather(tint_symbol_2, float2(0.0f), 1u, int2(0), component::y);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<int, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+  textureGather_269250(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<int, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<int, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+  textureGather_269250(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<int, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+  textureGather_269250(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureGather/269250.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/269250.wgsl.expected.spvasm
new file mode 100644
index 0000000..f88bf30
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/269250.wgsl.expected.spvasm
@@ -0,0 +1,89 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 49
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %textureGather_269250 "textureGather_269250"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_1 DescriptorSet 1
+               OpDecorate %arg_1 Binding 1
+               OpDecorate %arg_2 DescriptorSet 1
+               OpDecorate %arg_2 Binding 2
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_1 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+         %15 = OpTypeSampler
+%_ptr_UniformConstant_15 = OpTypePointer UniformConstant %15
+      %arg_2 = OpVariable %_ptr_UniformConstant_15 UniformConstant
+       %void = OpTypeVoid
+         %16 = OpTypeFunction %void
+      %v4int = OpTypeVector %int 4
+         %24 = OpTypeSampledImage %11
+    %v3float = OpTypeVector %float 3
+    %float_0 = OpConstant %float 0
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+         %34 = OpConstantNull %v4int
+         %35 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureGather_269250 = OpFunction %void None %16
+         %19 = OpLabel
+        %res = OpVariable %_ptr_Function_v4int Function %34
+         %22 = OpLoad %15 %arg_2
+         %23 = OpLoad %11 %arg_1
+         %25 = OpSampledImage %24 %23 %22
+         %28 = OpConvertUToF %float %uint_1
+         %31 = OpCompositeConstruct %v3float %float_0 %float_0 %28
+         %20 = OpImageGather %v4int %25 %31 %uint_1
+               OpStore %res %20
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %35
+         %37 = OpLabel
+         %38 = OpFunctionCall %void %textureGather_269250
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %16
+         %40 = OpLabel
+         %41 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %41
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %16
+         %44 = OpLabel
+         %45 = OpFunctionCall %void %textureGather_269250
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %16
+         %47 = OpLabel
+         %48 = OpFunctionCall %void %textureGather_269250
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureGather/269250.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/269250.wgsl.expected.wgsl
new file mode 100644
index 0000000..7c75feb
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/269250.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(1) var arg_1 : texture_2d_array<i32>;
+
+@group(1) @binding(2) var arg_2 : sampler;
+
+fn textureGather_269250() {
+  var res : vec4<i32> = textureGather(1u, arg_1, arg_2, vec2<f32>(), 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGather_269250();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureGather_269250();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureGather_269250();
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/2a4f40.wgsl b/test/tint/builtins/gen/literal/textureGather/2a4f40.wgsl
new file mode 100644
index 0000000..99474a2
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/2a4f40.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_depth_2d_array;
+@group(1) @binding(1) var arg_1: sampler;
+
+// fn textureGather(texture: texture_depth_2d_array, sampler: sampler, coords: vec2<f32>, array_index: u32) -> vec4<f32>
+fn textureGather_2a4f40() {
+  var res: vec4<f32> = textureGather(arg_0, arg_1, vec2<f32>(), 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGather_2a4f40();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureGather_2a4f40();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureGather_2a4f40();
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/2a4f40.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/2a4f40.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..334a85f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/2a4f40.wgsl.expected.dxc.hlsl
@@ -0,0 +1,33 @@
+Texture2DArray arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureGather_2a4f40() {
+  float4 res = arg_0.Gather(arg_1, float3(0.0f, 0.0f, float(1u)));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureGather_2a4f40();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureGather_2a4f40();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureGather_2a4f40();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/2a4f40.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/2a4f40.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..334a85f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/2a4f40.wgsl.expected.fxc.hlsl
@@ -0,0 +1,33 @@
+Texture2DArray arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureGather_2a4f40() {
+  float4 res = arg_0.Gather(arg_1, float3(0.0f, 0.0f, float(1u)));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureGather_2a4f40();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureGather_2a4f40();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureGather_2a4f40();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/2a4f40.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGather/2a4f40.wgsl.expected.glsl
new file mode 100644
index 0000000..5e67696
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/2a4f40.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+
+uniform highp sampler2DArrayShadow arg_0_arg_1;
+
+void textureGather_2a4f40() {
+  vec4 res = textureGather(arg_0_arg_1, vec3(0.0f, 0.0f, float(1u)), 0.0);
+}
+
+vec4 vertex_main() {
+  textureGather_2a4f40();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2DArrayShadow arg_0_arg_1;
+
+void textureGather_2a4f40() {
+  vec4 res = textureGather(arg_0_arg_1, vec3(0.0f, 0.0f, float(1u)), 0.0);
+}
+
+void fragment_main() {
+  textureGather_2a4f40();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp sampler2DArrayShadow arg_0_arg_1;
+
+void textureGather_2a4f40() {
+  vec4 res = textureGather(arg_0_arg_1, vec3(0.0f, 0.0f, float(1u)), 0.0);
+}
+
+void compute_main() {
+  textureGather_2a4f40();
+}
+
+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/textureGather/2a4f40.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/2a4f40.wgsl.expected.msl
new file mode 100644
index 0000000..ac60335
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/2a4f40.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureGather_2a4f40(depth2d_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+  float4 res = tint_symbol_1.gather(tint_symbol_2, float2(0.0f), 1u);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(depth2d_array<float, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+  textureGather_2a4f40(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(depth2d_array<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(depth2d_array<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+  textureGather_2a4f40(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(depth2d_array<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+  textureGather_2a4f40(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureGather/2a4f40.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/2a4f40.wgsl.expected.spvasm
new file mode 100644
index 0000000..a6f0405
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/2a4f40.wgsl.expected.spvasm
@@ -0,0 +1,88 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 48
+; 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 %arg_1 "arg_1"
+               OpName %textureGather_2a4f40 "textureGather_2a4f40"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %arg_1 DescriptorSet 1
+               OpDecorate %arg_1 Binding 1
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+         %14 = OpTypeSampler
+%_ptr_UniformConstant_14 = OpTypePointer UniformConstant %14
+      %arg_1 = OpVariable %_ptr_UniformConstant_14 UniformConstant
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+         %22 = OpTypeSampledImage %11
+    %v3float = OpTypeVector %float 3
+    %float_0 = OpConstant %float 0
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+        %int = OpTypeInt 32 1
+      %int_0 = OpConstant %int 0
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+         %34 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureGather_2a4f40 = OpFunction %void None %15
+         %18 = OpLabel
+        %res = OpVariable %_ptr_Function_v4float Function %5
+         %20 = OpLoad %14 %arg_1
+         %21 = OpLoad %11 %arg_0
+         %23 = OpSampledImage %22 %21 %20
+         %26 = OpConvertUToF %float %uint_1
+         %29 = OpCompositeConstruct %v3float %float_0 %float_0 %26
+         %19 = OpImageGather %v4float %23 %29 %int_0
+               OpStore %res %19
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %34
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %textureGather_2a4f40
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %39 = OpLabel
+         %40 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %40
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %43 = OpLabel
+         %44 = OpFunctionCall %void %textureGather_2a4f40
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %46 = OpLabel
+         %47 = OpFunctionCall %void %textureGather_2a4f40
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureGather/2a4f40.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/2a4f40.wgsl.expected.wgsl
new file mode 100644
index 0000000..89388ed
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/2a4f40.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(0) var arg_0 : texture_depth_2d_array;
+
+@group(1) @binding(1) var arg_1 : sampler;
+
+fn textureGather_2a4f40() {
+  var res : vec4<f32> = textureGather(arg_0, arg_1, vec2<f32>(), 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGather_2a4f40();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureGather_2a4f40();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureGather_2a4f40();
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/4e8ac5.wgsl b/test/tint/builtins/gen/literal/textureGather/4e8ac5.wgsl
new file mode 100644
index 0000000..851446a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/4e8ac5.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(1) var arg_1: texture_2d_array<i32>;
+@group(1) @binding(2) var arg_2: sampler;
+
+// fn textureGather(@const component: i32, texture: texture_2d_array<i32>, sampler: sampler, coords: vec2<f32>, array_index: u32) -> vec4<i32>
+fn textureGather_4e8ac5() {
+  var res: vec4<i32> = textureGather(1, arg_1, arg_2, vec2<f32>(), 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGather_4e8ac5();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureGather_4e8ac5();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureGather_4e8ac5();
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/4e8ac5.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/4e8ac5.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..9c993bb
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/4e8ac5.wgsl.expected.dxc.hlsl
@@ -0,0 +1,33 @@
+Texture2DArray<int4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_4e8ac5() {
+  int4 res = arg_1.GatherGreen(arg_2, float3(0.0f, 0.0f, float(1u)));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureGather_4e8ac5();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureGather_4e8ac5();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureGather_4e8ac5();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/4e8ac5.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/4e8ac5.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..9c993bb
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/4e8ac5.wgsl.expected.fxc.hlsl
@@ -0,0 +1,33 @@
+Texture2DArray<int4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_4e8ac5() {
+  int4 res = arg_1.GatherGreen(arg_2, float3(0.0f, 0.0f, float(1u)));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureGather_4e8ac5();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureGather_4e8ac5();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureGather_4e8ac5();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/4e8ac5.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGather/4e8ac5.wgsl.expected.glsl
new file mode 100644
index 0000000..cc5ccde
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/4e8ac5.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+
+uniform highp isampler2DArray arg_1_arg_2;
+
+void textureGather_4e8ac5() {
+  ivec4 res = textureGather(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), int(1u));
+}
+
+vec4 vertex_main() {
+  textureGather_4e8ac5();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp isampler2DArray arg_1_arg_2;
+
+void textureGather_4e8ac5() {
+  ivec4 res = textureGather(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), int(1u));
+}
+
+void fragment_main() {
+  textureGather_4e8ac5();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp isampler2DArray arg_1_arg_2;
+
+void textureGather_4e8ac5() {
+  ivec4 res = textureGather(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), int(1u));
+}
+
+void compute_main() {
+  textureGather_4e8ac5();
+}
+
+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/textureGather/4e8ac5.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/4e8ac5.wgsl.expected.msl
new file mode 100644
index 0000000..41a55ca
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/4e8ac5.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureGather_4e8ac5(texture2d_array<int, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+  int4 res = tint_symbol_1.gather(tint_symbol_2, float2(0.0f), 1u, int2(0), component::y);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<int, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+  textureGather_4e8ac5(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<int, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<int, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+  textureGather_4e8ac5(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<int, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+  textureGather_4e8ac5(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureGather/4e8ac5.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/4e8ac5.wgsl.expected.spvasm
new file mode 100644
index 0000000..452ff4f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/4e8ac5.wgsl.expected.spvasm
@@ -0,0 +1,89 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 49
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %textureGather_4e8ac5 "textureGather_4e8ac5"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_1 DescriptorSet 1
+               OpDecorate %arg_1 Binding 1
+               OpDecorate %arg_2 DescriptorSet 1
+               OpDecorate %arg_2 Binding 2
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_1 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+         %15 = OpTypeSampler
+%_ptr_UniformConstant_15 = OpTypePointer UniformConstant %15
+      %arg_2 = OpVariable %_ptr_UniformConstant_15 UniformConstant
+       %void = OpTypeVoid
+         %16 = OpTypeFunction %void
+      %v4int = OpTypeVector %int 4
+         %24 = OpTypeSampledImage %11
+    %v3float = OpTypeVector %float 3
+    %float_0 = OpConstant %float 0
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+         %34 = OpConstantNull %v4int
+         %35 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureGather_4e8ac5 = OpFunction %void None %16
+         %19 = OpLabel
+        %res = OpVariable %_ptr_Function_v4int Function %34
+         %22 = OpLoad %15 %arg_2
+         %23 = OpLoad %11 %arg_1
+         %25 = OpSampledImage %24 %23 %22
+         %28 = OpConvertUToF %float %uint_1
+         %31 = OpCompositeConstruct %v3float %float_0 %float_0 %28
+         %20 = OpImageGather %v4int %25 %31 %uint_1
+               OpStore %res %20
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %35
+         %37 = OpLabel
+         %38 = OpFunctionCall %void %textureGather_4e8ac5
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %16
+         %40 = OpLabel
+         %41 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %41
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %16
+         %44 = OpLabel
+         %45 = OpFunctionCall %void %textureGather_4e8ac5
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %16
+         %47 = OpLabel
+         %48 = OpFunctionCall %void %textureGather_4e8ac5
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureGather/4e8ac5.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/4e8ac5.wgsl.expected.wgsl
new file mode 100644
index 0000000..650b75d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/4e8ac5.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(1) var arg_1 : texture_2d_array<i32>;
+
+@group(1) @binding(2) var arg_2 : sampler;
+
+fn textureGather_4e8ac5() {
+  var res : vec4<i32> = textureGather(1, arg_1, arg_2, vec2<f32>(), 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGather_4e8ac5();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureGather_4e8ac5();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureGather_4e8ac5();
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/59372a.wgsl b/test/tint/builtins/gen/literal/textureGather/59372a.wgsl
new file mode 100644
index 0000000..7655962
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/59372a.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(1) var arg_1: texture_2d_array<f32>;
+@group(1) @binding(2) var arg_2: sampler;
+
+// fn textureGather(@const component: i32, texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: u32, @const offset: vec2<i32>) -> vec4<f32>
+fn textureGather_59372a() {
+  var res: vec4<f32> = textureGather(1, arg_1, arg_2, vec2<f32>(), 1u, vec2<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGather_59372a();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureGather_59372a();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureGather_59372a();
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/59372a.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/59372a.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..677a356
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/59372a.wgsl.expected.dxc.hlsl
@@ -0,0 +1,33 @@
+Texture2DArray<float4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_59372a() {
+  float4 res = arg_1.GatherGreen(arg_2, float3(0.0f, 0.0f, float(1u)), (0).xx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureGather_59372a();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureGather_59372a();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureGather_59372a();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/59372a.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/59372a.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..677a356
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/59372a.wgsl.expected.fxc.hlsl
@@ -0,0 +1,33 @@
+Texture2DArray<float4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_59372a() {
+  float4 res = arg_1.GatherGreen(arg_2, float3(0.0f, 0.0f, float(1u)), (0).xx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureGather_59372a();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureGather_59372a();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureGather_59372a();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/59372a.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGather/59372a.wgsl.expected.glsl
new file mode 100644
index 0000000..c6455a3
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/59372a.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+
+uniform highp sampler2DArray arg_1_arg_2;
+
+void textureGather_59372a() {
+  vec4 res = textureGatherOffset(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), ivec2(0), int(1u));
+}
+
+vec4 vertex_main() {
+  textureGather_59372a();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2DArray arg_1_arg_2;
+
+void textureGather_59372a() {
+  vec4 res = textureGatherOffset(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), ivec2(0), int(1u));
+}
+
+void fragment_main() {
+  textureGather_59372a();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp sampler2DArray arg_1_arg_2;
+
+void textureGather_59372a() {
+  vec4 res = textureGatherOffset(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), ivec2(0), int(1u));
+}
+
+void compute_main() {
+  textureGather_59372a();
+}
+
+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/textureGather/59372a.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/59372a.wgsl.expected.msl
new file mode 100644
index 0000000..13183a8
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/59372a.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureGather_59372a(texture2d_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+  float4 res = tint_symbol_1.gather(tint_symbol_2, float2(0.0f), 1u, int2(0), component::y);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<float, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+  textureGather_59372a(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+  textureGather_59372a(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+  textureGather_59372a(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureGather/59372a.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/59372a.wgsl.expected.spvasm
new file mode 100644
index 0000000..5aaf916
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/59372a.wgsl.expected.spvasm
@@ -0,0 +1,89 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 49
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %textureGather_59372a "textureGather_59372a"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_1 DescriptorSet 1
+               OpDecorate %arg_1 Binding 1
+               OpDecorate %arg_2 DescriptorSet 1
+               OpDecorate %arg_2 Binding 2
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_1 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+         %14 = OpTypeSampler
+%_ptr_UniformConstant_14 = OpTypePointer UniformConstant %14
+      %arg_2 = OpVariable %_ptr_UniformConstant_14 UniformConstant
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+         %22 = OpTypeSampledImage %11
+    %v3float = OpTypeVector %float 3
+    %float_0 = OpConstant %float 0
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+        %int = OpTypeInt 32 1
+      %v2int = OpTypeVector %int 2
+         %32 = OpConstantNull %v2int
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+         %35 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureGather_59372a = OpFunction %void None %15
+         %18 = OpLabel
+        %res = OpVariable %_ptr_Function_v4float Function %5
+         %20 = OpLoad %14 %arg_2
+         %21 = OpLoad %11 %arg_1
+         %23 = OpSampledImage %22 %21 %20
+         %26 = OpConvertUToF %float %uint_1
+         %29 = OpCompositeConstruct %v3float %float_0 %float_0 %26
+         %19 = OpImageGather %v4float %23 %29 %uint_1 ConstOffset %32
+               OpStore %res %19
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %35
+         %37 = OpLabel
+         %38 = OpFunctionCall %void %textureGather_59372a
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %40 = OpLabel
+         %41 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %41
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %44 = OpLabel
+         %45 = OpFunctionCall %void %textureGather_59372a
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %47 = OpLabel
+         %48 = OpFunctionCall %void %textureGather_59372a
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureGather/59372a.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/59372a.wgsl.expected.wgsl
new file mode 100644
index 0000000..ba0ecac
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/59372a.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(1) var arg_1 : texture_2d_array<f32>;
+
+@group(1) @binding(2) var arg_2 : sampler;
+
+fn textureGather_59372a() {
+  var res : vec4<f32> = textureGather(1, arg_1, arg_2, vec2<f32>(), 1u, vec2<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGather_59372a();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureGather_59372a();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureGather_59372a();
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/6b7b74.wgsl b/test/tint/builtins/gen/literal/textureGather/6b7b74.wgsl
new file mode 100644
index 0000000..e714724
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/6b7b74.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(1) var arg_1: texture_2d_array<u32>;
+@group(1) @binding(2) var arg_2: sampler;
+
+// fn textureGather(@const component: u32, texture: texture_2d_array<u32>, sampler: sampler, coords: vec2<f32>, array_index: u32, @const offset: vec2<i32>) -> vec4<u32>
+fn textureGather_6b7b74() {
+  var res: vec4<u32> = textureGather(1u, arg_1, arg_2, vec2<f32>(), 1u, vec2<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGather_6b7b74();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureGather_6b7b74();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureGather_6b7b74();
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/6b7b74.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/6b7b74.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..18c0977
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/6b7b74.wgsl.expected.dxc.hlsl
@@ -0,0 +1,33 @@
+Texture2DArray<uint4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_6b7b74() {
+  uint4 res = arg_1.GatherGreen(arg_2, float3(0.0f, 0.0f, float(1u)), (0).xx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureGather_6b7b74();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureGather_6b7b74();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureGather_6b7b74();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/6b7b74.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/6b7b74.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..18c0977
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/6b7b74.wgsl.expected.fxc.hlsl
@@ -0,0 +1,33 @@
+Texture2DArray<uint4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_6b7b74() {
+  uint4 res = arg_1.GatherGreen(arg_2, float3(0.0f, 0.0f, float(1u)), (0).xx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureGather_6b7b74();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureGather_6b7b74();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureGather_6b7b74();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/6b7b74.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGather/6b7b74.wgsl.expected.glsl
new file mode 100644
index 0000000..990088c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/6b7b74.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+
+uniform highp usampler2DArray arg_1_arg_2;
+
+void textureGather_6b7b74() {
+  uvec4 res = textureGatherOffset(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), ivec2(0), int(1u));
+}
+
+vec4 vertex_main() {
+  textureGather_6b7b74();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp usampler2DArray arg_1_arg_2;
+
+void textureGather_6b7b74() {
+  uvec4 res = textureGatherOffset(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), ivec2(0), int(1u));
+}
+
+void fragment_main() {
+  textureGather_6b7b74();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp usampler2DArray arg_1_arg_2;
+
+void textureGather_6b7b74() {
+  uvec4 res = textureGatherOffset(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), ivec2(0), int(1u));
+}
+
+void compute_main() {
+  textureGather_6b7b74();
+}
+
+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/textureGather/6b7b74.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/6b7b74.wgsl.expected.msl
new file mode 100644
index 0000000..21aefeb
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/6b7b74.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureGather_6b7b74(texture2d_array<uint, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+  uint4 res = tint_symbol_1.gather(tint_symbol_2, float2(0.0f), 1u, int2(0), component::y);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<uint, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+  textureGather_6b7b74(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<uint, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<uint, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+  textureGather_6b7b74(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<uint, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+  textureGather_6b7b74(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureGather/6b7b74.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/6b7b74.wgsl.expected.spvasm
new file mode 100644
index 0000000..7e7f3eb
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/6b7b74.wgsl.expected.spvasm
@@ -0,0 +1,91 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 51
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %textureGather_6b7b74 "textureGather_6b7b74"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_1 DescriptorSet 1
+               OpDecorate %arg_1 Binding 1
+               OpDecorate %arg_2 DescriptorSet 1
+               OpDecorate %arg_2 Binding 2
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_1 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+         %15 = OpTypeSampler
+%_ptr_UniformConstant_15 = OpTypePointer UniformConstant %15
+      %arg_2 = OpVariable %_ptr_UniformConstant_15 UniformConstant
+       %void = OpTypeVoid
+         %16 = OpTypeFunction %void
+     %v4uint = OpTypeVector %uint 4
+         %24 = OpTypeSampledImage %11
+    %v3float = OpTypeVector %float 3
+    %float_0 = OpConstant %float 0
+     %uint_1 = OpConstant %uint 1
+        %int = OpTypeInt 32 1
+      %v2int = OpTypeVector %int 2
+         %33 = OpConstantNull %v2int
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+         %36 = OpConstantNull %v4uint
+         %37 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureGather_6b7b74 = OpFunction %void None %16
+         %19 = OpLabel
+        %res = OpVariable %_ptr_Function_v4uint Function %36
+         %22 = OpLoad %15 %arg_2
+         %23 = OpLoad %11 %arg_1
+         %25 = OpSampledImage %24 %23 %22
+         %28 = OpConvertUToF %float %uint_1
+         %30 = OpCompositeConstruct %v3float %float_0 %float_0 %28
+         %20 = OpImageGather %v4uint %25 %30 %uint_1 ConstOffset %33
+               OpStore %res %20
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %37
+         %39 = OpLabel
+         %40 = OpFunctionCall %void %textureGather_6b7b74
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %16
+         %42 = OpLabel
+         %43 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %43
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %16
+         %46 = OpLabel
+         %47 = OpFunctionCall %void %textureGather_6b7b74
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %16
+         %49 = OpLabel
+         %50 = OpFunctionCall %void %textureGather_6b7b74
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureGather/6b7b74.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/6b7b74.wgsl.expected.wgsl
new file mode 100644
index 0000000..3cc5160
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/6b7b74.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(1) var arg_1 : texture_2d_array<u32>;
+
+@group(1) @binding(2) var arg_2 : sampler;
+
+fn textureGather_6b7b74() {
+  var res : vec4<u32> = textureGather(1u, arg_1, arg_2, vec2<f32>(), 1u, vec2<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGather_6b7b74();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureGather_6b7b74();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureGather_6b7b74();
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/788010.wgsl b/test/tint/builtins/gen/literal/textureGather/788010.wgsl
new file mode 100644
index 0000000..bec214c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/788010.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(1) var arg_1: texture_cube_array<i32>;
+@group(1) @binding(2) var arg_2: sampler;
+
+// fn textureGather(@const component: i32, texture: texture_cube_array<i32>, sampler: sampler, coords: vec3<f32>, array_index: u32) -> vec4<i32>
+fn textureGather_788010() {
+  var res: vec4<i32> = textureGather(1, arg_1, arg_2, vec3<f32>(), 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGather_788010();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureGather_788010();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureGather_788010();
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/788010.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/788010.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..daf38ed
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/788010.wgsl.expected.dxc.hlsl
@@ -0,0 +1,33 @@
+TextureCubeArray<int4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_788010() {
+  int4 res = arg_1.GatherGreen(arg_2, float4(0.0f, 0.0f, 0.0f, float(1u)));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureGather_788010();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureGather_788010();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureGather_788010();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/788010.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/788010.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..daf38ed
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/788010.wgsl.expected.fxc.hlsl
@@ -0,0 +1,33 @@
+TextureCubeArray<int4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_788010() {
+  int4 res = arg_1.GatherGreen(arg_2, float4(0.0f, 0.0f, 0.0f, float(1u)));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureGather_788010();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureGather_788010();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureGather_788010();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/788010.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGather/788010.wgsl.expected.glsl
new file mode 100644
index 0000000..9f39bc6
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/788010.wgsl.expected.glsl
@@ -0,0 +1,78 @@
+SKIP: FAILED
+
+#version 310 es
+
+uniform highp isamplerCubeArray arg_1_arg_2;
+
+void textureGather_788010() {
+  ivec4 res = textureGather(arg_1_arg_2, vec4(0.0f, 0.0f, 0.0f, float(1u)), int(1u));
+}
+
+vec4 vertex_main() {
+  textureGather_788010();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'isamplerCubeArray' : Reserved word. 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+uniform highp isamplerCubeArray arg_1_arg_2;
+
+void textureGather_788010() {
+  ivec4 res = textureGather(arg_1_arg_2, vec4(0.0f, 0.0f, 0.0f, float(1u)), int(1u));
+}
+
+void fragment_main() {
+  textureGather_788010();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'isamplerCubeArray' : Reserved word. 
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+uniform highp isamplerCubeArray arg_1_arg_2;
+
+void textureGather_788010() {
+  ivec4 res = textureGather(arg_1_arg_2, vec4(0.0f, 0.0f, 0.0f, float(1u)), int(1u));
+}
+
+void compute_main() {
+  textureGather_788010();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'isamplerCubeArray' : Reserved word. 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureGather/788010.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/788010.wgsl.expected.msl
new file mode 100644
index 0000000..92a80cf
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/788010.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureGather_788010(texturecube_array<int, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+  int4 res = tint_symbol_1.gather(tint_symbol_2, float3(0.0f), 1u, component::y);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texturecube_array<int, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+  textureGather_788010(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texturecube_array<int, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texturecube_array<int, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+  textureGather_788010(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texturecube_array<int, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+  textureGather_788010(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureGather/788010.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/788010.wgsl.expected.spvasm
new file mode 100644
index 0000000..420fdeb
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/788010.wgsl.expected.spvasm
@@ -0,0 +1,89 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 48
+; Schema: 0
+               OpCapability Shader
+               OpCapability SampledCubeArray
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %textureGather_788010 "textureGather_788010"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_1 DescriptorSet 1
+               OpDecorate %arg_1 Binding 1
+               OpDecorate %arg_2 DescriptorSet 1
+               OpDecorate %arg_2 Binding 2
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int Cube 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_1 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+         %15 = OpTypeSampler
+%_ptr_UniformConstant_15 = OpTypePointer UniformConstant %15
+      %arg_2 = OpVariable %_ptr_UniformConstant_15 UniformConstant
+       %void = OpTypeVoid
+         %16 = OpTypeFunction %void
+      %v4int = OpTypeVector %int 4
+         %24 = OpTypeSampledImage %11
+    %float_0 = OpConstant %float 0
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+         %33 = OpConstantNull %v4int
+         %34 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureGather_788010 = OpFunction %void None %16
+         %19 = OpLabel
+        %res = OpVariable %_ptr_Function_v4int Function %33
+         %22 = OpLoad %15 %arg_2
+         %23 = OpLoad %11 %arg_1
+         %25 = OpSampledImage %24 %23 %22
+         %27 = OpConvertUToF %float %uint_1
+         %30 = OpCompositeConstruct %v4float %float_0 %float_0 %float_0 %27
+         %20 = OpImageGather %v4int %25 %30 %uint_1
+               OpStore %res %20
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %34
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %textureGather_788010
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %16
+         %39 = OpLabel
+         %40 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %40
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %16
+         %43 = OpLabel
+         %44 = OpFunctionCall %void %textureGather_788010
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %16
+         %46 = OpLabel
+         %47 = OpFunctionCall %void %textureGather_788010
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureGather/788010.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/788010.wgsl.expected.wgsl
new file mode 100644
index 0000000..1dbb53f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/788010.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(1) var arg_1 : texture_cube_array<i32>;
+
+@group(1) @binding(2) var arg_2 : sampler;
+
+fn textureGather_788010() {
+  var res : vec4<i32> = textureGather(1, arg_1, arg_2, vec3<f32>(), 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGather_788010();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureGather_788010();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureGather_788010();
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/7dd226.wgsl b/test/tint/builtins/gen/literal/textureGather/7dd226.wgsl
new file mode 100644
index 0000000..6943197
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/7dd226.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_depth_cube_array;
+@group(1) @binding(1) var arg_1: sampler;
+
+// fn textureGather(texture: texture_depth_cube_array, sampler: sampler, coords: vec3<f32>, array_index: u32) -> vec4<f32>
+fn textureGather_7dd226() {
+  var res: vec4<f32> = textureGather(arg_0, arg_1, vec3<f32>(), 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGather_7dd226();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureGather_7dd226();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureGather_7dd226();
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/7dd226.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/7dd226.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..30437f7e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/7dd226.wgsl.expected.dxc.hlsl
@@ -0,0 +1,33 @@
+TextureCubeArray arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureGather_7dd226() {
+  float4 res = arg_0.Gather(arg_1, float4(0.0f, 0.0f, 0.0f, float(1u)));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureGather_7dd226();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureGather_7dd226();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureGather_7dd226();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/7dd226.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/7dd226.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..30437f7e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/7dd226.wgsl.expected.fxc.hlsl
@@ -0,0 +1,33 @@
+TextureCubeArray arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureGather_7dd226() {
+  float4 res = arg_0.Gather(arg_1, float4(0.0f, 0.0f, 0.0f, float(1u)));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureGather_7dd226();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureGather_7dd226();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureGather_7dd226();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/7dd226.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGather/7dd226.wgsl.expected.glsl
new file mode 100644
index 0000000..4d3f177
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/7dd226.wgsl.expected.glsl
@@ -0,0 +1,78 @@
+SKIP: FAILED
+
+#version 310 es
+
+uniform highp samplerCubeArrayShadow arg_0_arg_1;
+
+void textureGather_7dd226() {
+  vec4 res = textureGather(arg_0_arg_1, vec4(0.0f, 0.0f, 0.0f, float(1u)), 0.0);
+}
+
+vec4 vertex_main() {
+  textureGather_7dd226();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  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: 'samplerCubeArrayShadow' : Reserved word. 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+uniform highp samplerCubeArrayShadow arg_0_arg_1;
+
+void textureGather_7dd226() {
+  vec4 res = textureGather(arg_0_arg_1, vec4(0.0f, 0.0f, 0.0f, float(1u)), 0.0);
+}
+
+void fragment_main() {
+  textureGather_7dd226();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'samplerCubeArrayShadow' : Reserved word. 
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+uniform highp samplerCubeArrayShadow arg_0_arg_1;
+
+void textureGather_7dd226() {
+  vec4 res = textureGather(arg_0_arg_1, vec4(0.0f, 0.0f, 0.0f, float(1u)), 0.0);
+}
+
+void compute_main() {
+  textureGather_7dd226();
+}
+
+layout(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: 'samplerCubeArrayShadow' : Reserved word. 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureGather/7dd226.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/7dd226.wgsl.expected.msl
new file mode 100644
index 0000000..76771fb
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/7dd226.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureGather_7dd226(depthcube_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+  float4 res = tint_symbol_1.gather(tint_symbol_2, float3(0.0f), 1u);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(depthcube_array<float, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+  textureGather_7dd226(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(depthcube_array<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(depthcube_array<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+  textureGather_7dd226(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(depthcube_array<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+  textureGather_7dd226(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureGather/7dd226.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/7dd226.wgsl.expected.spvasm
new file mode 100644
index 0000000..fe15256
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/7dd226.wgsl.expected.spvasm
@@ -0,0 +1,88 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 47
+; Schema: 0
+               OpCapability Shader
+               OpCapability SampledCubeArray
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %arg_1 "arg_1"
+               OpName %textureGather_7dd226 "textureGather_7dd226"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %arg_1 DescriptorSet 1
+               OpDecorate %arg_1 Binding 1
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float Cube 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+         %14 = OpTypeSampler
+%_ptr_UniformConstant_14 = OpTypePointer UniformConstant %14
+      %arg_1 = OpVariable %_ptr_UniformConstant_14 UniformConstant
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+         %22 = OpTypeSampledImage %11
+    %float_0 = OpConstant %float 0
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+        %int = OpTypeInt 32 1
+      %int_0 = OpConstant %int 0
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+         %33 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureGather_7dd226 = OpFunction %void None %15
+         %18 = OpLabel
+        %res = OpVariable %_ptr_Function_v4float Function %5
+         %20 = OpLoad %14 %arg_1
+         %21 = OpLoad %11 %arg_0
+         %23 = OpSampledImage %22 %21 %20
+         %25 = OpConvertUToF %float %uint_1
+         %28 = OpCompositeConstruct %v4float %float_0 %float_0 %float_0 %25
+         %19 = OpImageGather %v4float %23 %28 %int_0
+               OpStore %res %19
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %33
+         %35 = OpLabel
+         %36 = OpFunctionCall %void %textureGather_7dd226
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %38 = OpLabel
+         %39 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %39
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %42 = OpLabel
+         %43 = OpFunctionCall %void %textureGather_7dd226
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %45 = OpLabel
+         %46 = OpFunctionCall %void %textureGather_7dd226
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureGather/7dd226.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/7dd226.wgsl.expected.wgsl
new file mode 100644
index 0000000..d112afc
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/7dd226.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(0) var arg_0 : texture_depth_cube_array;
+
+@group(1) @binding(1) var arg_1 : sampler;
+
+fn textureGather_7dd226() {
+  var res : vec4<f32> = textureGather(arg_0, arg_1, vec3<f32>(), 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGather_7dd226();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureGather_7dd226();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureGather_7dd226();
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/829357.wgsl b/test/tint/builtins/gen/literal/textureGather/829357.wgsl
new file mode 100644
index 0000000..154c598
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/829357.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(1) var arg_1: texture_cube_array<f32>;
+@group(1) @binding(2) var arg_2: sampler;
+
+// fn textureGather(@const component: i32, texture: texture_cube_array<f32>, sampler: sampler, coords: vec3<f32>, array_index: u32) -> vec4<f32>
+fn textureGather_829357() {
+  var res: vec4<f32> = textureGather(1, arg_1, arg_2, vec3<f32>(), 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGather_829357();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureGather_829357();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureGather_829357();
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/829357.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/829357.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..f9d3114
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/829357.wgsl.expected.dxc.hlsl
@@ -0,0 +1,33 @@
+TextureCubeArray<float4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_829357() {
+  float4 res = arg_1.GatherGreen(arg_2, float4(0.0f, 0.0f, 0.0f, float(1u)));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureGather_829357();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureGather_829357();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureGather_829357();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/829357.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/829357.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..f9d3114
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/829357.wgsl.expected.fxc.hlsl
@@ -0,0 +1,33 @@
+TextureCubeArray<float4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_829357() {
+  float4 res = arg_1.GatherGreen(arg_2, float4(0.0f, 0.0f, 0.0f, float(1u)));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureGather_829357();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureGather_829357();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureGather_829357();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/829357.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGather/829357.wgsl.expected.glsl
new file mode 100644
index 0000000..083b9ac
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/829357.wgsl.expected.glsl
@@ -0,0 +1,78 @@
+SKIP: FAILED
+
+#version 310 es
+
+uniform highp samplerCubeArray arg_1_arg_2;
+
+void textureGather_829357() {
+  vec4 res = textureGather(arg_1_arg_2, vec4(0.0f, 0.0f, 0.0f, float(1u)), int(1u));
+}
+
+vec4 vertex_main() {
+  textureGather_829357();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'samplerCubeArray' : Reserved word. 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+uniform highp samplerCubeArray arg_1_arg_2;
+
+void textureGather_829357() {
+  vec4 res = textureGather(arg_1_arg_2, vec4(0.0f, 0.0f, 0.0f, float(1u)), int(1u));
+}
+
+void fragment_main() {
+  textureGather_829357();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'samplerCubeArray' : Reserved word. 
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+uniform highp samplerCubeArray arg_1_arg_2;
+
+void textureGather_829357() {
+  vec4 res = textureGather(arg_1_arg_2, vec4(0.0f, 0.0f, 0.0f, float(1u)), int(1u));
+}
+
+void compute_main() {
+  textureGather_829357();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'samplerCubeArray' : Reserved word. 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureGather/829357.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/829357.wgsl.expected.msl
new file mode 100644
index 0000000..d71c6ff
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/829357.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureGather_829357(texturecube_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+  float4 res = tint_symbol_1.gather(tint_symbol_2, float3(0.0f), 1u, component::y);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texturecube_array<float, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+  textureGather_829357(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texturecube_array<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texturecube_array<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+  textureGather_829357(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texturecube_array<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+  textureGather_829357(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureGather/829357.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/829357.wgsl.expected.spvasm
new file mode 100644
index 0000000..0a4125b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/829357.wgsl.expected.spvasm
@@ -0,0 +1,86 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 45
+; Schema: 0
+               OpCapability Shader
+               OpCapability SampledCubeArray
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %textureGather_829357 "textureGather_829357"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_1 DescriptorSet 1
+               OpDecorate %arg_1 Binding 1
+               OpDecorate %arg_2 DescriptorSet 1
+               OpDecorate %arg_2 Binding 2
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float Cube 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_1 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+         %14 = OpTypeSampler
+%_ptr_UniformConstant_14 = OpTypePointer UniformConstant %14
+      %arg_2 = OpVariable %_ptr_UniformConstant_14 UniformConstant
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+         %22 = OpTypeSampledImage %11
+    %float_0 = OpConstant %float 0
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+         %31 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureGather_829357 = OpFunction %void None %15
+         %18 = OpLabel
+        %res = OpVariable %_ptr_Function_v4float Function %5
+         %20 = OpLoad %14 %arg_2
+         %21 = OpLoad %11 %arg_1
+         %23 = OpSampledImage %22 %21 %20
+         %25 = OpConvertUToF %float %uint_1
+         %28 = OpCompositeConstruct %v4float %float_0 %float_0 %float_0 %25
+         %19 = OpImageGather %v4float %23 %28 %uint_1
+               OpStore %res %19
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %31
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %textureGather_829357
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %36 = OpLabel
+         %37 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %37
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %textureGather_829357
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %43 = OpLabel
+         %44 = OpFunctionCall %void %textureGather_829357
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureGather/829357.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/829357.wgsl.expected.wgsl
new file mode 100644
index 0000000..475719e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/829357.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(1) var arg_1 : texture_cube_array<f32>;
+
+@group(1) @binding(2) var arg_2 : sampler;
+
+fn textureGather_829357() {
+  var res : vec4<f32> = textureGather(1, arg_1, arg_2, vec3<f32>(), 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGather_829357();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureGather_829357();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureGather_829357();
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/8578bc.wgsl b/test/tint/builtins/gen/literal/textureGather/8578bc.wgsl
new file mode 100644
index 0000000..75f0ea3
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/8578bc.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(1) var arg_1: texture_cube_array<f32>;
+@group(1) @binding(2) var arg_2: sampler;
+
+// fn textureGather(@const component: u32, texture: texture_cube_array<f32>, sampler: sampler, coords: vec3<f32>, array_index: u32) -> vec4<f32>
+fn textureGather_8578bc() {
+  var res: vec4<f32> = textureGather(1u, arg_1, arg_2, vec3<f32>(), 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGather_8578bc();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureGather_8578bc();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureGather_8578bc();
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/8578bc.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/8578bc.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..3d08469
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/8578bc.wgsl.expected.dxc.hlsl
@@ -0,0 +1,33 @@
+TextureCubeArray<float4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_8578bc() {
+  float4 res = arg_1.GatherGreen(arg_2, float4(0.0f, 0.0f, 0.0f, float(1u)));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureGather_8578bc();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureGather_8578bc();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureGather_8578bc();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/8578bc.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/8578bc.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..3d08469
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/8578bc.wgsl.expected.fxc.hlsl
@@ -0,0 +1,33 @@
+TextureCubeArray<float4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_8578bc() {
+  float4 res = arg_1.GatherGreen(arg_2, float4(0.0f, 0.0f, 0.0f, float(1u)));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureGather_8578bc();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureGather_8578bc();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureGather_8578bc();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/8578bc.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGather/8578bc.wgsl.expected.glsl
new file mode 100644
index 0000000..ba57a13
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/8578bc.wgsl.expected.glsl
@@ -0,0 +1,78 @@
+SKIP: FAILED
+
+#version 310 es
+
+uniform highp samplerCubeArray arg_1_arg_2;
+
+void textureGather_8578bc() {
+  vec4 res = textureGather(arg_1_arg_2, vec4(0.0f, 0.0f, 0.0f, float(1u)), int(1u));
+}
+
+vec4 vertex_main() {
+  textureGather_8578bc();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'samplerCubeArray' : Reserved word. 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+uniform highp samplerCubeArray arg_1_arg_2;
+
+void textureGather_8578bc() {
+  vec4 res = textureGather(arg_1_arg_2, vec4(0.0f, 0.0f, 0.0f, float(1u)), int(1u));
+}
+
+void fragment_main() {
+  textureGather_8578bc();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'samplerCubeArray' : Reserved word. 
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+uniform highp samplerCubeArray arg_1_arg_2;
+
+void textureGather_8578bc() {
+  vec4 res = textureGather(arg_1_arg_2, vec4(0.0f, 0.0f, 0.0f, float(1u)), int(1u));
+}
+
+void compute_main() {
+  textureGather_8578bc();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'samplerCubeArray' : Reserved word. 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureGather/8578bc.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/8578bc.wgsl.expected.msl
new file mode 100644
index 0000000..d54ba7e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/8578bc.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureGather_8578bc(texturecube_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+  float4 res = tint_symbol_1.gather(tint_symbol_2, float3(0.0f), 1u, component::y);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texturecube_array<float, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+  textureGather_8578bc(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texturecube_array<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texturecube_array<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+  textureGather_8578bc(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texturecube_array<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+  textureGather_8578bc(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureGather/8578bc.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/8578bc.wgsl.expected.spvasm
new file mode 100644
index 0000000..9eb633a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/8578bc.wgsl.expected.spvasm
@@ -0,0 +1,86 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 45
+; Schema: 0
+               OpCapability Shader
+               OpCapability SampledCubeArray
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %textureGather_8578bc "textureGather_8578bc"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_1 DescriptorSet 1
+               OpDecorate %arg_1 Binding 1
+               OpDecorate %arg_2 DescriptorSet 1
+               OpDecorate %arg_2 Binding 2
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float Cube 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_1 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+         %14 = OpTypeSampler
+%_ptr_UniformConstant_14 = OpTypePointer UniformConstant %14
+      %arg_2 = OpVariable %_ptr_UniformConstant_14 UniformConstant
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+         %22 = OpTypeSampledImage %11
+    %float_0 = OpConstant %float 0
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+         %31 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureGather_8578bc = OpFunction %void None %15
+         %18 = OpLabel
+        %res = OpVariable %_ptr_Function_v4float Function %5
+         %20 = OpLoad %14 %arg_2
+         %21 = OpLoad %11 %arg_1
+         %23 = OpSampledImage %22 %21 %20
+         %25 = OpConvertUToF %float %uint_1
+         %28 = OpCompositeConstruct %v4float %float_0 %float_0 %float_0 %25
+         %19 = OpImageGather %v4float %23 %28 %uint_1
+               OpStore %res %19
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %31
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %textureGather_8578bc
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %36 = OpLabel
+         %37 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %37
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %textureGather_8578bc
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %43 = OpLabel
+         %44 = OpFunctionCall %void %textureGather_8578bc
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureGather/8578bc.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/8578bc.wgsl.expected.wgsl
new file mode 100644
index 0000000..d43d26b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/8578bc.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(1) var arg_1 : texture_cube_array<f32>;
+
+@group(1) @binding(2) var arg_2 : sampler;
+
+fn textureGather_8578bc() {
+  var res : vec4<f32> = textureGather(1u, arg_1, arg_2, vec3<f32>(), 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGather_8578bc();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureGather_8578bc();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureGather_8578bc();
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/89680f.wgsl b/test/tint/builtins/gen/literal/textureGather/89680f.wgsl
new file mode 100644
index 0000000..8455ece
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/89680f.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(1) var arg_1: texture_cube<u32>;
+@group(1) @binding(2) var arg_2: sampler;
+
+// fn textureGather(@const component: u32, texture: texture_cube<u32>, sampler: sampler, coords: vec3<f32>) -> vec4<u32>
+fn textureGather_89680f() {
+  var res: vec4<u32> = textureGather(1u, arg_1, arg_2, vec3<f32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGather_89680f();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureGather_89680f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureGather_89680f();
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/89680f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/89680f.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..752cd0d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/89680f.wgsl.expected.dxc.hlsl
@@ -0,0 +1,33 @@
+TextureCube<uint4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_89680f() {
+  uint4 res = arg_1.GatherGreen(arg_2, (0.0f).xxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureGather_89680f();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureGather_89680f();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureGather_89680f();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/89680f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/89680f.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..752cd0d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/89680f.wgsl.expected.fxc.hlsl
@@ -0,0 +1,33 @@
+TextureCube<uint4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_89680f() {
+  uint4 res = arg_1.GatherGreen(arg_2, (0.0f).xxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureGather_89680f();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureGather_89680f();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureGather_89680f();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/89680f.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGather/89680f.wgsl.expected.glsl
new file mode 100644
index 0000000..bccb5d2
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/89680f.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+
+uniform highp usamplerCube arg_1_arg_2;
+
+void textureGather_89680f() {
+  uvec4 res = textureGather(arg_1_arg_2, vec3(0.0f), int(1u));
+}
+
+vec4 vertex_main() {
+  textureGather_89680f();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp usamplerCube arg_1_arg_2;
+
+void textureGather_89680f() {
+  uvec4 res = textureGather(arg_1_arg_2, vec3(0.0f), int(1u));
+}
+
+void fragment_main() {
+  textureGather_89680f();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp usamplerCube arg_1_arg_2;
+
+void textureGather_89680f() {
+  uvec4 res = textureGather(arg_1_arg_2, vec3(0.0f), int(1u));
+}
+
+void compute_main() {
+  textureGather_89680f();
+}
+
+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/textureGather/89680f.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/89680f.wgsl.expected.msl
new file mode 100644
index 0000000..c7d2c10
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/89680f.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureGather_89680f(texturecube<uint, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+  uint4 res = tint_symbol_1.gather(tint_symbol_2, float3(0.0f), component::y);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texturecube<uint, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+  textureGather_89680f(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texturecube<uint, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texturecube<uint, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+  textureGather_89680f(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texturecube<uint, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+  textureGather_89680f(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureGather/89680f.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/89680f.wgsl.expected.spvasm
new file mode 100644
index 0000000..0c208ec
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/89680f.wgsl.expected.spvasm
@@ -0,0 +1,86 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 46
+; 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_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %textureGather_89680f "textureGather_89680f"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_1 DescriptorSet 1
+               OpDecorate %arg_1 Binding 1
+               OpDecorate %arg_2 DescriptorSet 1
+               OpDecorate %arg_2 Binding 2
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint Cube 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_1 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+         %15 = OpTypeSampler
+%_ptr_UniformConstant_15 = OpTypePointer UniformConstant %15
+      %arg_2 = OpVariable %_ptr_UniformConstant_15 UniformConstant
+       %void = OpTypeVoid
+         %16 = OpTypeFunction %void
+     %v4uint = OpTypeVector %uint 4
+         %24 = OpTypeSampledImage %11
+    %v3float = OpTypeVector %float 3
+         %27 = OpConstantNull %v3float
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+         %31 = OpConstantNull %v4uint
+         %32 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureGather_89680f = OpFunction %void None %16
+         %19 = OpLabel
+        %res = OpVariable %_ptr_Function_v4uint Function %31
+         %22 = OpLoad %15 %arg_2
+         %23 = OpLoad %11 %arg_1
+         %25 = OpSampledImage %24 %23 %22
+         %20 = OpImageGather %v4uint %25 %27 %uint_1
+               OpStore %res %20
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %32
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %textureGather_89680f
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %16
+         %37 = OpLabel
+         %38 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %38
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %16
+         %41 = OpLabel
+         %42 = OpFunctionCall %void %textureGather_89680f
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %16
+         %44 = OpLabel
+         %45 = OpFunctionCall %void %textureGather_89680f
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureGather/89680f.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/89680f.wgsl.expected.wgsl
new file mode 100644
index 0000000..aeffaac
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/89680f.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(1) var arg_1 : texture_cube<u32>;
+
+@group(1) @binding(2) var arg_2 : sampler;
+
+fn textureGather_89680f() {
+  var res : vec4<u32> = textureGather(1u, arg_1, arg_2, vec3<f32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGather_89680f();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureGather_89680f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureGather_89680f();
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/8fae00.wgsl b/test/tint/builtins/gen/literal/textureGather/8fae00.wgsl
new file mode 100644
index 0000000..b30fcdc
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/8fae00.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(1) var arg_1: texture_2d<u32>;
+@group(1) @binding(2) var arg_2: sampler;
+
+// fn textureGather(@const component: u32, texture: texture_2d<u32>, sampler: sampler, coords: vec2<f32>) -> vec4<u32>
+fn textureGather_8fae00() {
+  var res: vec4<u32> = textureGather(1u, arg_1, arg_2, vec2<f32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGather_8fae00();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureGather_8fae00();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureGather_8fae00();
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/8fae00.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/8fae00.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..f973d36
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/8fae00.wgsl.expected.dxc.hlsl
@@ -0,0 +1,33 @@
+Texture2D<uint4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_8fae00() {
+  uint4 res = arg_1.GatherGreen(arg_2, (0.0f).xx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureGather_8fae00();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureGather_8fae00();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureGather_8fae00();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/8fae00.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/8fae00.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..f973d36
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/8fae00.wgsl.expected.fxc.hlsl
@@ -0,0 +1,33 @@
+Texture2D<uint4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_8fae00() {
+  uint4 res = arg_1.GatherGreen(arg_2, (0.0f).xx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureGather_8fae00();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureGather_8fae00();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureGather_8fae00();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/8fae00.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGather/8fae00.wgsl.expected.glsl
new file mode 100644
index 0000000..4b9c91a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/8fae00.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+
+uniform highp usampler2D arg_1_arg_2;
+
+void textureGather_8fae00() {
+  uvec4 res = textureGather(arg_1_arg_2, vec2(0.0f), int(1u));
+}
+
+vec4 vertex_main() {
+  textureGather_8fae00();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp usampler2D arg_1_arg_2;
+
+void textureGather_8fae00() {
+  uvec4 res = textureGather(arg_1_arg_2, vec2(0.0f), int(1u));
+}
+
+void fragment_main() {
+  textureGather_8fae00();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp usampler2D arg_1_arg_2;
+
+void textureGather_8fae00() {
+  uvec4 res = textureGather(arg_1_arg_2, vec2(0.0f), int(1u));
+}
+
+void compute_main() {
+  textureGather_8fae00();
+}
+
+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/textureGather/8fae00.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/8fae00.wgsl.expected.msl
new file mode 100644
index 0000000..c1ea9fb
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/8fae00.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureGather_8fae00(texture2d<uint, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+  uint4 res = tint_symbol_1.gather(tint_symbol_2, float2(0.0f), int2(0), component::y);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<uint, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+  textureGather_8fae00(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<uint, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<uint, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+  textureGather_8fae00(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d<uint, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+  textureGather_8fae00(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureGather/8fae00.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/8fae00.wgsl.expected.spvasm
new file mode 100644
index 0000000..40ae1c5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/8fae00.wgsl.expected.spvasm
@@ -0,0 +1,86 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 46
+; 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_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %textureGather_8fae00 "textureGather_8fae00"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_1 DescriptorSet 1
+               OpDecorate %arg_1 Binding 1
+               OpDecorate %arg_2 DescriptorSet 1
+               OpDecorate %arg_2 Binding 2
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 2D 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_1 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+         %15 = OpTypeSampler
+%_ptr_UniformConstant_15 = OpTypePointer UniformConstant %15
+      %arg_2 = OpVariable %_ptr_UniformConstant_15 UniformConstant
+       %void = OpTypeVoid
+         %16 = OpTypeFunction %void
+     %v4uint = OpTypeVector %uint 4
+         %24 = OpTypeSampledImage %11
+    %v2float = OpTypeVector %float 2
+         %27 = OpConstantNull %v2float
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+         %31 = OpConstantNull %v4uint
+         %32 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureGather_8fae00 = OpFunction %void None %16
+         %19 = OpLabel
+        %res = OpVariable %_ptr_Function_v4uint Function %31
+         %22 = OpLoad %15 %arg_2
+         %23 = OpLoad %11 %arg_1
+         %25 = OpSampledImage %24 %23 %22
+         %20 = OpImageGather %v4uint %25 %27 %uint_1
+               OpStore %res %20
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %32
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %textureGather_8fae00
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %16
+         %37 = OpLabel
+         %38 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %38
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %16
+         %41 = OpLabel
+         %42 = OpFunctionCall %void %textureGather_8fae00
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %16
+         %44 = OpLabel
+         %45 = OpFunctionCall %void %textureGather_8fae00
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureGather/8fae00.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/8fae00.wgsl.expected.wgsl
new file mode 100644
index 0000000..be62d13
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/8fae00.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(1) var arg_1 : texture_2d<u32>;
+
+@group(1) @binding(2) var arg_2 : sampler;
+
+fn textureGather_8fae00() {
+  var res : vec4<u32> = textureGather(1u, arg_1, arg_2, vec2<f32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGather_8fae00();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureGather_8fae00();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureGather_8fae00();
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/986700.wgsl b/test/tint/builtins/gen/literal/textureGather/986700.wgsl
new file mode 100644
index 0000000..3d12e54
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/986700.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(1) var arg_1: texture_2d<u32>;
+@group(1) @binding(2) var arg_2: sampler;
+
+// fn textureGather(@const component: u32, texture: texture_2d<u32>, sampler: sampler, coords: vec2<f32>, @const offset: vec2<i32>) -> vec4<u32>
+fn textureGather_986700() {
+  var res: vec4<u32> = textureGather(1u, arg_1, arg_2, vec2<f32>(), vec2<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGather_986700();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureGather_986700();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureGather_986700();
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/986700.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/986700.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..33d49eb
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/986700.wgsl.expected.dxc.hlsl
@@ -0,0 +1,33 @@
+Texture2D<uint4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_986700() {
+  uint4 res = arg_1.GatherGreen(arg_2, (0.0f).xx, (0).xx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureGather_986700();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureGather_986700();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureGather_986700();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/986700.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/986700.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..33d49eb
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/986700.wgsl.expected.fxc.hlsl
@@ -0,0 +1,33 @@
+Texture2D<uint4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_986700() {
+  uint4 res = arg_1.GatherGreen(arg_2, (0.0f).xx, (0).xx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureGather_986700();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureGather_986700();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureGather_986700();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/986700.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGather/986700.wgsl.expected.glsl
new file mode 100644
index 0000000..4930539
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/986700.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+
+uniform highp usampler2D arg_1_arg_2;
+
+void textureGather_986700() {
+  uvec4 res = textureGatherOffset(arg_1_arg_2, vec2(0.0f), ivec2(0), int(1u));
+}
+
+vec4 vertex_main() {
+  textureGather_986700();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp usampler2D arg_1_arg_2;
+
+void textureGather_986700() {
+  uvec4 res = textureGatherOffset(arg_1_arg_2, vec2(0.0f), ivec2(0), int(1u));
+}
+
+void fragment_main() {
+  textureGather_986700();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp usampler2D arg_1_arg_2;
+
+void textureGather_986700() {
+  uvec4 res = textureGatherOffset(arg_1_arg_2, vec2(0.0f), ivec2(0), int(1u));
+}
+
+void compute_main() {
+  textureGather_986700();
+}
+
+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/textureGather/986700.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/986700.wgsl.expected.msl
new file mode 100644
index 0000000..27a6430
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/986700.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureGather_986700(texture2d<uint, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+  uint4 res = tint_symbol_1.gather(tint_symbol_2, float2(0.0f), int2(0), component::y);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<uint, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+  textureGather_986700(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<uint, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<uint, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+  textureGather_986700(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d<uint, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+  textureGather_986700(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureGather/986700.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/986700.wgsl.expected.spvasm
new file mode 100644
index 0000000..06737d3
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/986700.wgsl.expected.spvasm
@@ -0,0 +1,89 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 49
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %textureGather_986700 "textureGather_986700"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_1 DescriptorSet 1
+               OpDecorate %arg_1 Binding 1
+               OpDecorate %arg_2 DescriptorSet 1
+               OpDecorate %arg_2 Binding 2
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 2D 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_1 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+         %15 = OpTypeSampler
+%_ptr_UniformConstant_15 = OpTypePointer UniformConstant %15
+      %arg_2 = OpVariable %_ptr_UniformConstant_15 UniformConstant
+       %void = OpTypeVoid
+         %16 = OpTypeFunction %void
+     %v4uint = OpTypeVector %uint 4
+         %24 = OpTypeSampledImage %11
+    %v2float = OpTypeVector %float 2
+         %27 = OpConstantNull %v2float
+     %uint_1 = OpConstant %uint 1
+        %int = OpTypeInt 32 1
+      %v2int = OpTypeVector %int 2
+         %31 = OpConstantNull %v2int
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+         %34 = OpConstantNull %v4uint
+         %35 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureGather_986700 = OpFunction %void None %16
+         %19 = OpLabel
+        %res = OpVariable %_ptr_Function_v4uint Function %34
+         %22 = OpLoad %15 %arg_2
+         %23 = OpLoad %11 %arg_1
+         %25 = OpSampledImage %24 %23 %22
+         %20 = OpImageGather %v4uint %25 %27 %uint_1 ConstOffset %31
+               OpStore %res %20
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %35
+         %37 = OpLabel
+         %38 = OpFunctionCall %void %textureGather_986700
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %16
+         %40 = OpLabel
+         %41 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %41
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %16
+         %44 = OpLabel
+         %45 = OpFunctionCall %void %textureGather_986700
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %16
+         %47 = OpLabel
+         %48 = OpFunctionCall %void %textureGather_986700
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureGather/986700.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/986700.wgsl.expected.wgsl
new file mode 100644
index 0000000..ebf125e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/986700.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(1) var arg_1 : texture_2d<u32>;
+
+@group(1) @binding(2) var arg_2 : sampler;
+
+fn textureGather_986700() {
+  var res : vec4<u32> = textureGather(1u, arg_1, arg_2, vec2<f32>(), vec2<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGather_986700();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureGather_986700();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureGather_986700();
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/a0372b.wgsl b/test/tint/builtins/gen/literal/textureGather/a0372b.wgsl
new file mode 100644
index 0000000..4eca3a2
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/a0372b.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(1) var arg_1: texture_2d_array<u32>;
+@group(1) @binding(2) var arg_2: sampler;
+
+// fn textureGather(@const component: i32, texture: texture_2d_array<u32>, sampler: sampler, coords: vec2<f32>, array_index: u32) -> vec4<u32>
+fn textureGather_a0372b() {
+  var res: vec4<u32> = textureGather(1, arg_1, arg_2, vec2<f32>(), 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGather_a0372b();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureGather_a0372b();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureGather_a0372b();
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/a0372b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/a0372b.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..aac3174
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/a0372b.wgsl.expected.dxc.hlsl
@@ -0,0 +1,33 @@
+Texture2DArray<uint4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_a0372b() {
+  uint4 res = arg_1.GatherGreen(arg_2, float3(0.0f, 0.0f, float(1u)));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureGather_a0372b();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureGather_a0372b();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureGather_a0372b();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/a0372b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/a0372b.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..aac3174
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/a0372b.wgsl.expected.fxc.hlsl
@@ -0,0 +1,33 @@
+Texture2DArray<uint4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_a0372b() {
+  uint4 res = arg_1.GatherGreen(arg_2, float3(0.0f, 0.0f, float(1u)));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureGather_a0372b();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureGather_a0372b();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureGather_a0372b();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/a0372b.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGather/a0372b.wgsl.expected.glsl
new file mode 100644
index 0000000..4d3163e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/a0372b.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+
+uniform highp usampler2DArray arg_1_arg_2;
+
+void textureGather_a0372b() {
+  uvec4 res = textureGather(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), int(1u));
+}
+
+vec4 vertex_main() {
+  textureGather_a0372b();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp usampler2DArray arg_1_arg_2;
+
+void textureGather_a0372b() {
+  uvec4 res = textureGather(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), int(1u));
+}
+
+void fragment_main() {
+  textureGather_a0372b();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp usampler2DArray arg_1_arg_2;
+
+void textureGather_a0372b() {
+  uvec4 res = textureGather(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), int(1u));
+}
+
+void compute_main() {
+  textureGather_a0372b();
+}
+
+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/textureGather/a0372b.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/a0372b.wgsl.expected.msl
new file mode 100644
index 0000000..2e34b90
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/a0372b.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureGather_a0372b(texture2d_array<uint, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+  uint4 res = tint_symbol_1.gather(tint_symbol_2, float2(0.0f), 1u, int2(0), component::y);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<uint, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+  textureGather_a0372b(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<uint, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<uint, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+  textureGather_a0372b(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<uint, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+  textureGather_a0372b(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureGather/a0372b.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/a0372b.wgsl.expected.spvasm
new file mode 100644
index 0000000..67068b3
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/a0372b.wgsl.expected.spvasm
@@ -0,0 +1,88 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 48
+; 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_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %textureGather_a0372b "textureGather_a0372b"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_1 DescriptorSet 1
+               OpDecorate %arg_1 Binding 1
+               OpDecorate %arg_2 DescriptorSet 1
+               OpDecorate %arg_2 Binding 2
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_1 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+         %15 = OpTypeSampler
+%_ptr_UniformConstant_15 = OpTypePointer UniformConstant %15
+      %arg_2 = OpVariable %_ptr_UniformConstant_15 UniformConstant
+       %void = OpTypeVoid
+         %16 = OpTypeFunction %void
+     %v4uint = OpTypeVector %uint 4
+         %24 = OpTypeSampledImage %11
+    %v3float = OpTypeVector %float 3
+    %float_0 = OpConstant %float 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+         %33 = OpConstantNull %v4uint
+         %34 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureGather_a0372b = OpFunction %void None %16
+         %19 = OpLabel
+        %res = OpVariable %_ptr_Function_v4uint Function %33
+         %22 = OpLoad %15 %arg_2
+         %23 = OpLoad %11 %arg_1
+         %25 = OpSampledImage %24 %23 %22
+         %28 = OpConvertUToF %float %uint_1
+         %30 = OpCompositeConstruct %v3float %float_0 %float_0 %28
+         %20 = OpImageGather %v4uint %25 %30 %uint_1
+               OpStore %res %20
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %34
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %textureGather_a0372b
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %16
+         %39 = OpLabel
+         %40 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %40
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %16
+         %43 = OpLabel
+         %44 = OpFunctionCall %void %textureGather_a0372b
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %16
+         %46 = OpLabel
+         %47 = OpFunctionCall %void %textureGather_a0372b
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureGather/a0372b.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/a0372b.wgsl.expected.wgsl
new file mode 100644
index 0000000..b4702b1
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/a0372b.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(1) var arg_1 : texture_2d_array<u32>;
+
+@group(1) @binding(2) var arg_2 : sampler;
+
+fn textureGather_a0372b() {
+  var res : vec4<u32> = textureGather(1, arg_1, arg_2, vec2<f32>(), 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGather_a0372b();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureGather_a0372b();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureGather_a0372b();
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/a68027.wgsl b/test/tint/builtins/gen/literal/textureGather/a68027.wgsl
new file mode 100644
index 0000000..a3bbec3
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/a68027.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_depth_2d_array;
+@group(1) @binding(1) var arg_1: sampler;
+
+// fn textureGather(texture: texture_depth_2d_array, sampler: sampler, coords: vec2<f32>, array_index: u32, @const offset: vec2<i32>) -> vec4<f32>
+fn textureGather_a68027() {
+  var res: vec4<f32> = textureGather(arg_0, arg_1, vec2<f32>(), 1u, vec2<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGather_a68027();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureGather_a68027();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureGather_a68027();
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/a68027.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/a68027.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..b8b6990
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/a68027.wgsl.expected.dxc.hlsl
@@ -0,0 +1,33 @@
+Texture2DArray arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureGather_a68027() {
+  float4 res = arg_0.Gather(arg_1, float3(0.0f, 0.0f, float(1u)), (0).xx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureGather_a68027();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureGather_a68027();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureGather_a68027();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/a68027.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/a68027.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..b8b6990
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/a68027.wgsl.expected.fxc.hlsl
@@ -0,0 +1,33 @@
+Texture2DArray arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureGather_a68027() {
+  float4 res = arg_0.Gather(arg_1, float3(0.0f, 0.0f, float(1u)), (0).xx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureGather_a68027();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureGather_a68027();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureGather_a68027();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/a68027.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGather/a68027.wgsl.expected.glsl
new file mode 100644
index 0000000..305ef61
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/a68027.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+
+uniform highp sampler2DArrayShadow arg_0_arg_1;
+
+void textureGather_a68027() {
+  vec4 res = textureGatherOffset(arg_0_arg_1, vec3(0.0f, 0.0f, float(1u)), 0.0, ivec2(0));
+}
+
+vec4 vertex_main() {
+  textureGather_a68027();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2DArrayShadow arg_0_arg_1;
+
+void textureGather_a68027() {
+  vec4 res = textureGatherOffset(arg_0_arg_1, vec3(0.0f, 0.0f, float(1u)), 0.0, ivec2(0));
+}
+
+void fragment_main() {
+  textureGather_a68027();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp sampler2DArrayShadow arg_0_arg_1;
+
+void textureGather_a68027() {
+  vec4 res = textureGatherOffset(arg_0_arg_1, vec3(0.0f, 0.0f, float(1u)), 0.0, ivec2(0));
+}
+
+void compute_main() {
+  textureGather_a68027();
+}
+
+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/textureGather/a68027.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/a68027.wgsl.expected.msl
new file mode 100644
index 0000000..ef44bea
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/a68027.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureGather_a68027(depth2d_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+  float4 res = tint_symbol_1.gather(tint_symbol_2, float2(0.0f), 1u, int2(0));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(depth2d_array<float, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+  textureGather_a68027(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(depth2d_array<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(depth2d_array<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+  textureGather_a68027(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(depth2d_array<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+  textureGather_a68027(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureGather/a68027.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/a68027.wgsl.expected.spvasm
new file mode 100644
index 0000000..6e66662
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/a68027.wgsl.expected.spvasm
@@ -0,0 +1,90 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 50
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %arg_1 "arg_1"
+               OpName %textureGather_a68027 "textureGather_a68027"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %arg_1 DescriptorSet 1
+               OpDecorate %arg_1 Binding 1
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+         %14 = OpTypeSampler
+%_ptr_UniformConstant_14 = OpTypePointer UniformConstant %14
+      %arg_1 = OpVariable %_ptr_UniformConstant_14 UniformConstant
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+         %22 = OpTypeSampledImage %11
+    %v3float = OpTypeVector %float 3
+    %float_0 = OpConstant %float 0
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+        %int = OpTypeInt 32 1
+      %int_0 = OpConstant %int 0
+      %v2int = OpTypeVector %int 2
+         %33 = OpConstantNull %v2int
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+         %36 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureGather_a68027 = OpFunction %void None %15
+         %18 = OpLabel
+        %res = OpVariable %_ptr_Function_v4float Function %5
+         %20 = OpLoad %14 %arg_1
+         %21 = OpLoad %11 %arg_0
+         %23 = OpSampledImage %22 %21 %20
+         %26 = OpConvertUToF %float %uint_1
+         %29 = OpCompositeConstruct %v3float %float_0 %float_0 %26
+         %19 = OpImageGather %v4float %23 %29 %int_0 ConstOffset %33
+               OpStore %res %19
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %36
+         %38 = OpLabel
+         %39 = OpFunctionCall %void %textureGather_a68027
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %41 = OpLabel
+         %42 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %42
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %45 = OpLabel
+         %46 = OpFunctionCall %void %textureGather_a68027
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %48 = OpLabel
+         %49 = OpFunctionCall %void %textureGather_a68027
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureGather/a68027.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/a68027.wgsl.expected.wgsl
new file mode 100644
index 0000000..433101d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/a68027.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(0) var arg_0 : texture_depth_2d_array;
+
+@group(1) @binding(1) var arg_1 : sampler;
+
+fn textureGather_a68027() {
+  var res : vec4<f32> = textureGather(arg_0, arg_1, vec2<f32>(), 1u, vec2<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGather_a68027();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureGather_a68027();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureGather_a68027();
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/bd33b6.wgsl b/test/tint/builtins/gen/literal/textureGather/bd33b6.wgsl
new file mode 100644
index 0000000..d2e5f2f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/bd33b6.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(1) var arg_1: texture_2d_array<i32>;
+@group(1) @binding(2) var arg_2: sampler;
+
+// fn textureGather(@const component: i32, texture: texture_2d_array<i32>, sampler: sampler, coords: vec2<f32>, array_index: u32, @const offset: vec2<i32>) -> vec4<i32>
+fn textureGather_bd33b6() {
+  var res: vec4<i32> = textureGather(1, arg_1, arg_2, vec2<f32>(), 1u, vec2<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGather_bd33b6();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureGather_bd33b6();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureGather_bd33b6();
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/bd33b6.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/bd33b6.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..243aa01
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/bd33b6.wgsl.expected.dxc.hlsl
@@ -0,0 +1,33 @@
+Texture2DArray<int4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_bd33b6() {
+  int4 res = arg_1.GatherGreen(arg_2, float3(0.0f, 0.0f, float(1u)), (0).xx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureGather_bd33b6();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureGather_bd33b6();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureGather_bd33b6();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/bd33b6.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/bd33b6.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..243aa01
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/bd33b6.wgsl.expected.fxc.hlsl
@@ -0,0 +1,33 @@
+Texture2DArray<int4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_bd33b6() {
+  int4 res = arg_1.GatherGreen(arg_2, float3(0.0f, 0.0f, float(1u)), (0).xx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureGather_bd33b6();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureGather_bd33b6();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureGather_bd33b6();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/bd33b6.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGather/bd33b6.wgsl.expected.glsl
new file mode 100644
index 0000000..3b5c9e8
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/bd33b6.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+
+uniform highp isampler2DArray arg_1_arg_2;
+
+void textureGather_bd33b6() {
+  ivec4 res = textureGatherOffset(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), ivec2(0), int(1u));
+}
+
+vec4 vertex_main() {
+  textureGather_bd33b6();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp isampler2DArray arg_1_arg_2;
+
+void textureGather_bd33b6() {
+  ivec4 res = textureGatherOffset(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), ivec2(0), int(1u));
+}
+
+void fragment_main() {
+  textureGather_bd33b6();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp isampler2DArray arg_1_arg_2;
+
+void textureGather_bd33b6() {
+  ivec4 res = textureGatherOffset(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), ivec2(0), int(1u));
+}
+
+void compute_main() {
+  textureGather_bd33b6();
+}
+
+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/textureGather/bd33b6.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/bd33b6.wgsl.expected.msl
new file mode 100644
index 0000000..85eb095
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/bd33b6.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureGather_bd33b6(texture2d_array<int, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+  int4 res = tint_symbol_1.gather(tint_symbol_2, float2(0.0f), 1u, int2(0), component::y);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<int, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+  textureGather_bd33b6(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<int, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<int, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+  textureGather_bd33b6(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<int, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+  textureGather_bd33b6(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureGather/bd33b6.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/bd33b6.wgsl.expected.spvasm
new file mode 100644
index 0000000..f3347b1
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/bd33b6.wgsl.expected.spvasm
@@ -0,0 +1,91 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 51
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %textureGather_bd33b6 "textureGather_bd33b6"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_1 DescriptorSet 1
+               OpDecorate %arg_1 Binding 1
+               OpDecorate %arg_2 DescriptorSet 1
+               OpDecorate %arg_2 Binding 2
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_1 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+         %15 = OpTypeSampler
+%_ptr_UniformConstant_15 = OpTypePointer UniformConstant %15
+      %arg_2 = OpVariable %_ptr_UniformConstant_15 UniformConstant
+       %void = OpTypeVoid
+         %16 = OpTypeFunction %void
+      %v4int = OpTypeVector %int 4
+         %24 = OpTypeSampledImage %11
+    %v3float = OpTypeVector %float 3
+    %float_0 = OpConstant %float 0
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+      %v2int = OpTypeVector %int 2
+         %33 = OpConstantNull %v2int
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+         %36 = OpConstantNull %v4int
+         %37 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureGather_bd33b6 = OpFunction %void None %16
+         %19 = OpLabel
+        %res = OpVariable %_ptr_Function_v4int Function %36
+         %22 = OpLoad %15 %arg_2
+         %23 = OpLoad %11 %arg_1
+         %25 = OpSampledImage %24 %23 %22
+         %28 = OpConvertUToF %float %uint_1
+         %31 = OpCompositeConstruct %v3float %float_0 %float_0 %28
+         %20 = OpImageGather %v4int %25 %31 %uint_1 ConstOffset %33
+               OpStore %res %20
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %37
+         %39 = OpLabel
+         %40 = OpFunctionCall %void %textureGather_bd33b6
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %16
+         %42 = OpLabel
+         %43 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %43
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %16
+         %46 = OpLabel
+         %47 = OpFunctionCall %void %textureGather_bd33b6
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %16
+         %49 = OpLabel
+         %50 = OpFunctionCall %void %textureGather_bd33b6
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureGather/bd33b6.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/bd33b6.wgsl.expected.wgsl
new file mode 100644
index 0000000..1993fea
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/bd33b6.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(1) var arg_1 : texture_2d_array<i32>;
+
+@group(1) @binding(2) var arg_2 : sampler;
+
+fn textureGather_bd33b6() {
+  var res : vec4<i32> = textureGather(1, arg_1, arg_2, vec2<f32>(), 1u, vec2<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGather_bd33b6();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureGather_bd33b6();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureGather_bd33b6();
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/be276f.wgsl b/test/tint/builtins/gen/literal/textureGather/be276f.wgsl
new file mode 100644
index 0000000..2928b32
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/be276f.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(1) var arg_1: texture_cube_array<u32>;
+@group(1) @binding(2) var arg_2: sampler;
+
+// fn textureGather(@const component: i32, texture: texture_cube_array<u32>, sampler: sampler, coords: vec3<f32>, array_index: u32) -> vec4<u32>
+fn textureGather_be276f() {
+  var res: vec4<u32> = textureGather(1, arg_1, arg_2, vec3<f32>(), 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGather_be276f();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureGather_be276f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureGather_be276f();
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/be276f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/be276f.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..1ce11f0
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/be276f.wgsl.expected.dxc.hlsl
@@ -0,0 +1,33 @@
+TextureCubeArray<uint4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_be276f() {
+  uint4 res = arg_1.GatherGreen(arg_2, float4(0.0f, 0.0f, 0.0f, float(1u)));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureGather_be276f();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureGather_be276f();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureGather_be276f();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/be276f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/be276f.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..1ce11f0
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/be276f.wgsl.expected.fxc.hlsl
@@ -0,0 +1,33 @@
+TextureCubeArray<uint4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_be276f() {
+  uint4 res = arg_1.GatherGreen(arg_2, float4(0.0f, 0.0f, 0.0f, float(1u)));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureGather_be276f();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureGather_be276f();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureGather_be276f();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/be276f.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGather/be276f.wgsl.expected.glsl
new file mode 100644
index 0000000..025d258
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/be276f.wgsl.expected.glsl
@@ -0,0 +1,78 @@
+SKIP: FAILED
+
+#version 310 es
+
+uniform highp usamplerCubeArray arg_1_arg_2;
+
+void textureGather_be276f() {
+  uvec4 res = textureGather(arg_1_arg_2, vec4(0.0f, 0.0f, 0.0f, float(1u)), int(1u));
+}
+
+vec4 vertex_main() {
+  textureGather_be276f();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'usamplerCubeArray' : Reserved word. 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+uniform highp usamplerCubeArray arg_1_arg_2;
+
+void textureGather_be276f() {
+  uvec4 res = textureGather(arg_1_arg_2, vec4(0.0f, 0.0f, 0.0f, float(1u)), int(1u));
+}
+
+void fragment_main() {
+  textureGather_be276f();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'usamplerCubeArray' : Reserved word. 
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+uniform highp usamplerCubeArray arg_1_arg_2;
+
+void textureGather_be276f() {
+  uvec4 res = textureGather(arg_1_arg_2, vec4(0.0f, 0.0f, 0.0f, float(1u)), int(1u));
+}
+
+void compute_main() {
+  textureGather_be276f();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'usamplerCubeArray' : Reserved word. 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureGather/be276f.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/be276f.wgsl.expected.msl
new file mode 100644
index 0000000..2102740
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/be276f.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureGather_be276f(texturecube_array<uint, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+  uint4 res = tint_symbol_1.gather(tint_symbol_2, float3(0.0f), 1u, component::y);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texturecube_array<uint, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+  textureGather_be276f(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texturecube_array<uint, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texturecube_array<uint, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+  textureGather_be276f(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texturecube_array<uint, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+  textureGather_be276f(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureGather/be276f.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/be276f.wgsl.expected.spvasm
new file mode 100644
index 0000000..22b7575
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/be276f.wgsl.expected.spvasm
@@ -0,0 +1,88 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 47
+; Schema: 0
+               OpCapability Shader
+               OpCapability SampledCubeArray
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %textureGather_be276f "textureGather_be276f"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_1 DescriptorSet 1
+               OpDecorate %arg_1 Binding 1
+               OpDecorate %arg_2 DescriptorSet 1
+               OpDecorate %arg_2 Binding 2
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint Cube 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_1 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+         %15 = OpTypeSampler
+%_ptr_UniformConstant_15 = OpTypePointer UniformConstant %15
+      %arg_2 = OpVariable %_ptr_UniformConstant_15 UniformConstant
+       %void = OpTypeVoid
+         %16 = OpTypeFunction %void
+     %v4uint = OpTypeVector %uint 4
+         %24 = OpTypeSampledImage %11
+    %float_0 = OpConstant %float 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+         %32 = OpConstantNull %v4uint
+         %33 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureGather_be276f = OpFunction %void None %16
+         %19 = OpLabel
+        %res = OpVariable %_ptr_Function_v4uint Function %32
+         %22 = OpLoad %15 %arg_2
+         %23 = OpLoad %11 %arg_1
+         %25 = OpSampledImage %24 %23 %22
+         %27 = OpConvertUToF %float %uint_1
+         %29 = OpCompositeConstruct %v4float %float_0 %float_0 %float_0 %27
+         %20 = OpImageGather %v4uint %25 %29 %uint_1
+               OpStore %res %20
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %33
+         %35 = OpLabel
+         %36 = OpFunctionCall %void %textureGather_be276f
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %16
+         %38 = OpLabel
+         %39 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %39
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %16
+         %42 = OpLabel
+         %43 = OpFunctionCall %void %textureGather_be276f
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %16
+         %45 = OpLabel
+         %46 = OpFunctionCall %void %textureGather_be276f
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureGather/be276f.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/be276f.wgsl.expected.wgsl
new file mode 100644
index 0000000..c14626e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/be276f.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(1) var arg_1 : texture_cube_array<u32>;
+
+@group(1) @binding(2) var arg_2 : sampler;
+
+fn textureGather_be276f() {
+  var res : vec4<u32> = textureGather(1, arg_1, arg_2, vec3<f32>(), 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGather_be276f();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureGather_be276f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureGather_be276f();
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/ccadde.wgsl b/test/tint/builtins/gen/literal/textureGather/ccadde.wgsl
new file mode 100644
index 0000000..4c99b08
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/ccadde.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(1) var arg_1: texture_2d<i32>;
+@group(1) @binding(2) var arg_2: sampler;
+
+// fn textureGather(@const component: u32, texture: texture_2d<i32>, sampler: sampler, coords: vec2<f32>) -> vec4<i32>
+fn textureGather_ccadde() {
+  var res: vec4<i32> = textureGather(1u, arg_1, arg_2, vec2<f32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGather_ccadde();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureGather_ccadde();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureGather_ccadde();
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/ccadde.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/ccadde.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..6db0b42
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/ccadde.wgsl.expected.dxc.hlsl
@@ -0,0 +1,33 @@
+Texture2D<int4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_ccadde() {
+  int4 res = arg_1.GatherGreen(arg_2, (0.0f).xx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureGather_ccadde();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureGather_ccadde();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureGather_ccadde();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/ccadde.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/ccadde.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..6db0b42
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/ccadde.wgsl.expected.fxc.hlsl
@@ -0,0 +1,33 @@
+Texture2D<int4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_ccadde() {
+  int4 res = arg_1.GatherGreen(arg_2, (0.0f).xx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureGather_ccadde();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureGather_ccadde();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureGather_ccadde();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/ccadde.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGather/ccadde.wgsl.expected.glsl
new file mode 100644
index 0000000..442be7a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/ccadde.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+
+uniform highp isampler2D arg_1_arg_2;
+
+void textureGather_ccadde() {
+  ivec4 res = textureGather(arg_1_arg_2, vec2(0.0f), int(1u));
+}
+
+vec4 vertex_main() {
+  textureGather_ccadde();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp isampler2D arg_1_arg_2;
+
+void textureGather_ccadde() {
+  ivec4 res = textureGather(arg_1_arg_2, vec2(0.0f), int(1u));
+}
+
+void fragment_main() {
+  textureGather_ccadde();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp isampler2D arg_1_arg_2;
+
+void textureGather_ccadde() {
+  ivec4 res = textureGather(arg_1_arg_2, vec2(0.0f), int(1u));
+}
+
+void compute_main() {
+  textureGather_ccadde();
+}
+
+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/textureGather/ccadde.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/ccadde.wgsl.expected.msl
new file mode 100644
index 0000000..d72fea5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/ccadde.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureGather_ccadde(texture2d<int, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+  int4 res = tint_symbol_1.gather(tint_symbol_2, float2(0.0f), int2(0), component::y);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<int, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+  textureGather_ccadde(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<int, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<int, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+  textureGather_ccadde(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d<int, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+  textureGather_ccadde(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureGather/ccadde.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/ccadde.wgsl.expected.spvasm
new file mode 100644
index 0000000..b6cd6d1
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/ccadde.wgsl.expected.spvasm
@@ -0,0 +1,87 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 47
+; 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_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %textureGather_ccadde "textureGather_ccadde"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_1 DescriptorSet 1
+               OpDecorate %arg_1 Binding 1
+               OpDecorate %arg_2 DescriptorSet 1
+               OpDecorate %arg_2 Binding 2
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 2D 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_1 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+         %15 = OpTypeSampler
+%_ptr_UniformConstant_15 = OpTypePointer UniformConstant %15
+      %arg_2 = OpVariable %_ptr_UniformConstant_15 UniformConstant
+       %void = OpTypeVoid
+         %16 = OpTypeFunction %void
+      %v4int = OpTypeVector %int 4
+         %24 = OpTypeSampledImage %11
+    %v2float = OpTypeVector %float 2
+         %27 = OpConstantNull %v2float
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+         %32 = OpConstantNull %v4int
+         %33 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureGather_ccadde = OpFunction %void None %16
+         %19 = OpLabel
+        %res = OpVariable %_ptr_Function_v4int Function %32
+         %22 = OpLoad %15 %arg_2
+         %23 = OpLoad %11 %arg_1
+         %25 = OpSampledImage %24 %23 %22
+         %20 = OpImageGather %v4int %25 %27 %uint_1
+               OpStore %res %20
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %33
+         %35 = OpLabel
+         %36 = OpFunctionCall %void %textureGather_ccadde
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %16
+         %38 = OpLabel
+         %39 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %39
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %16
+         %42 = OpLabel
+         %43 = OpFunctionCall %void %textureGather_ccadde
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %16
+         %45 = OpLabel
+         %46 = OpFunctionCall %void %textureGather_ccadde
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureGather/ccadde.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/ccadde.wgsl.expected.wgsl
new file mode 100644
index 0000000..95235f3
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/ccadde.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(1) var arg_1 : texture_2d<i32>;
+
+@group(1) @binding(2) var arg_2 : sampler;
+
+fn textureGather_ccadde() {
+  var res : vec4<i32> = textureGather(1u, arg_1, arg_2, vec2<f32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGather_ccadde();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureGather_ccadde();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureGather_ccadde();
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/ce5578.wgsl b/test/tint/builtins/gen/literal/textureGather/ce5578.wgsl
new file mode 100644
index 0000000..9ab7bfc
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/ce5578.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(1) var arg_1: texture_2d_array<u32>;
+@group(1) @binding(2) var arg_2: sampler;
+
+// fn textureGather(@const component: i32, texture: texture_2d_array<u32>, sampler: sampler, coords: vec2<f32>, array_index: u32, @const offset: vec2<i32>) -> vec4<u32>
+fn textureGather_ce5578() {
+  var res: vec4<u32> = textureGather(1, arg_1, arg_2, vec2<f32>(), 1u, vec2<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGather_ce5578();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureGather_ce5578();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureGather_ce5578();
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/ce5578.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/ce5578.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..b6568c5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/ce5578.wgsl.expected.dxc.hlsl
@@ -0,0 +1,33 @@
+Texture2DArray<uint4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_ce5578() {
+  uint4 res = arg_1.GatherGreen(arg_2, float3(0.0f, 0.0f, float(1u)), (0).xx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureGather_ce5578();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureGather_ce5578();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureGather_ce5578();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/ce5578.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/ce5578.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..b6568c5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/ce5578.wgsl.expected.fxc.hlsl
@@ -0,0 +1,33 @@
+Texture2DArray<uint4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_ce5578() {
+  uint4 res = arg_1.GatherGreen(arg_2, float3(0.0f, 0.0f, float(1u)), (0).xx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureGather_ce5578();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureGather_ce5578();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureGather_ce5578();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/ce5578.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGather/ce5578.wgsl.expected.glsl
new file mode 100644
index 0000000..001c3b0
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/ce5578.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+
+uniform highp usampler2DArray arg_1_arg_2;
+
+void textureGather_ce5578() {
+  uvec4 res = textureGatherOffset(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), ivec2(0), int(1u));
+}
+
+vec4 vertex_main() {
+  textureGather_ce5578();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp usampler2DArray arg_1_arg_2;
+
+void textureGather_ce5578() {
+  uvec4 res = textureGatherOffset(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), ivec2(0), int(1u));
+}
+
+void fragment_main() {
+  textureGather_ce5578();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp usampler2DArray arg_1_arg_2;
+
+void textureGather_ce5578() {
+  uvec4 res = textureGatherOffset(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), ivec2(0), int(1u));
+}
+
+void compute_main() {
+  textureGather_ce5578();
+}
+
+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/textureGather/ce5578.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/ce5578.wgsl.expected.msl
new file mode 100644
index 0000000..0429b24
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/ce5578.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureGather_ce5578(texture2d_array<uint, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+  uint4 res = tint_symbol_1.gather(tint_symbol_2, float2(0.0f), 1u, int2(0), component::y);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<uint, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+  textureGather_ce5578(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<uint, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<uint, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+  textureGather_ce5578(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<uint, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+  textureGather_ce5578(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureGather/ce5578.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/ce5578.wgsl.expected.spvasm
new file mode 100644
index 0000000..367be56
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/ce5578.wgsl.expected.spvasm
@@ -0,0 +1,91 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 51
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %textureGather_ce5578 "textureGather_ce5578"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_1 DescriptorSet 1
+               OpDecorate %arg_1 Binding 1
+               OpDecorate %arg_2 DescriptorSet 1
+               OpDecorate %arg_2 Binding 2
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_1 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+         %15 = OpTypeSampler
+%_ptr_UniformConstant_15 = OpTypePointer UniformConstant %15
+      %arg_2 = OpVariable %_ptr_UniformConstant_15 UniformConstant
+       %void = OpTypeVoid
+         %16 = OpTypeFunction %void
+     %v4uint = OpTypeVector %uint 4
+         %24 = OpTypeSampledImage %11
+    %v3float = OpTypeVector %float 3
+    %float_0 = OpConstant %float 0
+     %uint_1 = OpConstant %uint 1
+        %int = OpTypeInt 32 1
+      %v2int = OpTypeVector %int 2
+         %33 = OpConstantNull %v2int
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+         %36 = OpConstantNull %v4uint
+         %37 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureGather_ce5578 = OpFunction %void None %16
+         %19 = OpLabel
+        %res = OpVariable %_ptr_Function_v4uint Function %36
+         %22 = OpLoad %15 %arg_2
+         %23 = OpLoad %11 %arg_1
+         %25 = OpSampledImage %24 %23 %22
+         %28 = OpConvertUToF %float %uint_1
+         %30 = OpCompositeConstruct %v3float %float_0 %float_0 %28
+         %20 = OpImageGather %v4uint %25 %30 %uint_1 ConstOffset %33
+               OpStore %res %20
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %37
+         %39 = OpLabel
+         %40 = OpFunctionCall %void %textureGather_ce5578
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %16
+         %42 = OpLabel
+         %43 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %43
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %16
+         %46 = OpLabel
+         %47 = OpFunctionCall %void %textureGather_ce5578
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %16
+         %49 = OpLabel
+         %50 = OpFunctionCall %void %textureGather_ce5578
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureGather/ce5578.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/ce5578.wgsl.expected.wgsl
new file mode 100644
index 0000000..f07251c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/ce5578.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(1) var arg_1 : texture_2d_array<u32>;
+
+@group(1) @binding(2) var arg_2 : sampler;
+
+fn textureGather_ce5578() {
+  var res : vec4<u32> = textureGather(1, arg_1, arg_2, vec2<f32>(), 1u, vec2<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGather_ce5578();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureGather_ce5578();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureGather_ce5578();
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/cf9112.wgsl b/test/tint/builtins/gen/literal/textureGather/cf9112.wgsl
new file mode 100644
index 0000000..8b24b97
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/cf9112.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(1) var arg_1: texture_2d_array<i32>;
+@group(1) @binding(2) var arg_2: sampler;
+
+// fn textureGather(@const component: u32, texture: texture_2d_array<i32>, sampler: sampler, coords: vec2<f32>, array_index: u32, @const offset: vec2<i32>) -> vec4<i32>
+fn textureGather_cf9112() {
+  var res: vec4<i32> = textureGather(1u, arg_1, arg_2, vec2<f32>(), 1u, vec2<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGather_cf9112();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureGather_cf9112();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureGather_cf9112();
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/cf9112.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/cf9112.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..eba887e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/cf9112.wgsl.expected.dxc.hlsl
@@ -0,0 +1,33 @@
+Texture2DArray<int4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_cf9112() {
+  int4 res = arg_1.GatherGreen(arg_2, float3(0.0f, 0.0f, float(1u)), (0).xx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureGather_cf9112();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureGather_cf9112();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureGather_cf9112();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/cf9112.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/cf9112.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..eba887e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/cf9112.wgsl.expected.fxc.hlsl
@@ -0,0 +1,33 @@
+Texture2DArray<int4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_cf9112() {
+  int4 res = arg_1.GatherGreen(arg_2, float3(0.0f, 0.0f, float(1u)), (0).xx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureGather_cf9112();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureGather_cf9112();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureGather_cf9112();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/cf9112.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGather/cf9112.wgsl.expected.glsl
new file mode 100644
index 0000000..914fe38
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/cf9112.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+
+uniform highp isampler2DArray arg_1_arg_2;
+
+void textureGather_cf9112() {
+  ivec4 res = textureGatherOffset(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), ivec2(0), int(1u));
+}
+
+vec4 vertex_main() {
+  textureGather_cf9112();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp isampler2DArray arg_1_arg_2;
+
+void textureGather_cf9112() {
+  ivec4 res = textureGatherOffset(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), ivec2(0), int(1u));
+}
+
+void fragment_main() {
+  textureGather_cf9112();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp isampler2DArray arg_1_arg_2;
+
+void textureGather_cf9112() {
+  ivec4 res = textureGatherOffset(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), ivec2(0), int(1u));
+}
+
+void compute_main() {
+  textureGather_cf9112();
+}
+
+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/textureGather/cf9112.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/cf9112.wgsl.expected.msl
new file mode 100644
index 0000000..6692ae7
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/cf9112.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureGather_cf9112(texture2d_array<int, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+  int4 res = tint_symbol_1.gather(tint_symbol_2, float2(0.0f), 1u, int2(0), component::y);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<int, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+  textureGather_cf9112(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<int, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<int, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+  textureGather_cf9112(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<int, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+  textureGather_cf9112(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureGather/cf9112.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/cf9112.wgsl.expected.spvasm
new file mode 100644
index 0000000..6c310ce
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/cf9112.wgsl.expected.spvasm
@@ -0,0 +1,91 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 51
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %textureGather_cf9112 "textureGather_cf9112"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_1 DescriptorSet 1
+               OpDecorate %arg_1 Binding 1
+               OpDecorate %arg_2 DescriptorSet 1
+               OpDecorate %arg_2 Binding 2
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_1 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+         %15 = OpTypeSampler
+%_ptr_UniformConstant_15 = OpTypePointer UniformConstant %15
+      %arg_2 = OpVariable %_ptr_UniformConstant_15 UniformConstant
+       %void = OpTypeVoid
+         %16 = OpTypeFunction %void
+      %v4int = OpTypeVector %int 4
+         %24 = OpTypeSampledImage %11
+    %v3float = OpTypeVector %float 3
+    %float_0 = OpConstant %float 0
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+      %v2int = OpTypeVector %int 2
+         %33 = OpConstantNull %v2int
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+         %36 = OpConstantNull %v4int
+         %37 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureGather_cf9112 = OpFunction %void None %16
+         %19 = OpLabel
+        %res = OpVariable %_ptr_Function_v4int Function %36
+         %22 = OpLoad %15 %arg_2
+         %23 = OpLoad %11 %arg_1
+         %25 = OpSampledImage %24 %23 %22
+         %28 = OpConvertUToF %float %uint_1
+         %31 = OpCompositeConstruct %v3float %float_0 %float_0 %28
+         %20 = OpImageGather %v4int %25 %31 %uint_1 ConstOffset %33
+               OpStore %res %20
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %37
+         %39 = OpLabel
+         %40 = OpFunctionCall %void %textureGather_cf9112
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %16
+         %42 = OpLabel
+         %43 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %43
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %16
+         %46 = OpLabel
+         %47 = OpFunctionCall %void %textureGather_cf9112
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %16
+         %49 = OpLabel
+         %50 = OpFunctionCall %void %textureGather_cf9112
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureGather/cf9112.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/cf9112.wgsl.expected.wgsl
new file mode 100644
index 0000000..2bae0ef
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/cf9112.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(1) var arg_1 : texture_2d_array<i32>;
+
+@group(1) @binding(2) var arg_2 : sampler;
+
+fn textureGather_cf9112() {
+  var res : vec4<i32> = textureGather(1u, arg_1, arg_2, vec2<f32>(), 1u, vec2<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGather_cf9112();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureGather_cf9112();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureGather_cf9112();
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/d6507c.wgsl b/test/tint/builtins/gen/literal/textureGather/d6507c.wgsl
new file mode 100644
index 0000000..8ba6169
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/d6507c.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(1) var arg_1: texture_2d<f32>;
+@group(1) @binding(2) var arg_2: sampler;
+
+// fn textureGather(@const component: u32, texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>, @const offset: vec2<i32>) -> vec4<f32>
+fn textureGather_d6507c() {
+  var res: vec4<f32> = textureGather(1u, arg_1, arg_2, vec2<f32>(), vec2<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGather_d6507c();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureGather_d6507c();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureGather_d6507c();
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/d6507c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/d6507c.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..5cff95a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/d6507c.wgsl.expected.dxc.hlsl
@@ -0,0 +1,33 @@
+Texture2D<float4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_d6507c() {
+  float4 res = arg_1.GatherGreen(arg_2, (0.0f).xx, (0).xx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureGather_d6507c();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureGather_d6507c();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureGather_d6507c();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/d6507c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/d6507c.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..5cff95a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/d6507c.wgsl.expected.fxc.hlsl
@@ -0,0 +1,33 @@
+Texture2D<float4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_d6507c() {
+  float4 res = arg_1.GatherGreen(arg_2, (0.0f).xx, (0).xx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureGather_d6507c();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureGather_d6507c();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureGather_d6507c();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/d6507c.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGather/d6507c.wgsl.expected.glsl
new file mode 100644
index 0000000..784e65a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/d6507c.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+
+uniform highp sampler2D arg_1_arg_2;
+
+void textureGather_d6507c() {
+  vec4 res = textureGatherOffset(arg_1_arg_2, vec2(0.0f), ivec2(0), int(1u));
+}
+
+vec4 vertex_main() {
+  textureGather_d6507c();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2D arg_1_arg_2;
+
+void textureGather_d6507c() {
+  vec4 res = textureGatherOffset(arg_1_arg_2, vec2(0.0f), ivec2(0), int(1u));
+}
+
+void fragment_main() {
+  textureGather_d6507c();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp sampler2D arg_1_arg_2;
+
+void textureGather_d6507c() {
+  vec4 res = textureGatherOffset(arg_1_arg_2, vec2(0.0f), ivec2(0), int(1u));
+}
+
+void compute_main() {
+  textureGather_d6507c();
+}
+
+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/textureGather/d6507c.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/d6507c.wgsl.expected.msl
new file mode 100644
index 0000000..09b4070
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/d6507c.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureGather_d6507c(texture2d<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+  float4 res = tint_symbol_1.gather(tint_symbol_2, float2(0.0f), int2(0), component::y);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<float, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+  textureGather_d6507c(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+  textureGather_d6507c(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+  textureGather_d6507c(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureGather/d6507c.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/d6507c.wgsl.expected.spvasm
new file mode 100644
index 0000000..04e9724
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/d6507c.wgsl.expected.spvasm
@@ -0,0 +1,87 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 47
+; 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_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %textureGather_d6507c "textureGather_d6507c"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_1 DescriptorSet 1
+               OpDecorate %arg_1 Binding 1
+               OpDecorate %arg_2 DescriptorSet 1
+               OpDecorate %arg_2 Binding 2
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_1 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+         %14 = OpTypeSampler
+%_ptr_UniformConstant_14 = OpTypePointer UniformConstant %14
+      %arg_2 = OpVariable %_ptr_UniformConstant_14 UniformConstant
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+         %22 = OpTypeSampledImage %11
+    %v2float = OpTypeVector %float 2
+         %25 = OpConstantNull %v2float
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+        %int = OpTypeInt 32 1
+      %v2int = OpTypeVector %int 2
+         %30 = OpConstantNull %v2int
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+         %33 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureGather_d6507c = OpFunction %void None %15
+         %18 = OpLabel
+        %res = OpVariable %_ptr_Function_v4float Function %5
+         %20 = OpLoad %14 %arg_2
+         %21 = OpLoad %11 %arg_1
+         %23 = OpSampledImage %22 %21 %20
+         %19 = OpImageGather %v4float %23 %25 %uint_1 ConstOffset %30
+               OpStore %res %19
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %33
+         %35 = OpLabel
+         %36 = OpFunctionCall %void %textureGather_d6507c
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %38 = OpLabel
+         %39 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %39
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %42 = OpLabel
+         %43 = OpFunctionCall %void %textureGather_d6507c
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %45 = OpLabel
+         %46 = OpFunctionCall %void %textureGather_d6507c
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureGather/d6507c.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/d6507c.wgsl.expected.wgsl
new file mode 100644
index 0000000..b30e7d6
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/d6507c.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(1) var arg_1 : texture_2d<f32>;
+
+@group(1) @binding(2) var arg_2 : sampler;
+
+fn textureGather_d6507c() {
+  var res : vec4<f32> = textureGather(1u, arg_1, arg_2, vec2<f32>(), vec2<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGather_d6507c();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureGather_d6507c();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureGather_d6507c();
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/d8e958.wgsl b/test/tint/builtins/gen/literal/textureGather/d8e958.wgsl
new file mode 100644
index 0000000..ab46f58
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/d8e958.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(1) var arg_1: texture_2d<f32>;
+@group(1) @binding(2) var arg_2: sampler;
+
+// fn textureGather(@const component: u32, texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>) -> vec4<f32>
+fn textureGather_d8e958() {
+  var res: vec4<f32> = textureGather(1u, arg_1, arg_2, vec2<f32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGather_d8e958();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureGather_d8e958();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureGather_d8e958();
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/d8e958.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/d8e958.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..eebba11
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/d8e958.wgsl.expected.dxc.hlsl
@@ -0,0 +1,33 @@
+Texture2D<float4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_d8e958() {
+  float4 res = arg_1.GatherGreen(arg_2, (0.0f).xx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureGather_d8e958();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureGather_d8e958();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureGather_d8e958();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/d8e958.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/d8e958.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..eebba11
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/d8e958.wgsl.expected.fxc.hlsl
@@ -0,0 +1,33 @@
+Texture2D<float4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_d8e958() {
+  float4 res = arg_1.GatherGreen(arg_2, (0.0f).xx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureGather_d8e958();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureGather_d8e958();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureGather_d8e958();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/d8e958.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGather/d8e958.wgsl.expected.glsl
new file mode 100644
index 0000000..ce1520f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/d8e958.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+
+uniform highp sampler2D arg_1_arg_2;
+
+void textureGather_d8e958() {
+  vec4 res = textureGather(arg_1_arg_2, vec2(0.0f), int(1u));
+}
+
+vec4 vertex_main() {
+  textureGather_d8e958();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2D arg_1_arg_2;
+
+void textureGather_d8e958() {
+  vec4 res = textureGather(arg_1_arg_2, vec2(0.0f), int(1u));
+}
+
+void fragment_main() {
+  textureGather_d8e958();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp sampler2D arg_1_arg_2;
+
+void textureGather_d8e958() {
+  vec4 res = textureGather(arg_1_arg_2, vec2(0.0f), int(1u));
+}
+
+void compute_main() {
+  textureGather_d8e958();
+}
+
+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/textureGather/d8e958.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/d8e958.wgsl.expected.msl
new file mode 100644
index 0000000..0f6d277
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/d8e958.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureGather_d8e958(texture2d<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+  float4 res = tint_symbol_1.gather(tint_symbol_2, float2(0.0f), int2(0), component::y);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<float, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+  textureGather_d8e958(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+  textureGather_d8e958(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+  textureGather_d8e958(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureGather/d8e958.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/d8e958.wgsl.expected.spvasm
new file mode 100644
index 0000000..accc34f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/d8e958.wgsl.expected.spvasm
@@ -0,0 +1,84 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 44
+; 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_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %textureGather_d8e958 "textureGather_d8e958"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_1 DescriptorSet 1
+               OpDecorate %arg_1 Binding 1
+               OpDecorate %arg_2 DescriptorSet 1
+               OpDecorate %arg_2 Binding 2
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_1 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+         %14 = OpTypeSampler
+%_ptr_UniformConstant_14 = OpTypePointer UniformConstant %14
+      %arg_2 = OpVariable %_ptr_UniformConstant_14 UniformConstant
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+         %22 = OpTypeSampledImage %11
+    %v2float = OpTypeVector %float 2
+         %25 = OpConstantNull %v2float
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+         %30 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureGather_d8e958 = OpFunction %void None %15
+         %18 = OpLabel
+        %res = OpVariable %_ptr_Function_v4float Function %5
+         %20 = OpLoad %14 %arg_2
+         %21 = OpLoad %11 %arg_1
+         %23 = OpSampledImage %22 %21 %20
+         %19 = OpImageGather %v4float %23 %25 %uint_1
+               OpStore %res %19
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %30
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %textureGather_d8e958
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %35 = OpLabel
+         %36 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %36
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %39 = OpLabel
+         %40 = OpFunctionCall %void %textureGather_d8e958
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %42 = OpLabel
+         %43 = OpFunctionCall %void %textureGather_d8e958
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureGather/d8e958.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/d8e958.wgsl.expected.wgsl
new file mode 100644
index 0000000..bbc0a35
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/d8e958.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(1) var arg_1 : texture_2d<f32>;
+
+@group(1) @binding(2) var arg_2 : sampler;
+
+fn textureGather_d8e958() {
+  var res : vec4<f32> = textureGather(1u, arg_1, arg_2, vec2<f32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGather_d8e958();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureGather_d8e958();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureGather_d8e958();
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/dc6661.wgsl b/test/tint/builtins/gen/literal/textureGather/dc6661.wgsl
new file mode 100644
index 0000000..8d8fe8a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/dc6661.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(1) var arg_1: texture_2d<i32>;
+@group(1) @binding(2) var arg_2: sampler;
+
+// fn textureGather(@const component: u32, texture: texture_2d<i32>, sampler: sampler, coords: vec2<f32>, @const offset: vec2<i32>) -> vec4<i32>
+fn textureGather_dc6661() {
+  var res: vec4<i32> = textureGather(1u, arg_1, arg_2, vec2<f32>(), vec2<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGather_dc6661();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureGather_dc6661();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureGather_dc6661();
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/dc6661.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/dc6661.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..9a1ecb6
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/dc6661.wgsl.expected.dxc.hlsl
@@ -0,0 +1,33 @@
+Texture2D<int4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_dc6661() {
+  int4 res = arg_1.GatherGreen(arg_2, (0.0f).xx, (0).xx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureGather_dc6661();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureGather_dc6661();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureGather_dc6661();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/dc6661.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/dc6661.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..9a1ecb6
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/dc6661.wgsl.expected.fxc.hlsl
@@ -0,0 +1,33 @@
+Texture2D<int4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_dc6661() {
+  int4 res = arg_1.GatherGreen(arg_2, (0.0f).xx, (0).xx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureGather_dc6661();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureGather_dc6661();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureGather_dc6661();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/dc6661.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGather/dc6661.wgsl.expected.glsl
new file mode 100644
index 0000000..1241fbb
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/dc6661.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+
+uniform highp isampler2D arg_1_arg_2;
+
+void textureGather_dc6661() {
+  ivec4 res = textureGatherOffset(arg_1_arg_2, vec2(0.0f), ivec2(0), int(1u));
+}
+
+vec4 vertex_main() {
+  textureGather_dc6661();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp isampler2D arg_1_arg_2;
+
+void textureGather_dc6661() {
+  ivec4 res = textureGatherOffset(arg_1_arg_2, vec2(0.0f), ivec2(0), int(1u));
+}
+
+void fragment_main() {
+  textureGather_dc6661();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp isampler2D arg_1_arg_2;
+
+void textureGather_dc6661() {
+  ivec4 res = textureGatherOffset(arg_1_arg_2, vec2(0.0f), ivec2(0), int(1u));
+}
+
+void compute_main() {
+  textureGather_dc6661();
+}
+
+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/textureGather/dc6661.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/dc6661.wgsl.expected.msl
new file mode 100644
index 0000000..a998cf1
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/dc6661.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureGather_dc6661(texture2d<int, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+  int4 res = tint_symbol_1.gather(tint_symbol_2, float2(0.0f), int2(0), component::y);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<int, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+  textureGather_dc6661(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<int, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<int, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+  textureGather_dc6661(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d<int, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+  textureGather_dc6661(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureGather/dc6661.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/dc6661.wgsl.expected.spvasm
new file mode 100644
index 0000000..a090bed
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/dc6661.wgsl.expected.spvasm
@@ -0,0 +1,89 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 49
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %textureGather_dc6661 "textureGather_dc6661"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_1 DescriptorSet 1
+               OpDecorate %arg_1 Binding 1
+               OpDecorate %arg_2 DescriptorSet 1
+               OpDecorate %arg_2 Binding 2
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 2D 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_1 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+         %15 = OpTypeSampler
+%_ptr_UniformConstant_15 = OpTypePointer UniformConstant %15
+      %arg_2 = OpVariable %_ptr_UniformConstant_15 UniformConstant
+       %void = OpTypeVoid
+         %16 = OpTypeFunction %void
+      %v4int = OpTypeVector %int 4
+         %24 = OpTypeSampledImage %11
+    %v2float = OpTypeVector %float 2
+         %27 = OpConstantNull %v2float
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+      %v2int = OpTypeVector %int 2
+         %31 = OpConstantNull %v2int
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+         %34 = OpConstantNull %v4int
+         %35 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureGather_dc6661 = OpFunction %void None %16
+         %19 = OpLabel
+        %res = OpVariable %_ptr_Function_v4int Function %34
+         %22 = OpLoad %15 %arg_2
+         %23 = OpLoad %11 %arg_1
+         %25 = OpSampledImage %24 %23 %22
+         %20 = OpImageGather %v4int %25 %27 %uint_1 ConstOffset %31
+               OpStore %res %20
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %35
+         %37 = OpLabel
+         %38 = OpFunctionCall %void %textureGather_dc6661
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %16
+         %40 = OpLabel
+         %41 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %41
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %16
+         %44 = OpLabel
+         %45 = OpFunctionCall %void %textureGather_dc6661
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %16
+         %47 = OpLabel
+         %48 = OpFunctionCall %void %textureGather_dc6661
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureGather/dc6661.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/dc6661.wgsl.expected.wgsl
new file mode 100644
index 0000000..607129c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/dc6661.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(1) var arg_1 : texture_2d<i32>;
+
+@group(1) @binding(2) var arg_2 : sampler;
+
+fn textureGather_dc6661() {
+  var res : vec4<i32> = textureGather(1u, arg_1, arg_2, vec2<f32>(), vec2<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGather_dc6661();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureGather_dc6661();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureGather_dc6661();
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/e2acac.wgsl b/test/tint/builtins/gen/literal/textureGather/e2acac.wgsl
new file mode 100644
index 0000000..d0167f4
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/e2acac.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(1) var arg_1: texture_cube_array<u32>;
+@group(1) @binding(2) var arg_2: sampler;
+
+// fn textureGather(@const component: u32, texture: texture_cube_array<u32>, sampler: sampler, coords: vec3<f32>, array_index: u32) -> vec4<u32>
+fn textureGather_e2acac() {
+  var res: vec4<u32> = textureGather(1u, arg_1, arg_2, vec3<f32>(), 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGather_e2acac();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureGather_e2acac();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureGather_e2acac();
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/e2acac.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/e2acac.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..a3337ec
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/e2acac.wgsl.expected.dxc.hlsl
@@ -0,0 +1,33 @@
+TextureCubeArray<uint4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_e2acac() {
+  uint4 res = arg_1.GatherGreen(arg_2, float4(0.0f, 0.0f, 0.0f, float(1u)));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureGather_e2acac();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureGather_e2acac();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureGather_e2acac();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/e2acac.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/e2acac.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..a3337ec
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/e2acac.wgsl.expected.fxc.hlsl
@@ -0,0 +1,33 @@
+TextureCubeArray<uint4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_e2acac() {
+  uint4 res = arg_1.GatherGreen(arg_2, float4(0.0f, 0.0f, 0.0f, float(1u)));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureGather_e2acac();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureGather_e2acac();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureGather_e2acac();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/e2acac.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGather/e2acac.wgsl.expected.glsl
new file mode 100644
index 0000000..40eaec4
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/e2acac.wgsl.expected.glsl
@@ -0,0 +1,78 @@
+SKIP: FAILED
+
+#version 310 es
+
+uniform highp usamplerCubeArray arg_1_arg_2;
+
+void textureGather_e2acac() {
+  uvec4 res = textureGather(arg_1_arg_2, vec4(0.0f, 0.0f, 0.0f, float(1u)), int(1u));
+}
+
+vec4 vertex_main() {
+  textureGather_e2acac();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'usamplerCubeArray' : Reserved word. 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+uniform highp usamplerCubeArray arg_1_arg_2;
+
+void textureGather_e2acac() {
+  uvec4 res = textureGather(arg_1_arg_2, vec4(0.0f, 0.0f, 0.0f, float(1u)), int(1u));
+}
+
+void fragment_main() {
+  textureGather_e2acac();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'usamplerCubeArray' : Reserved word. 
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+uniform highp usamplerCubeArray arg_1_arg_2;
+
+void textureGather_e2acac() {
+  uvec4 res = textureGather(arg_1_arg_2, vec4(0.0f, 0.0f, 0.0f, float(1u)), int(1u));
+}
+
+void compute_main() {
+  textureGather_e2acac();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'usamplerCubeArray' : Reserved word. 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureGather/e2acac.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/e2acac.wgsl.expected.msl
new file mode 100644
index 0000000..23a18ae
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/e2acac.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureGather_e2acac(texturecube_array<uint, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+  uint4 res = tint_symbol_1.gather(tint_symbol_2, float3(0.0f), 1u, component::y);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texturecube_array<uint, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+  textureGather_e2acac(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texturecube_array<uint, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texturecube_array<uint, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+  textureGather_e2acac(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texturecube_array<uint, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+  textureGather_e2acac(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureGather/e2acac.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/e2acac.wgsl.expected.spvasm
new file mode 100644
index 0000000..31bb98c3
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/e2acac.wgsl.expected.spvasm
@@ -0,0 +1,88 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 47
+; Schema: 0
+               OpCapability Shader
+               OpCapability SampledCubeArray
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %textureGather_e2acac "textureGather_e2acac"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_1 DescriptorSet 1
+               OpDecorate %arg_1 Binding 1
+               OpDecorate %arg_2 DescriptorSet 1
+               OpDecorate %arg_2 Binding 2
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint Cube 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_1 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+         %15 = OpTypeSampler
+%_ptr_UniformConstant_15 = OpTypePointer UniformConstant %15
+      %arg_2 = OpVariable %_ptr_UniformConstant_15 UniformConstant
+       %void = OpTypeVoid
+         %16 = OpTypeFunction %void
+     %v4uint = OpTypeVector %uint 4
+         %24 = OpTypeSampledImage %11
+    %float_0 = OpConstant %float 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+         %32 = OpConstantNull %v4uint
+         %33 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureGather_e2acac = OpFunction %void None %16
+         %19 = OpLabel
+        %res = OpVariable %_ptr_Function_v4uint Function %32
+         %22 = OpLoad %15 %arg_2
+         %23 = OpLoad %11 %arg_1
+         %25 = OpSampledImage %24 %23 %22
+         %27 = OpConvertUToF %float %uint_1
+         %29 = OpCompositeConstruct %v4float %float_0 %float_0 %float_0 %27
+         %20 = OpImageGather %v4uint %25 %29 %uint_1
+               OpStore %res %20
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %33
+         %35 = OpLabel
+         %36 = OpFunctionCall %void %textureGather_e2acac
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %16
+         %38 = OpLabel
+         %39 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %39
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %16
+         %42 = OpLabel
+         %43 = OpFunctionCall %void %textureGather_e2acac
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %16
+         %45 = OpLabel
+         %46 = OpFunctionCall %void %textureGather_e2acac
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureGather/e2acac.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/e2acac.wgsl.expected.wgsl
new file mode 100644
index 0000000..f1b2b9c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/e2acac.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(1) var arg_1 : texture_cube_array<u32>;
+
+@group(1) @binding(2) var arg_2 : sampler;
+
+fn textureGather_e2acac() {
+  var res : vec4<u32> = textureGather(1u, arg_1, arg_2, vec3<f32>(), 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGather_e2acac();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureGather_e2acac();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureGather_e2acac();
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/ea8eb4.wgsl b/test/tint/builtins/gen/literal/textureGather/ea8eb4.wgsl
new file mode 100644
index 0000000..66b6aca
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/ea8eb4.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(1) var arg_1: texture_2d_array<f32>;
+@group(1) @binding(2) var arg_2: sampler;
+
+// fn textureGather(@const component: u32, texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: u32) -> vec4<f32>
+fn textureGather_ea8eb4() {
+  var res: vec4<f32> = textureGather(1u, arg_1, arg_2, vec2<f32>(), 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGather_ea8eb4();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureGather_ea8eb4();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureGather_ea8eb4();
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/ea8eb4.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/ea8eb4.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..3e69b66
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/ea8eb4.wgsl.expected.dxc.hlsl
@@ -0,0 +1,33 @@
+Texture2DArray<float4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_ea8eb4() {
+  float4 res = arg_1.GatherGreen(arg_2, float3(0.0f, 0.0f, float(1u)));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureGather_ea8eb4();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureGather_ea8eb4();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureGather_ea8eb4();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/ea8eb4.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/ea8eb4.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..3e69b66
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/ea8eb4.wgsl.expected.fxc.hlsl
@@ -0,0 +1,33 @@
+Texture2DArray<float4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_ea8eb4() {
+  float4 res = arg_1.GatherGreen(arg_2, float3(0.0f, 0.0f, float(1u)));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureGather_ea8eb4();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureGather_ea8eb4();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureGather_ea8eb4();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureGather/ea8eb4.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGather/ea8eb4.wgsl.expected.glsl
new file mode 100644
index 0000000..4c080b4
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/ea8eb4.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+
+uniform highp sampler2DArray arg_1_arg_2;
+
+void textureGather_ea8eb4() {
+  vec4 res = textureGather(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), int(1u));
+}
+
+vec4 vertex_main() {
+  textureGather_ea8eb4();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2DArray arg_1_arg_2;
+
+void textureGather_ea8eb4() {
+  vec4 res = textureGather(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), int(1u));
+}
+
+void fragment_main() {
+  textureGather_ea8eb4();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp sampler2DArray arg_1_arg_2;
+
+void textureGather_ea8eb4() {
+  vec4 res = textureGather(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), int(1u));
+}
+
+void compute_main() {
+  textureGather_ea8eb4();
+}
+
+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/textureGather/ea8eb4.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/ea8eb4.wgsl.expected.msl
new file mode 100644
index 0000000..258c198
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/ea8eb4.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureGather_ea8eb4(texture2d_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+  float4 res = tint_symbol_1.gather(tint_symbol_2, float2(0.0f), 1u, int2(0), component::y);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<float, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+  textureGather_ea8eb4(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+  textureGather_ea8eb4(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+  textureGather_ea8eb4(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureGather/ea8eb4.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/ea8eb4.wgsl.expected.spvasm
new file mode 100644
index 0000000..e7c0ab1
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/ea8eb4.wgsl.expected.spvasm
@@ -0,0 +1,86 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 46
+; 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_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %textureGather_ea8eb4 "textureGather_ea8eb4"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_1 DescriptorSet 1
+               OpDecorate %arg_1 Binding 1
+               OpDecorate %arg_2 DescriptorSet 1
+               OpDecorate %arg_2 Binding 2
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_1 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+         %14 = OpTypeSampler
+%_ptr_UniformConstant_14 = OpTypePointer UniformConstant %14
+      %arg_2 = OpVariable %_ptr_UniformConstant_14 UniformConstant
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+         %22 = OpTypeSampledImage %11
+    %v3float = OpTypeVector %float 3
+    %float_0 = OpConstant %float 0
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+         %32 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureGather_ea8eb4 = OpFunction %void None %15
+         %18 = OpLabel
+        %res = OpVariable %_ptr_Function_v4float Function %5
+         %20 = OpLoad %14 %arg_2
+         %21 = OpLoad %11 %arg_1
+         %23 = OpSampledImage %22 %21 %20
+         %26 = OpConvertUToF %float %uint_1
+         %29 = OpCompositeConstruct %v3float %float_0 %float_0 %26
+         %19 = OpImageGather %v4float %23 %29 %uint_1
+               OpStore %res %19
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %32
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %textureGather_ea8eb4
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %37 = OpLabel
+         %38 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %38
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %41 = OpLabel
+         %42 = OpFunctionCall %void %textureGather_ea8eb4
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %44 = OpLabel
+         %45 = OpFunctionCall %void %textureGather_ea8eb4
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureGather/ea8eb4.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/ea8eb4.wgsl.expected.wgsl
new file mode 100644
index 0000000..238176e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGather/ea8eb4.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(1) var arg_1 : texture_2d_array<f32>;
+
+@group(1) @binding(2) var arg_2 : sampler;
+
+fn textureGather_ea8eb4() {
+  var res : vec4<f32> = textureGather(1u, arg_1, arg_2, vec2<f32>(), 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGather_ea8eb4();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureGather_ea8eb4();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureGather_ea8eb4();
+}
diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/144a9a.wgsl b/test/tint/builtins/gen/literal/textureGatherCompare/144a9a.wgsl
new file mode 100644
index 0000000..23d232d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGatherCompare/144a9a.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_depth_2d_array;
+@group(1) @binding(1) var arg_1: sampler_comparison;
+
+// fn textureGatherCompare(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2<f32>, array_index: u32, depth_ref: f32, @const offset: vec2<i32>) -> vec4<f32>
+fn textureGatherCompare_144a9a() {
+  var res: vec4<f32> = textureGatherCompare(arg_0, arg_1, vec2<f32>(), 1u, 1.f, vec2<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGatherCompare_144a9a();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureGatherCompare_144a9a();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureGatherCompare_144a9a();
+}
diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/144a9a.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGatherCompare/144a9a.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..59db391
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGatherCompare/144a9a.wgsl.expected.dxc.hlsl
@@ -0,0 +1,33 @@
+Texture2DArray arg_0 : register(t0, space1);
+SamplerComparisonState arg_1 : register(s1, space1);
+
+void textureGatherCompare_144a9a() {
+  float4 res = arg_0.GatherCmp(arg_1, float3(0.0f, 0.0f, float(1u)), 1.0f, (0).xx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureGatherCompare_144a9a();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureGatherCompare_144a9a();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureGatherCompare_144a9a();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/144a9a.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGatherCompare/144a9a.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..59db391
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGatherCompare/144a9a.wgsl.expected.fxc.hlsl
@@ -0,0 +1,33 @@
+Texture2DArray arg_0 : register(t0, space1);
+SamplerComparisonState arg_1 : register(s1, space1);
+
+void textureGatherCompare_144a9a() {
+  float4 res = arg_0.GatherCmp(arg_1, float3(0.0f, 0.0f, float(1u)), 1.0f, (0).xx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureGatherCompare_144a9a();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureGatherCompare_144a9a();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureGatherCompare_144a9a();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/144a9a.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGatherCompare/144a9a.wgsl.expected.glsl
new file mode 100644
index 0000000..8c6787a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGatherCompare/144a9a.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+
+uniform highp sampler2DArrayShadow arg_0_arg_1;
+
+void textureGatherCompare_144a9a() {
+  vec4 res = textureGatherOffset(arg_0_arg_1, vec3(0.0f, 0.0f, float(1u)), 1.0f, ivec2(0));
+}
+
+vec4 vertex_main() {
+  textureGatherCompare_144a9a();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2DArrayShadow arg_0_arg_1;
+
+void textureGatherCompare_144a9a() {
+  vec4 res = textureGatherOffset(arg_0_arg_1, vec3(0.0f, 0.0f, float(1u)), 1.0f, ivec2(0));
+}
+
+void fragment_main() {
+  textureGatherCompare_144a9a();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp sampler2DArrayShadow arg_0_arg_1;
+
+void textureGatherCompare_144a9a() {
+  vec4 res = textureGatherOffset(arg_0_arg_1, vec3(0.0f, 0.0f, float(1u)), 1.0f, ivec2(0));
+}
+
+void compute_main() {
+  textureGatherCompare_144a9a();
+}
+
+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/textureGatherCompare/144a9a.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGatherCompare/144a9a.wgsl.expected.msl
new file mode 100644
index 0000000..0d772d3
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGatherCompare/144a9a.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureGatherCompare_144a9a(depth2d_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+  float4 res = tint_symbol_1.gather_compare(tint_symbol_2, float2(0.0f), 1u, 1.0f, int2(0));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(depth2d_array<float, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+  textureGatherCompare_144a9a(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(depth2d_array<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(depth2d_array<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+  textureGatherCompare_144a9a(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(depth2d_array<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+  textureGatherCompare_144a9a(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/144a9a.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGatherCompare/144a9a.wgsl.expected.spvasm
new file mode 100644
index 0000000..b80ccb6
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGatherCompare/144a9a.wgsl.expected.spvasm
@@ -0,0 +1,89 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 49
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %arg_1 "arg_1"
+               OpName %textureGatherCompare_144a9a "textureGatherCompare_144a9a"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %arg_1 DescriptorSet 1
+               OpDecorate %arg_1 Binding 1
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+         %14 = OpTypeSampler
+%_ptr_UniformConstant_14 = OpTypePointer UniformConstant %14
+      %arg_1 = OpVariable %_ptr_UniformConstant_14 UniformConstant
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+         %22 = OpTypeSampledImage %11
+    %v3float = OpTypeVector %float 3
+    %float_0 = OpConstant %float 0
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+    %float_1 = OpConstant %float 1
+        %int = OpTypeInt 32 1
+      %v2int = OpTypeVector %int 2
+         %33 = OpConstantNull %v2int
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+         %36 = OpTypeFunction %v4float
+%textureGatherCompare_144a9a = OpFunction %void None %15
+         %18 = OpLabel
+        %res = OpVariable %_ptr_Function_v4float Function %5
+         %20 = OpLoad %14 %arg_1
+         %21 = OpLoad %11 %arg_0
+         %23 = OpSampledImage %22 %21 %20
+         %26 = OpConvertUToF %float %uint_1
+         %29 = OpCompositeConstruct %v3float %float_0 %float_0 %26
+         %19 = OpImageDrefGather %v4float %23 %29 %float_1 ConstOffset %33
+               OpStore %res %19
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %36
+         %38 = OpLabel
+         %39 = OpFunctionCall %void %textureGatherCompare_144a9a
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %41 = OpLabel
+         %42 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %42
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %44 = OpLabel
+         %45 = OpFunctionCall %void %textureGatherCompare_144a9a
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %47 = OpLabel
+         %48 = OpFunctionCall %void %textureGatherCompare_144a9a
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/144a9a.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGatherCompare/144a9a.wgsl.expected.wgsl
new file mode 100644
index 0000000..3645762
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGatherCompare/144a9a.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(0) var arg_0 : texture_depth_2d_array;
+
+@group(1) @binding(1) var arg_1 : sampler_comparison;
+
+fn textureGatherCompare_144a9a() {
+  var res : vec4<f32> = textureGatherCompare(arg_0, arg_1, vec2<f32>(), 1u, 1.0f, vec2<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGatherCompare_144a9a();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureGatherCompare_144a9a();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureGatherCompare_144a9a();
+}
diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/2e409c.wgsl b/test/tint/builtins/gen/literal/textureGatherCompare/2e409c.wgsl
new file mode 100644
index 0000000..256e202
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGatherCompare/2e409c.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_depth_cube_array;
+@group(1) @binding(1) var arg_1: sampler_comparison;
+
+// fn textureGatherCompare(texture: texture_depth_cube_array, sampler: sampler_comparison, coords: vec3<f32>, array_index: u32, depth_ref: f32) -> vec4<f32>
+fn textureGatherCompare_2e409c() {
+  var res: vec4<f32> = textureGatherCompare(arg_0, arg_1, vec3<f32>(), 1u, 1.f);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGatherCompare_2e409c();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureGatherCompare_2e409c();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureGatherCompare_2e409c();
+}
diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/2e409c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGatherCompare/2e409c.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..a218553
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGatherCompare/2e409c.wgsl.expected.dxc.hlsl
@@ -0,0 +1,33 @@
+TextureCubeArray arg_0 : register(t0, space1);
+SamplerComparisonState arg_1 : register(s1, space1);
+
+void textureGatherCompare_2e409c() {
+  float4 res = arg_0.GatherCmp(arg_1, float4(0.0f, 0.0f, 0.0f, float(1u)), 1.0f);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureGatherCompare_2e409c();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureGatherCompare_2e409c();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureGatherCompare_2e409c();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/2e409c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGatherCompare/2e409c.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..a218553
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGatherCompare/2e409c.wgsl.expected.fxc.hlsl
@@ -0,0 +1,33 @@
+TextureCubeArray arg_0 : register(t0, space1);
+SamplerComparisonState arg_1 : register(s1, space1);
+
+void textureGatherCompare_2e409c() {
+  float4 res = arg_0.GatherCmp(arg_1, float4(0.0f, 0.0f, 0.0f, float(1u)), 1.0f);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureGatherCompare_2e409c();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureGatherCompare_2e409c();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureGatherCompare_2e409c();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/2e409c.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGatherCompare/2e409c.wgsl.expected.glsl
new file mode 100644
index 0000000..c7efa64
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGatherCompare/2e409c.wgsl.expected.glsl
@@ -0,0 +1,78 @@
+SKIP: FAILED
+
+#version 310 es
+
+uniform highp samplerCubeArrayShadow arg_0_arg_1;
+
+void textureGatherCompare_2e409c() {
+  vec4 res = textureGather(arg_0_arg_1, vec4(0.0f, 0.0f, 0.0f, float(1u)), 1.0f);
+}
+
+vec4 vertex_main() {
+  textureGatherCompare_2e409c();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  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: 'samplerCubeArrayShadow' : Reserved word. 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+uniform highp samplerCubeArrayShadow arg_0_arg_1;
+
+void textureGatherCompare_2e409c() {
+  vec4 res = textureGather(arg_0_arg_1, vec4(0.0f, 0.0f, 0.0f, float(1u)), 1.0f);
+}
+
+void fragment_main() {
+  textureGatherCompare_2e409c();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'samplerCubeArrayShadow' : Reserved word. 
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+uniform highp samplerCubeArrayShadow arg_0_arg_1;
+
+void textureGatherCompare_2e409c() {
+  vec4 res = textureGather(arg_0_arg_1, vec4(0.0f, 0.0f, 0.0f, float(1u)), 1.0f);
+}
+
+void compute_main() {
+  textureGatherCompare_2e409c();
+}
+
+layout(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: 'samplerCubeArrayShadow' : Reserved word. 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/2e409c.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGatherCompare/2e409c.wgsl.expected.msl
new file mode 100644
index 0000000..30ff99a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGatherCompare/2e409c.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureGatherCompare_2e409c(depthcube_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+  float4 res = tint_symbol_1.gather_compare(tint_symbol_2, float3(0.0f), 1u, 1.0f);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(depthcube_array<float, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+  textureGatherCompare_2e409c(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(depthcube_array<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(depthcube_array<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+  textureGatherCompare_2e409c(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(depthcube_array<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+  textureGatherCompare_2e409c(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/2e409c.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGatherCompare/2e409c.wgsl.expected.spvasm
new file mode 100644
index 0000000..9c8dc27
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGatherCompare/2e409c.wgsl.expected.spvasm
@@ -0,0 +1,86 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 45
+; Schema: 0
+               OpCapability Shader
+               OpCapability SampledCubeArray
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %arg_1 "arg_1"
+               OpName %textureGatherCompare_2e409c "textureGatherCompare_2e409c"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %arg_1 DescriptorSet 1
+               OpDecorate %arg_1 Binding 1
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float Cube 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+         %14 = OpTypeSampler
+%_ptr_UniformConstant_14 = OpTypePointer UniformConstant %14
+      %arg_1 = OpVariable %_ptr_UniformConstant_14 UniformConstant
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+         %22 = OpTypeSampledImage %11
+    %float_0 = OpConstant %float 0
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+    %float_1 = OpConstant %float 1
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+         %32 = OpTypeFunction %v4float
+%textureGatherCompare_2e409c = OpFunction %void None %15
+         %18 = OpLabel
+        %res = OpVariable %_ptr_Function_v4float Function %5
+         %20 = OpLoad %14 %arg_1
+         %21 = OpLoad %11 %arg_0
+         %23 = OpSampledImage %22 %21 %20
+         %25 = OpConvertUToF %float %uint_1
+         %28 = OpCompositeConstruct %v4float %float_0 %float_0 %float_0 %25
+         %19 = OpImageDrefGather %v4float %23 %28 %float_1
+               OpStore %res %19
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %32
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %textureGatherCompare_2e409c
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %37 = OpLabel
+         %38 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %38
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %textureGatherCompare_2e409c
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %43 = OpLabel
+         %44 = OpFunctionCall %void %textureGatherCompare_2e409c
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/2e409c.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGatherCompare/2e409c.wgsl.expected.wgsl
new file mode 100644
index 0000000..f45cdf9
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGatherCompare/2e409c.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(0) var arg_0 : texture_depth_cube_array;
+
+@group(1) @binding(1) var arg_1 : sampler_comparison;
+
+fn textureGatherCompare_2e409c() {
+  var res : vec4<f32> = textureGatherCompare(arg_0, arg_1, vec3<f32>(), 1u, 1.0f);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGatherCompare_2e409c();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureGatherCompare_2e409c();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureGatherCompare_2e409c();
+}
diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/b5bc43.wgsl b/test/tint/builtins/gen/literal/textureGatherCompare/b5bc43.wgsl
new file mode 100644
index 0000000..d75e00e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGatherCompare/b5bc43.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_depth_2d_array;
+@group(1) @binding(1) var arg_1: sampler_comparison;
+
+// fn textureGatherCompare(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2<f32>, array_index: u32, depth_ref: f32) -> vec4<f32>
+fn textureGatherCompare_b5bc43() {
+  var res: vec4<f32> = textureGatherCompare(arg_0, arg_1, vec2<f32>(), 1u, 1.f);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGatherCompare_b5bc43();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureGatherCompare_b5bc43();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureGatherCompare_b5bc43();
+}
diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/b5bc43.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGatherCompare/b5bc43.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..9a9dd99
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGatherCompare/b5bc43.wgsl.expected.dxc.hlsl
@@ -0,0 +1,33 @@
+Texture2DArray arg_0 : register(t0, space1);
+SamplerComparisonState arg_1 : register(s1, space1);
+
+void textureGatherCompare_b5bc43() {
+  float4 res = arg_0.GatherCmp(arg_1, float3(0.0f, 0.0f, float(1u)), 1.0f);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureGatherCompare_b5bc43();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureGatherCompare_b5bc43();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureGatherCompare_b5bc43();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/b5bc43.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGatherCompare/b5bc43.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..9a9dd99
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGatherCompare/b5bc43.wgsl.expected.fxc.hlsl
@@ -0,0 +1,33 @@
+Texture2DArray arg_0 : register(t0, space1);
+SamplerComparisonState arg_1 : register(s1, space1);
+
+void textureGatherCompare_b5bc43() {
+  float4 res = arg_0.GatherCmp(arg_1, float3(0.0f, 0.0f, float(1u)), 1.0f);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureGatherCompare_b5bc43();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureGatherCompare_b5bc43();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureGatherCompare_b5bc43();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/b5bc43.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGatherCompare/b5bc43.wgsl.expected.glsl
new file mode 100644
index 0000000..8860940
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGatherCompare/b5bc43.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+
+uniform highp sampler2DArrayShadow arg_0_arg_1;
+
+void textureGatherCompare_b5bc43() {
+  vec4 res = textureGather(arg_0_arg_1, vec3(0.0f, 0.0f, float(1u)), 1.0f);
+}
+
+vec4 vertex_main() {
+  textureGatherCompare_b5bc43();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2DArrayShadow arg_0_arg_1;
+
+void textureGatherCompare_b5bc43() {
+  vec4 res = textureGather(arg_0_arg_1, vec3(0.0f, 0.0f, float(1u)), 1.0f);
+}
+
+void fragment_main() {
+  textureGatherCompare_b5bc43();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp sampler2DArrayShadow arg_0_arg_1;
+
+void textureGatherCompare_b5bc43() {
+  vec4 res = textureGather(arg_0_arg_1, vec3(0.0f, 0.0f, float(1u)), 1.0f);
+}
+
+void compute_main() {
+  textureGatherCompare_b5bc43();
+}
+
+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/textureGatherCompare/b5bc43.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGatherCompare/b5bc43.wgsl.expected.msl
new file mode 100644
index 0000000..e9cc2f5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGatherCompare/b5bc43.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureGatherCompare_b5bc43(depth2d_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+  float4 res = tint_symbol_1.gather_compare(tint_symbol_2, float2(0.0f), 1u, 1.0f);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(depth2d_array<float, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+  textureGatherCompare_b5bc43(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(depth2d_array<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(depth2d_array<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+  textureGatherCompare_b5bc43(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(depth2d_array<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+  textureGatherCompare_b5bc43(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/b5bc43.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGatherCompare/b5bc43.wgsl.expected.spvasm
new file mode 100644
index 0000000..dde1b1d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGatherCompare/b5bc43.wgsl.expected.spvasm
@@ -0,0 +1,86 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 46
+; 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 %arg_1 "arg_1"
+               OpName %textureGatherCompare_b5bc43 "textureGatherCompare_b5bc43"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %arg_1 DescriptorSet 1
+               OpDecorate %arg_1 Binding 1
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+         %14 = OpTypeSampler
+%_ptr_UniformConstant_14 = OpTypePointer UniformConstant %14
+      %arg_1 = OpVariable %_ptr_UniformConstant_14 UniformConstant
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+         %22 = OpTypeSampledImage %11
+    %v3float = OpTypeVector %float 3
+    %float_0 = OpConstant %float 0
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+    %float_1 = OpConstant %float 1
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+         %33 = OpTypeFunction %v4float
+%textureGatherCompare_b5bc43 = OpFunction %void None %15
+         %18 = OpLabel
+        %res = OpVariable %_ptr_Function_v4float Function %5
+         %20 = OpLoad %14 %arg_1
+         %21 = OpLoad %11 %arg_0
+         %23 = OpSampledImage %22 %21 %20
+         %26 = OpConvertUToF %float %uint_1
+         %29 = OpCompositeConstruct %v3float %float_0 %float_0 %26
+         %19 = OpImageDrefGather %v4float %23 %29 %float_1
+               OpStore %res %19
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %33
+         %35 = OpLabel
+         %36 = OpFunctionCall %void %textureGatherCompare_b5bc43
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %38 = OpLabel
+         %39 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %39
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %41 = OpLabel
+         %42 = OpFunctionCall %void %textureGatherCompare_b5bc43
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %44 = OpLabel
+         %45 = OpFunctionCall %void %textureGatherCompare_b5bc43
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/b5bc43.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGatherCompare/b5bc43.wgsl.expected.wgsl
new file mode 100644
index 0000000..651c709
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureGatherCompare/b5bc43.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(0) var arg_0 : texture_depth_2d_array;
+
+@group(1) @binding(1) var arg_1 : sampler_comparison;
+
+fn textureGatherCompare_b5bc43() {
+  var res : vec4<f32> = textureGatherCompare(arg_0, arg_1, vec2<f32>(), 1u, 1.0f);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGatherCompare_b5bc43();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureGatherCompare_b5bc43();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureGatherCompare_b5bc43();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/0cb698.wgsl b/test/tint/builtins/gen/literal/textureLoad/0cb698.wgsl
new file mode 100644
index 0000000..3c8c90a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/0cb698.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_1d<i32>;
+
+// fn textureLoad(texture: texture_1d<i32>, coords: u32, level: u32) -> vec4<i32>
+fn textureLoad_0cb698() {
+  var res: vec4<i32> = textureLoad(arg_0, 1u, 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_0cb698();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_0cb698();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_0cb698();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/0cb698.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/0cb698.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..e4c470c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/0cb698.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+Texture1D<int4> arg_0 : register(t0, space1);
+
+void textureLoad_0cb698() {
+  int4 res = arg_0.Load(uint2(1u, 1u));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_0cb698();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_0cb698();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_0cb698();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/0cb698.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/0cb698.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..e4c470c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/0cb698.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+Texture1D<int4> arg_0 : register(t0, space1);
+
+void textureLoad_0cb698() {
+  int4 res = arg_0.Load(uint2(1u, 1u));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_0cb698();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_0cb698();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_0cb698();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/0cb698.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/0cb698.wgsl.expected.glsl
new file mode 100644
index 0000000..62fc8ec
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/0cb698.wgsl.expected.glsl
@@ -0,0 +1,75 @@
+SKIP: FAILED
+
+#version 310 es
+
+uniform highp isampler1D arg_0_1;
+void textureLoad_0cb698() {
+  ivec4 res = texelFetch(arg_0_1, int(1u), int(1u));
+}
+
+vec4 vertex_main() {
+  textureLoad_0cb698();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'isampler1D' : Reserved word. 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+uniform highp isampler1D arg_0_1;
+void textureLoad_0cb698() {
+  ivec4 res = texelFetch(arg_0_1, int(1u), int(1u));
+}
+
+void fragment_main() {
+  textureLoad_0cb698();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'isampler1D' : Reserved word. 
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+uniform highp isampler1D arg_0_1;
+void textureLoad_0cb698() {
+  ivec4 res = texelFetch(arg_0_1, int(1u), int(1u));
+}
+
+void compute_main() {
+  textureLoad_0cb698();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'isampler1D' : Reserved word. 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/0cb698.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/0cb698.wgsl.expected.msl
new file mode 100644
index 0000000..ca1ce7f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/0cb698.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_0cb698(texture1d<int, access::sample> tint_symbol_1) {
+  int4 res = tint_symbol_1.read(uint(1u), 0);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<int, access::sample> tint_symbol_2) {
+  textureLoad_0cb698(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<int, access::sample> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<int, access::sample> tint_symbol_4 [[texture(0)]]) {
+  textureLoad_0cb698(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture1d<int, access::sample> tint_symbol_5 [[texture(0)]]) {
+  textureLoad_0cb698(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/0cb698.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/0cb698.wgsl.expected.spvasm
new file mode 100644
index 0000000..ee178e7
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/0cb698.wgsl.expected.spvasm
@@ -0,0 +1,77 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 39
+; Schema: 0
+               OpCapability Shader
+               OpCapability Sampled1D
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureLoad_0cb698 "textureLoad_0cb698"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 1D 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+      %v4int = OpTypeVector %int 4
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+         %24 = OpConstantNull %v4int
+         %25 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_0cb698 = OpFunction %void None %13
+         %16 = OpLabel
+        %res = OpVariable %_ptr_Function_v4int Function %24
+         %19 = OpLoad %11 %arg_0
+         %17 = OpImageFetch %v4int %19 %uint_1 Lod %uint_1
+               OpStore %res %17
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %25
+         %27 = OpLabel
+         %28 = OpFunctionCall %void %textureLoad_0cb698
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %30 = OpLabel
+         %31 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %31
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %textureLoad_0cb698
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %37 = OpLabel
+         %38 = OpFunctionCall %void %textureLoad_0cb698
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/0cb698.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/0cb698.wgsl.expected.wgsl
new file mode 100644
index 0000000..50dea1a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/0cb698.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_1d<i32>;
+
+fn textureLoad_0cb698() {
+  var res : vec4<i32> = textureLoad(arg_0, 1u, 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_0cb698();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_0cb698();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_0cb698();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/1bfdfb.wgsl b/test/tint/builtins/gen/literal/textureLoad/1bfdfb.wgsl
new file mode 100644
index 0000000..224ae8b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/1bfdfb.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_external;
+
+// fn textureLoad(texture: texture_external, coords: vec2<u32>) -> vec4<f32>
+fn textureLoad_1bfdfb() {
+  var res: vec4<f32> = textureLoad(arg_0, vec2<u32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_1bfdfb();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_1bfdfb();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_1bfdfb();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/1bfdfb.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/1bfdfb.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..76c37ef
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/1bfdfb.wgsl.expected.dxc.hlsl
@@ -0,0 +1,111 @@
+struct GammaTransferParams {
+  float G;
+  float A;
+  float B;
+  float C;
+  float D;
+  float E;
+  float F;
+  uint padding;
+};
+struct ExternalTextureParams {
+  uint numPlanes;
+  uint doYuvToRgbConversionOnly;
+  float3x4 yuvToRgbConversionMatrix;
+  GammaTransferParams gammaDecodeParams;
+  GammaTransferParams gammaEncodeParams;
+  float3x3 gamutConversionMatrix;
+};
+
+Texture2D<float4> ext_tex_plane_1 : register(t1, space1);
+cbuffer cbuffer_ext_tex_params : register(b2, space1) {
+  uint4 ext_tex_params[11];
+};
+Texture2D<float4> arg_0 : register(t0, space1);
+
+float3 gammaCorrection(float3 v, GammaTransferParams params) {
+  const bool3 cond = (abs(v) < float3((params.D).xxx));
+  const float3 t = (sign(v) * ((params.C * abs(v)) + params.F));
+  const float3 f = (sign(v) * (pow(((params.A * abs(v)) + params.B), float3((params.G).xxx)) + params.E));
+  return (cond ? t : f);
+}
+
+float4 textureLoadExternal(Texture2D<float4> plane0, Texture2D<float4> plane1, uint2 coord, ExternalTextureParams params) {
+  float3 color = float3(0.0f, 0.0f, 0.0f);
+  if ((params.numPlanes == 1u)) {
+    color = plane0.Load(uint3(coord, 0u)).rgb;
+  } else {
+    color = mul(params.yuvToRgbConversionMatrix, float4(plane0.Load(uint3(coord, 0u)).r, plane1.Load(uint3(coord, 0u)).rg, 1.0f));
+  }
+  if ((params.doYuvToRgbConversionOnly == 0u)) {
+    color = gammaCorrection(color, params.gammaDecodeParams);
+    color = mul(color, params.gamutConversionMatrix);
+    color = gammaCorrection(color, params.gammaEncodeParams);
+  }
+  return float4(color, 1.0f);
+}
+
+float3x4 tint_symbol_3(uint4 buffer[11], uint offset) {
+  const uint scalar_offset = ((offset + 0u)) / 4;
+  const uint scalar_offset_1 = ((offset + 16u)) / 4;
+  const uint scalar_offset_2 = ((offset + 32u)) / 4;
+  return float3x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]), asfloat(buffer[scalar_offset_2 / 4]));
+}
+
+GammaTransferParams tint_symbol_5(uint4 buffer[11], uint offset) {
+  const uint scalar_offset_3 = ((offset + 0u)) / 4;
+  const uint scalar_offset_4 = ((offset + 4u)) / 4;
+  const uint scalar_offset_5 = ((offset + 8u)) / 4;
+  const uint scalar_offset_6 = ((offset + 12u)) / 4;
+  const uint scalar_offset_7 = ((offset + 16u)) / 4;
+  const uint scalar_offset_8 = ((offset + 20u)) / 4;
+  const uint scalar_offset_9 = ((offset + 24u)) / 4;
+  const uint scalar_offset_10 = ((offset + 28u)) / 4;
+  const GammaTransferParams tint_symbol_9 = {asfloat(buffer[scalar_offset_3 / 4][scalar_offset_3 % 4]), asfloat(buffer[scalar_offset_4 / 4][scalar_offset_4 % 4]), asfloat(buffer[scalar_offset_5 / 4][scalar_offset_5 % 4]), asfloat(buffer[scalar_offset_6 / 4][scalar_offset_6 % 4]), asfloat(buffer[scalar_offset_7 / 4][scalar_offset_7 % 4]), asfloat(buffer[scalar_offset_8 / 4][scalar_offset_8 % 4]), asfloat(buffer[scalar_offset_9 / 4][scalar_offset_9 % 4]), buffer[scalar_offset_10 / 4][scalar_offset_10 % 4]};
+  return tint_symbol_9;
+}
+
+float3x3 tint_symbol_7(uint4 buffer[11], uint offset) {
+  const uint scalar_offset_11 = ((offset + 0u)) / 4;
+  const uint scalar_offset_12 = ((offset + 16u)) / 4;
+  const uint scalar_offset_13 = ((offset + 32u)) / 4;
+  return float3x3(asfloat(buffer[scalar_offset_11 / 4].xyz), asfloat(buffer[scalar_offset_12 / 4].xyz), asfloat(buffer[scalar_offset_13 / 4].xyz));
+}
+
+ExternalTextureParams tint_symbol_1(uint4 buffer[11], uint offset) {
+  const uint scalar_offset_14 = ((offset + 0u)) / 4;
+  const uint scalar_offset_15 = ((offset + 4u)) / 4;
+  const ExternalTextureParams tint_symbol_10 = {buffer[scalar_offset_14 / 4][scalar_offset_14 % 4], buffer[scalar_offset_15 / 4][scalar_offset_15 % 4], tint_symbol_3(buffer, (offset + 16u)), tint_symbol_5(buffer, (offset + 64u)), tint_symbol_5(buffer, (offset + 96u)), tint_symbol_7(buffer, (offset + 128u))};
+  return tint_symbol_10;
+}
+
+void textureLoad_1bfdfb() {
+  float4 res = textureLoadExternal(arg_0, ext_tex_plane_1, (0u).xx, tint_symbol_1(ext_tex_params, 0u));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_1bfdfb();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_1bfdfb();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_1bfdfb();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/1bfdfb.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/1bfdfb.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..76c37ef
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/1bfdfb.wgsl.expected.fxc.hlsl
@@ -0,0 +1,111 @@
+struct GammaTransferParams {
+  float G;
+  float A;
+  float B;
+  float C;
+  float D;
+  float E;
+  float F;
+  uint padding;
+};
+struct ExternalTextureParams {
+  uint numPlanes;
+  uint doYuvToRgbConversionOnly;
+  float3x4 yuvToRgbConversionMatrix;
+  GammaTransferParams gammaDecodeParams;
+  GammaTransferParams gammaEncodeParams;
+  float3x3 gamutConversionMatrix;
+};
+
+Texture2D<float4> ext_tex_plane_1 : register(t1, space1);
+cbuffer cbuffer_ext_tex_params : register(b2, space1) {
+  uint4 ext_tex_params[11];
+};
+Texture2D<float4> arg_0 : register(t0, space1);
+
+float3 gammaCorrection(float3 v, GammaTransferParams params) {
+  const bool3 cond = (abs(v) < float3((params.D).xxx));
+  const float3 t = (sign(v) * ((params.C * abs(v)) + params.F));
+  const float3 f = (sign(v) * (pow(((params.A * abs(v)) + params.B), float3((params.G).xxx)) + params.E));
+  return (cond ? t : f);
+}
+
+float4 textureLoadExternal(Texture2D<float4> plane0, Texture2D<float4> plane1, uint2 coord, ExternalTextureParams params) {
+  float3 color = float3(0.0f, 0.0f, 0.0f);
+  if ((params.numPlanes == 1u)) {
+    color = plane0.Load(uint3(coord, 0u)).rgb;
+  } else {
+    color = mul(params.yuvToRgbConversionMatrix, float4(plane0.Load(uint3(coord, 0u)).r, plane1.Load(uint3(coord, 0u)).rg, 1.0f));
+  }
+  if ((params.doYuvToRgbConversionOnly == 0u)) {
+    color = gammaCorrection(color, params.gammaDecodeParams);
+    color = mul(color, params.gamutConversionMatrix);
+    color = gammaCorrection(color, params.gammaEncodeParams);
+  }
+  return float4(color, 1.0f);
+}
+
+float3x4 tint_symbol_3(uint4 buffer[11], uint offset) {
+  const uint scalar_offset = ((offset + 0u)) / 4;
+  const uint scalar_offset_1 = ((offset + 16u)) / 4;
+  const uint scalar_offset_2 = ((offset + 32u)) / 4;
+  return float3x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]), asfloat(buffer[scalar_offset_2 / 4]));
+}
+
+GammaTransferParams tint_symbol_5(uint4 buffer[11], uint offset) {
+  const uint scalar_offset_3 = ((offset + 0u)) / 4;
+  const uint scalar_offset_4 = ((offset + 4u)) / 4;
+  const uint scalar_offset_5 = ((offset + 8u)) / 4;
+  const uint scalar_offset_6 = ((offset + 12u)) / 4;
+  const uint scalar_offset_7 = ((offset + 16u)) / 4;
+  const uint scalar_offset_8 = ((offset + 20u)) / 4;
+  const uint scalar_offset_9 = ((offset + 24u)) / 4;
+  const uint scalar_offset_10 = ((offset + 28u)) / 4;
+  const GammaTransferParams tint_symbol_9 = {asfloat(buffer[scalar_offset_3 / 4][scalar_offset_3 % 4]), asfloat(buffer[scalar_offset_4 / 4][scalar_offset_4 % 4]), asfloat(buffer[scalar_offset_5 / 4][scalar_offset_5 % 4]), asfloat(buffer[scalar_offset_6 / 4][scalar_offset_6 % 4]), asfloat(buffer[scalar_offset_7 / 4][scalar_offset_7 % 4]), asfloat(buffer[scalar_offset_8 / 4][scalar_offset_8 % 4]), asfloat(buffer[scalar_offset_9 / 4][scalar_offset_9 % 4]), buffer[scalar_offset_10 / 4][scalar_offset_10 % 4]};
+  return tint_symbol_9;
+}
+
+float3x3 tint_symbol_7(uint4 buffer[11], uint offset) {
+  const uint scalar_offset_11 = ((offset + 0u)) / 4;
+  const uint scalar_offset_12 = ((offset + 16u)) / 4;
+  const uint scalar_offset_13 = ((offset + 32u)) / 4;
+  return float3x3(asfloat(buffer[scalar_offset_11 / 4].xyz), asfloat(buffer[scalar_offset_12 / 4].xyz), asfloat(buffer[scalar_offset_13 / 4].xyz));
+}
+
+ExternalTextureParams tint_symbol_1(uint4 buffer[11], uint offset) {
+  const uint scalar_offset_14 = ((offset + 0u)) / 4;
+  const uint scalar_offset_15 = ((offset + 4u)) / 4;
+  const ExternalTextureParams tint_symbol_10 = {buffer[scalar_offset_14 / 4][scalar_offset_14 % 4], buffer[scalar_offset_15 / 4][scalar_offset_15 % 4], tint_symbol_3(buffer, (offset + 16u)), tint_symbol_5(buffer, (offset + 64u)), tint_symbol_5(buffer, (offset + 96u)), tint_symbol_7(buffer, (offset + 128u))};
+  return tint_symbol_10;
+}
+
+void textureLoad_1bfdfb() {
+  float4 res = textureLoadExternal(arg_0, ext_tex_plane_1, (0u).xx, tint_symbol_1(ext_tex_params, 0u));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_1bfdfb();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_1bfdfb();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_1bfdfb();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/1bfdfb.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/1bfdfb.wgsl.expected.glsl
new file mode 100644
index 0000000..214f868
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/1bfdfb.wgsl.expected.glsl
@@ -0,0 +1,193 @@
+#version 310 es
+
+struct GammaTransferParams {
+  float G;
+  float A;
+  float B;
+  float C;
+  float D;
+  float E;
+  float F;
+  uint padding;
+};
+
+struct ExternalTextureParams {
+  uint numPlanes;
+  uint doYuvToRgbConversionOnly;
+  mat3x4 yuvToRgbConversionMatrix;
+  GammaTransferParams gammaDecodeParams;
+  GammaTransferParams gammaEncodeParams;
+  mat3 gamutConversionMatrix;
+};
+
+layout(binding = 2, std140) uniform ext_tex_params_block_ubo {
+  ExternalTextureParams inner;
+} ext_tex_params;
+
+vec3 gammaCorrection(vec3 v, GammaTransferParams params) {
+  bvec3 cond = lessThan(abs(v), vec3(params.D));
+  vec3 t = (sign(v) * ((params.C * abs(v)) + params.F));
+  vec3 f = (sign(v) * (pow(((params.A * abs(v)) + params.B), vec3(params.G)) + params.E));
+  return mix(f, t, cond);
+}
+
+vec4 textureLoadExternal(highp sampler2D plane0_1, highp sampler2D plane1_1, uvec2 coord, ExternalTextureParams params) {
+  vec3 color = vec3(0.0f, 0.0f, 0.0f);
+  if ((params.numPlanes == 1u)) {
+    color = texelFetch(plane0_1, ivec2(coord), int(0u)).rgb;
+  } else {
+    color = (vec4(texelFetch(plane0_1, ivec2(coord), int(0u)).r, texelFetch(plane1_1, ivec2(coord), int(0u)).rg, 1.0f) * params.yuvToRgbConversionMatrix);
+  }
+  if ((params.doYuvToRgbConversionOnly == 0u)) {
+    color = gammaCorrection(color, params.gammaDecodeParams);
+    color = (params.gamutConversionMatrix * color);
+    color = gammaCorrection(color, params.gammaEncodeParams);
+  }
+  return vec4(color, 1.0f);
+}
+
+uniform highp sampler2D arg_0_1;
+uniform highp sampler2D ext_tex_plane_1_1;
+void textureLoad_1bfdfb() {
+  vec4 res = textureLoadExternal(arg_0_1, ext_tex_plane_1_1, uvec2(0u), ext_tex_params.inner);
+}
+
+vec4 vertex_main() {
+  textureLoad_1bfdfb();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+struct GammaTransferParams {
+  float G;
+  float A;
+  float B;
+  float C;
+  float D;
+  float E;
+  float F;
+  uint padding;
+};
+
+struct ExternalTextureParams {
+  uint numPlanes;
+  uint doYuvToRgbConversionOnly;
+  mat3x4 yuvToRgbConversionMatrix;
+  GammaTransferParams gammaDecodeParams;
+  GammaTransferParams gammaEncodeParams;
+  mat3 gamutConversionMatrix;
+};
+
+layout(binding = 2, std140) uniform ext_tex_params_block_ubo {
+  ExternalTextureParams inner;
+} ext_tex_params;
+
+vec3 gammaCorrection(vec3 v, GammaTransferParams params) {
+  bvec3 cond = lessThan(abs(v), vec3(params.D));
+  vec3 t = (sign(v) * ((params.C * abs(v)) + params.F));
+  vec3 f = (sign(v) * (pow(((params.A * abs(v)) + params.B), vec3(params.G)) + params.E));
+  return mix(f, t, cond);
+}
+
+vec4 textureLoadExternal(highp sampler2D plane0_1, highp sampler2D plane1_1, uvec2 coord, ExternalTextureParams params) {
+  vec3 color = vec3(0.0f, 0.0f, 0.0f);
+  if ((params.numPlanes == 1u)) {
+    color = texelFetch(plane0_1, ivec2(coord), int(0u)).rgb;
+  } else {
+    color = (vec4(texelFetch(plane0_1, ivec2(coord), int(0u)).r, texelFetch(plane1_1, ivec2(coord), int(0u)).rg, 1.0f) * params.yuvToRgbConversionMatrix);
+  }
+  if ((params.doYuvToRgbConversionOnly == 0u)) {
+    color = gammaCorrection(color, params.gammaDecodeParams);
+    color = (params.gamutConversionMatrix * color);
+    color = gammaCorrection(color, params.gammaEncodeParams);
+  }
+  return vec4(color, 1.0f);
+}
+
+uniform highp sampler2D arg_0_1;
+uniform highp sampler2D ext_tex_plane_1_1;
+void textureLoad_1bfdfb() {
+  vec4 res = textureLoadExternal(arg_0_1, ext_tex_plane_1_1, uvec2(0u), ext_tex_params.inner);
+}
+
+void fragment_main() {
+  textureLoad_1bfdfb();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+struct GammaTransferParams {
+  float G;
+  float A;
+  float B;
+  float C;
+  float D;
+  float E;
+  float F;
+  uint padding;
+};
+
+struct ExternalTextureParams {
+  uint numPlanes;
+  uint doYuvToRgbConversionOnly;
+  mat3x4 yuvToRgbConversionMatrix;
+  GammaTransferParams gammaDecodeParams;
+  GammaTransferParams gammaEncodeParams;
+  mat3 gamutConversionMatrix;
+};
+
+layout(binding = 2, std140) uniform ext_tex_params_block_ubo {
+  ExternalTextureParams inner;
+} ext_tex_params;
+
+vec3 gammaCorrection(vec3 v, GammaTransferParams params) {
+  bvec3 cond = lessThan(abs(v), vec3(params.D));
+  vec3 t = (sign(v) * ((params.C * abs(v)) + params.F));
+  vec3 f = (sign(v) * (pow(((params.A * abs(v)) + params.B), vec3(params.G)) + params.E));
+  return mix(f, t, cond);
+}
+
+vec4 textureLoadExternal(highp sampler2D plane0_1, highp sampler2D plane1_1, uvec2 coord, ExternalTextureParams params) {
+  vec3 color = vec3(0.0f, 0.0f, 0.0f);
+  if ((params.numPlanes == 1u)) {
+    color = texelFetch(plane0_1, ivec2(coord), int(0u)).rgb;
+  } else {
+    color = (vec4(texelFetch(plane0_1, ivec2(coord), int(0u)).r, texelFetch(plane1_1, ivec2(coord), int(0u)).rg, 1.0f) * params.yuvToRgbConversionMatrix);
+  }
+  if ((params.doYuvToRgbConversionOnly == 0u)) {
+    color = gammaCorrection(color, params.gammaDecodeParams);
+    color = (params.gamutConversionMatrix * color);
+    color = gammaCorrection(color, params.gammaEncodeParams);
+  }
+  return vec4(color, 1.0f);
+}
+
+uniform highp sampler2D arg_0_1;
+uniform highp sampler2D ext_tex_plane_1_1;
+void textureLoad_1bfdfb() {
+  vec4 res = textureLoadExternal(arg_0_1, ext_tex_plane_1_1, uvec2(0u), ext_tex_params.inner);
+}
+
+void compute_main() {
+  textureLoad_1bfdfb();
+}
+
+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/textureLoad/1bfdfb.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/1bfdfb.wgsl.expected.msl
new file mode 100644
index 0000000..81c3daa
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/1bfdfb.wgsl.expected.msl
@@ -0,0 +1,89 @@
+#include <metal_stdlib>
+
+using namespace metal;
+
+template<typename T, size_t N>
+struct tint_array {
+    const constant T& operator[](size_t i) const constant { return elements[i]; }
+    device T& operator[](size_t i) device { return elements[i]; }
+    const device T& operator[](size_t i) const device { return elements[i]; }
+    thread T& operator[](size_t i) thread { return elements[i]; }
+    const thread T& operator[](size_t i) const thread { return elements[i]; }
+    threadgroup T& operator[](size_t i) threadgroup { return elements[i]; }
+    const threadgroup T& operator[](size_t i) const threadgroup { return elements[i]; }
+    T elements[N];
+};
+
+struct GammaTransferParams {
+  /* 0x0000 */ float G;
+  /* 0x0004 */ float A;
+  /* 0x0008 */ float B;
+  /* 0x000c */ float C;
+  /* 0x0010 */ float D;
+  /* 0x0014 */ float E;
+  /* 0x0018 */ float F;
+  /* 0x001c */ uint padding;
+};
+
+struct ExternalTextureParams {
+  /* 0x0000 */ uint numPlanes;
+  /* 0x0004 */ uint doYuvToRgbConversionOnly;
+  /* 0x0008 */ tint_array<int8_t, 8> tint_pad;
+  /* 0x0010 */ float3x4 yuvToRgbConversionMatrix;
+  /* 0x0040 */ GammaTransferParams gammaDecodeParams;
+  /* 0x0060 */ GammaTransferParams gammaEncodeParams;
+  /* 0x0080 */ float3x3 gamutConversionMatrix;
+};
+
+float3 gammaCorrection(float3 v, GammaTransferParams params) {
+  bool3 const cond = (fabs(v) < float3(params.D));
+  float3 const t = (sign(v) * ((params.C * fabs(v)) + params.F));
+  float3 const f = (sign(v) * (pow(((params.A * fabs(v)) + params.B), float3(params.G)) + params.E));
+  return select(f, t, cond);
+}
+
+float4 textureLoadExternal(texture2d<float, access::sample> plane0, texture2d<float, access::sample> plane1, uint2 coord, ExternalTextureParams params) {
+  float3 color = 0.0f;
+  if ((params.numPlanes == 1u)) {
+    color = float4(plane0.read(uint2(coord), 0u)).rgb;
+  } else {
+    color = (float4(plane0.read(uint2(coord), 0u)[0], float4(plane1.read(uint2(coord), 0u)).rg, 1.0f) * params.yuvToRgbConversionMatrix);
+  }
+  if ((params.doYuvToRgbConversionOnly == 0u)) {
+    color = gammaCorrection(color, params.gammaDecodeParams);
+    color = (params.gamutConversionMatrix * color);
+    color = gammaCorrection(color, params.gammaEncodeParams);
+  }
+  return float4(color, 1.0f);
+}
+
+void textureLoad_1bfdfb(texture2d<float, access::sample> tint_symbol_1, texture2d<float, access::sample> tint_symbol_2, const constant ExternalTextureParams* const tint_symbol_3) {
+  float4 res = textureLoadExternal(tint_symbol_1, tint_symbol_2, uint2(0u), *(tint_symbol_3));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<float, access::sample> tint_symbol_4, texture2d<float, access::sample> tint_symbol_5, const constant ExternalTextureParams* const tint_symbol_6) {
+  textureLoad_1bfdfb(tint_symbol_4, tint_symbol_5, tint_symbol_6);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<float, access::sample> tint_symbol_7 [[texture(0)]], texture2d<float, access::sample> tint_symbol_8 [[texture(1)]], const constant ExternalTextureParams* tint_symbol_9 [[buffer(2)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_7, tint_symbol_8, tint_symbol_9);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<float, access::sample> tint_symbol_10 [[texture(0)]], texture2d<float, access::sample> tint_symbol_11 [[texture(1)]], const constant ExternalTextureParams* tint_symbol_12 [[buffer(2)]]) {
+  textureLoad_1bfdfb(tint_symbol_10, tint_symbol_11, tint_symbol_12);
+  return;
+}
+
+kernel void compute_main(texture2d<float, access::sample> tint_symbol_13 [[texture(0)]], texture2d<float, access::sample> tint_symbol_14 [[texture(1)]], const constant ExternalTextureParams* tint_symbol_15 [[buffer(2)]]) {
+  textureLoad_1bfdfb(tint_symbol_13, tint_symbol_14, tint_symbol_15);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/1bfdfb.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/1bfdfb.wgsl.expected.spvasm
new file mode 100644
index 0000000..60ee453
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/1bfdfb.wgsl.expected.spvasm
@@ -0,0 +1,243 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 136
+; Schema: 0
+               OpCapability Shader
+         %28 = OpExtInstImport "GLSL.std.450"
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %ext_tex_plane_1 "ext_tex_plane_1"
+               OpName %ext_tex_params_block "ext_tex_params_block"
+               OpMemberName %ext_tex_params_block 0 "inner"
+               OpName %ExternalTextureParams "ExternalTextureParams"
+               OpMemberName %ExternalTextureParams 0 "numPlanes"
+               OpMemberName %ExternalTextureParams 1 "doYuvToRgbConversionOnly"
+               OpMemberName %ExternalTextureParams 2 "yuvToRgbConversionMatrix"
+               OpMemberName %ExternalTextureParams 3 "gammaDecodeParams"
+               OpName %GammaTransferParams "GammaTransferParams"
+               OpMemberName %GammaTransferParams 0 "G"
+               OpMemberName %GammaTransferParams 1 "A"
+               OpMemberName %GammaTransferParams 2 "B"
+               OpMemberName %GammaTransferParams 3 "C"
+               OpMemberName %GammaTransferParams 4 "D"
+               OpMemberName %GammaTransferParams 5 "E"
+               OpMemberName %GammaTransferParams 6 "F"
+               OpMemberName %GammaTransferParams 7 "padding"
+               OpMemberName %ExternalTextureParams 4 "gammaEncodeParams"
+               OpMemberName %ExternalTextureParams 5 "gamutConversionMatrix"
+               OpName %ext_tex_params "ext_tex_params"
+               OpName %arg_0 "arg_0"
+               OpName %gammaCorrection "gammaCorrection"
+               OpName %v "v"
+               OpName %params "params"
+               OpName %textureLoadExternal "textureLoadExternal"
+               OpName %plane0 "plane0"
+               OpName %plane1 "plane1"
+               OpName %coord "coord"
+               OpName %params_0 "params"
+               OpName %color "color"
+               OpName %textureLoad_1bfdfb "textureLoad_1bfdfb"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %ext_tex_plane_1 DescriptorSet 1
+               OpDecorate %ext_tex_plane_1 Binding 1
+               OpDecorate %ext_tex_params_block Block
+               OpMemberDecorate %ext_tex_params_block 0 Offset 0
+               OpMemberDecorate %ExternalTextureParams 0 Offset 0
+               OpMemberDecorate %ExternalTextureParams 1 Offset 4
+               OpMemberDecorate %ExternalTextureParams 2 Offset 16
+               OpMemberDecorate %ExternalTextureParams 2 ColMajor
+               OpMemberDecorate %ExternalTextureParams 2 MatrixStride 16
+               OpMemberDecorate %ExternalTextureParams 3 Offset 64
+               OpMemberDecorate %GammaTransferParams 0 Offset 0
+               OpMemberDecorate %GammaTransferParams 1 Offset 4
+               OpMemberDecorate %GammaTransferParams 2 Offset 8
+               OpMemberDecorate %GammaTransferParams 3 Offset 12
+               OpMemberDecorate %GammaTransferParams 4 Offset 16
+               OpMemberDecorate %GammaTransferParams 5 Offset 20
+               OpMemberDecorate %GammaTransferParams 6 Offset 24
+               OpMemberDecorate %GammaTransferParams 7 Offset 28
+               OpMemberDecorate %ExternalTextureParams 4 Offset 96
+               OpMemberDecorate %ExternalTextureParams 5 Offset 128
+               OpMemberDecorate %ExternalTextureParams 5 ColMajor
+               OpMemberDecorate %ExternalTextureParams 5 MatrixStride 16
+               OpDecorate %ext_tex_params NonWritable
+               OpDecorate %ext_tex_params DescriptorSet 1
+               OpDecorate %ext_tex_params Binding 2
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+%ext_tex_plane_1 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %uint = OpTypeInt 32 0
+%mat3v4float = OpTypeMatrix %v4float 3
+%GammaTransferParams = OpTypeStruct %float %float %float %float %float %float %float %uint
+    %v3float = OpTypeVector %float 3
+%mat3v3float = OpTypeMatrix %v3float 3
+%ExternalTextureParams = OpTypeStruct %uint %uint %mat3v4float %GammaTransferParams %GammaTransferParams %mat3v3float
+%ext_tex_params_block = OpTypeStruct %ExternalTextureParams
+%_ptr_Uniform_ext_tex_params_block = OpTypePointer Uniform %ext_tex_params_block
+%ext_tex_params = OpVariable %_ptr_Uniform_ext_tex_params_block Uniform
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+         %22 = OpTypeFunction %v3float %v3float %GammaTransferParams
+       %bool = OpTypeBool
+     %v3bool = OpTypeVector %bool 3
+%_ptr_Function_v3float = OpTypePointer Function %v3float
+         %42 = OpConstantNull %v3float
+     %v2uint = OpTypeVector %uint 2
+         %62 = OpTypeFunction %v4float %11 %11 %v2uint %ExternalTextureParams
+     %uint_1 = OpConstant %uint 1
+         %78 = OpConstantNull %uint
+    %v2float = OpTypeVector %float 2
+    %float_1 = OpConstant %float 1
+       %void = OpTypeVoid
+        %109 = OpTypeFunction %void
+        %116 = OpConstantNull %v2uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_Uniform_ExternalTextureParams = OpTypePointer Uniform %ExternalTextureParams
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+        %123 = OpTypeFunction %v4float
+%gammaCorrection = OpFunction %v3float None %22
+          %v = OpFunctionParameter %v3float
+     %params = OpFunctionParameter %GammaTransferParams
+         %26 = OpLabel
+         %40 = OpVariable %_ptr_Function_v3float Function %42
+         %52 = OpVariable %_ptr_Function_v3float Function %42
+         %58 = OpVariable %_ptr_Function_v3float Function %42
+         %27 = OpExtInst %v3float %28 FAbs %v
+         %29 = OpCompositeExtract %float %params 4
+         %30 = OpCompositeConstruct %v3float %29 %29 %29
+         %31 = OpFOrdLessThan %v3bool %27 %30
+         %34 = OpExtInst %v3float %28 FSign %v
+         %35 = OpCompositeExtract %float %params 3
+         %36 = OpExtInst %v3float %28 FAbs %v
+         %37 = OpVectorTimesScalar %v3float %36 %35
+         %38 = OpCompositeExtract %float %params 6
+         %43 = OpCompositeConstruct %v3float %38 %38 %38
+         %39 = OpFAdd %v3float %37 %43
+         %44 = OpFMul %v3float %34 %39
+         %45 = OpExtInst %v3float %28 FSign %v
+         %47 = OpCompositeExtract %float %params 1
+         %48 = OpExtInst %v3float %28 FAbs %v
+         %49 = OpVectorTimesScalar %v3float %48 %47
+         %50 = OpCompositeExtract %float %params 2
+         %53 = OpCompositeConstruct %v3float %50 %50 %50
+         %51 = OpFAdd %v3float %49 %53
+         %54 = OpCompositeExtract %float %params 0
+         %55 = OpCompositeConstruct %v3float %54 %54 %54
+         %46 = OpExtInst %v3float %28 Pow %51 %55
+         %56 = OpCompositeExtract %float %params 5
+         %59 = OpCompositeConstruct %v3float %56 %56 %56
+         %57 = OpFAdd %v3float %46 %59
+         %60 = OpFMul %v3float %45 %57
+         %61 = OpSelect %v3float %31 %44 %60
+               OpReturnValue %61
+               OpFunctionEnd
+%textureLoadExternal = OpFunction %v4float None %62
+     %plane0 = OpFunctionParameter %11
+     %plane1 = OpFunctionParameter %11
+      %coord = OpFunctionParameter %v2uint
+   %params_0 = OpFunctionParameter %ExternalTextureParams
+         %69 = OpLabel
+      %color = OpVariable %_ptr_Function_v3float Function %42
+         %71 = OpCompositeExtract %uint %params_0 0
+         %73 = OpIEqual %bool %71 %uint_1
+               OpSelectionMerge %74 None
+               OpBranchConditional %73 %75 %76
+         %75 = OpLabel
+         %77 = OpImageFetch %v4float %plane0 %coord Lod %78
+         %79 = OpVectorShuffle %v3float %77 %77 0 1 2
+               OpStore %color %79
+               OpBranch %74
+         %76 = OpLabel
+         %80 = OpImageFetch %v4float %plane0 %coord Lod %78
+         %81 = OpCompositeExtract %float %80 0
+         %82 = OpImageFetch %v4float %plane1 %coord Lod %78
+         %84 = OpVectorShuffle %v2float %82 %82 0 1
+         %85 = OpCompositeExtract %float %84 0
+         %86 = OpCompositeExtract %float %84 1
+         %88 = OpCompositeConstruct %v4float %81 %85 %86 %float_1
+         %89 = OpCompositeExtract %mat3v4float %params_0 2
+         %90 = OpVectorTimesMatrix %v3float %88 %89
+               OpStore %color %90
+               OpBranch %74
+         %74 = OpLabel
+         %91 = OpCompositeExtract %uint %params_0 1
+         %92 = OpIEqual %bool %91 %78
+               OpSelectionMerge %93 None
+               OpBranchConditional %92 %94 %93
+         %94 = OpLabel
+         %96 = OpLoad %v3float %color
+         %97 = OpCompositeExtract %GammaTransferParams %params_0 3
+         %95 = OpFunctionCall %v3float %gammaCorrection %96 %97
+               OpStore %color %95
+         %98 = OpCompositeExtract %mat3v3float %params_0 5
+         %99 = OpLoad %v3float %color
+        %100 = OpMatrixTimesVector %v3float %98 %99
+               OpStore %color %100
+        %102 = OpLoad %v3float %color
+        %103 = OpCompositeExtract %GammaTransferParams %params_0 4
+        %101 = OpFunctionCall %v3float %gammaCorrection %102 %103
+               OpStore %color %101
+               OpBranch %93
+         %93 = OpLabel
+        %104 = OpLoad %v3float %color
+        %105 = OpCompositeExtract %float %104 0
+        %106 = OpCompositeExtract %float %104 1
+        %107 = OpCompositeExtract %float %104 2
+        %108 = OpCompositeConstruct %v4float %105 %106 %107 %float_1
+               OpReturnValue %108
+               OpFunctionEnd
+%textureLoad_1bfdfb = OpFunction %void None %109
+        %112 = OpLabel
+        %res = OpVariable %_ptr_Function_v4float Function %5
+        %114 = OpLoad %11 %arg_0
+        %115 = OpLoad %11 %ext_tex_plane_1
+        %119 = OpAccessChain %_ptr_Uniform_ExternalTextureParams %ext_tex_params %uint_0
+        %120 = OpLoad %ExternalTextureParams %119
+        %113 = OpFunctionCall %v4float %textureLoadExternal %114 %115 %116 %120
+               OpStore %res %113
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %123
+        %125 = OpLabel
+        %126 = OpFunctionCall %void %textureLoad_1bfdfb
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %109
+        %128 = OpLabel
+        %129 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %129
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %109
+        %131 = OpLabel
+        %132 = OpFunctionCall %void %textureLoad_1bfdfb
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %109
+        %134 = OpLabel
+        %135 = OpFunctionCall %void %textureLoad_1bfdfb
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/1bfdfb.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/1bfdfb.wgsl.expected.wgsl
new file mode 100644
index 0000000..a67b2bf
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/1bfdfb.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_external;
+
+fn textureLoad_1bfdfb() {
+  var res : vec4<f32> = textureLoad(arg_0, vec2<u32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_1bfdfb();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_1bfdfb();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_1bfdfb();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/1c562a.wgsl b/test/tint/builtins/gen/literal/textureLoad/1c562a.wgsl
new file mode 100644
index 0000000..147ef2e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/1c562a.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_3d<u32>;
+
+// fn textureLoad(texture: texture_3d<u32>, coords: vec3<u32>, level: u32) -> vec4<u32>
+fn textureLoad_1c562a() {
+  var res: vec4<u32> = textureLoad(arg_0, vec3<u32>(), 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_1c562a();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_1c562a();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_1c562a();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/1c562a.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/1c562a.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..69fa517
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/1c562a.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+Texture3D<uint4> arg_0 : register(t0, space1);
+
+void textureLoad_1c562a() {
+  uint4 res = arg_0.Load(uint4(0u, 0u, 0u, 1u));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_1c562a();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_1c562a();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_1c562a();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/1c562a.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/1c562a.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..69fa517
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/1c562a.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+Texture3D<uint4> arg_0 : register(t0, space1);
+
+void textureLoad_1c562a() {
+  uint4 res = arg_0.Load(uint4(0u, 0u, 0u, 1u));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_1c562a();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_1c562a();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_1c562a();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/1c562a.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/1c562a.wgsl.expected.glsl
new file mode 100644
index 0000000..5d0ca1b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/1c562a.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+uniform highp usampler3D arg_0_1;
+void textureLoad_1c562a() {
+  uvec4 res = texelFetch(arg_0_1, ivec3(uvec3(0u)), int(1u));
+}
+
+vec4 vertex_main() {
+  textureLoad_1c562a();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp usampler3D arg_0_1;
+void textureLoad_1c562a() {
+  uvec4 res = texelFetch(arg_0_1, ivec3(uvec3(0u)), int(1u));
+}
+
+void fragment_main() {
+  textureLoad_1c562a();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp usampler3D arg_0_1;
+void textureLoad_1c562a() {
+  uvec4 res = texelFetch(arg_0_1, ivec3(uvec3(0u)), int(1u));
+}
+
+void compute_main() {
+  textureLoad_1c562a();
+}
+
+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/textureLoad/1c562a.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/1c562a.wgsl.expected.msl
new file mode 100644
index 0000000..08ec833
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/1c562a.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_1c562a(texture3d<uint, access::sample> tint_symbol_1) {
+  uint4 res = tint_symbol_1.read(uint3(uint3(0u)), 1u);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<uint, access::sample> tint_symbol_2) {
+  textureLoad_1c562a(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<uint, access::sample> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture3d<uint, access::sample> tint_symbol_4 [[texture(0)]]) {
+  textureLoad_1c562a(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture3d<uint, access::sample> tint_symbol_5 [[texture(0)]]) {
+  textureLoad_1c562a(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/1c562a.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/1c562a.wgsl.expected.spvasm
new file mode 100644
index 0000000..3aab4ea
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/1c562a.wgsl.expected.spvasm
@@ -0,0 +1,77 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 40
+; 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 %textureLoad_1c562a "textureLoad_1c562a"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 3D 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+     %v4uint = OpTypeVector %uint 4
+     %v3uint = OpTypeVector %uint 3
+         %21 = OpConstantNull %v3uint
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+         %25 = OpConstantNull %v4uint
+         %26 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_1c562a = OpFunction %void None %13
+         %16 = OpLabel
+        %res = OpVariable %_ptr_Function_v4uint Function %25
+         %19 = OpLoad %11 %arg_0
+         %17 = OpImageFetch %v4uint %19 %21 Lod %uint_1
+               OpStore %res %17
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %26
+         %28 = OpLabel
+         %29 = OpFunctionCall %void %textureLoad_1c562a
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %31 = OpLabel
+         %32 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %32
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %35 = OpLabel
+         %36 = OpFunctionCall %void %textureLoad_1c562a
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %38 = OpLabel
+         %39 = OpFunctionCall %void %textureLoad_1c562a
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/1c562a.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/1c562a.wgsl.expected.wgsl
new file mode 100644
index 0000000..a62fc0f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/1c562a.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_3d<u32>;
+
+fn textureLoad_1c562a() {
+  var res : vec4<u32> = textureLoad(arg_0, vec3<u32>(), 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_1c562a();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_1c562a();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_1c562a();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/21d1c4.wgsl b/test/tint/builtins/gen/literal/textureLoad/21d1c4.wgsl
new file mode 100644
index 0000000..ac39ee5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/21d1c4.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_3d<f32>;
+
+// fn textureLoad(texture: texture_3d<f32>, coords: vec3<u32>, level: u32) -> vec4<f32>
+fn textureLoad_21d1c4() {
+  var res: vec4<f32> = textureLoad(arg_0, vec3<u32>(), 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_21d1c4();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_21d1c4();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_21d1c4();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/21d1c4.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/21d1c4.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..04e91b0
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/21d1c4.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+Texture3D<float4> arg_0 : register(t0, space1);
+
+void textureLoad_21d1c4() {
+  float4 res = arg_0.Load(uint4(0u, 0u, 0u, 1u));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_21d1c4();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_21d1c4();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_21d1c4();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/21d1c4.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/21d1c4.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..04e91b0
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/21d1c4.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+Texture3D<float4> arg_0 : register(t0, space1);
+
+void textureLoad_21d1c4() {
+  float4 res = arg_0.Load(uint4(0u, 0u, 0u, 1u));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_21d1c4();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_21d1c4();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_21d1c4();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/21d1c4.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/21d1c4.wgsl.expected.glsl
new file mode 100644
index 0000000..6d8e740
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/21d1c4.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+uniform highp sampler3D arg_0_1;
+void textureLoad_21d1c4() {
+  vec4 res = texelFetch(arg_0_1, ivec3(uvec3(0u)), int(1u));
+}
+
+vec4 vertex_main() {
+  textureLoad_21d1c4();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp sampler3D arg_0_1;
+void textureLoad_21d1c4() {
+  vec4 res = texelFetch(arg_0_1, ivec3(uvec3(0u)), int(1u));
+}
+
+void fragment_main() {
+  textureLoad_21d1c4();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp sampler3D arg_0_1;
+void textureLoad_21d1c4() {
+  vec4 res = texelFetch(arg_0_1, ivec3(uvec3(0u)), int(1u));
+}
+
+void compute_main() {
+  textureLoad_21d1c4();
+}
+
+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/textureLoad/21d1c4.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/21d1c4.wgsl.expected.msl
new file mode 100644
index 0000000..a18d7cf
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/21d1c4.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_21d1c4(texture3d<float, access::sample> tint_symbol_1) {
+  float4 res = tint_symbol_1.read(uint3(uint3(0u)), 1u);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<float, access::sample> tint_symbol_2) {
+  textureLoad_21d1c4(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<float, access::sample> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture3d<float, access::sample> tint_symbol_4 [[texture(0)]]) {
+  textureLoad_21d1c4(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture3d<float, access::sample> tint_symbol_5 [[texture(0)]]) {
+  textureLoad_21d1c4(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/21d1c4.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/21d1c4.wgsl.expected.spvasm
new file mode 100644
index 0000000..ca20303
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/21d1c4.wgsl.expected.spvasm
@@ -0,0 +1,75 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 38
+; 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 %textureLoad_21d1c4 "textureLoad_21d1c4"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 3D 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %12 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v3uint = OpTypeVector %uint 3
+         %20 = OpConstantNull %v3uint
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+         %24 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_21d1c4 = OpFunction %void None %12
+         %15 = OpLabel
+        %res = OpVariable %_ptr_Function_v4float Function %5
+         %17 = OpLoad %11 %arg_0
+         %16 = OpImageFetch %v4float %17 %20 Lod %uint_1
+               OpStore %res %16
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %24
+         %26 = OpLabel
+         %27 = OpFunctionCall %void %textureLoad_21d1c4
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+         %29 = OpLabel
+         %30 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %30
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %textureLoad_21d1c4
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %12
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %textureLoad_21d1c4
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/21d1c4.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/21d1c4.wgsl.expected.wgsl
new file mode 100644
index 0000000..2cfba76
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/21d1c4.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_3d<f32>;
+
+fn textureLoad_21d1c4() {
+  var res : vec4<f32> = textureLoad(arg_0, vec3<u32>(), 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_21d1c4();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_21d1c4();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_21d1c4();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/2e09aa.wgsl b/test/tint/builtins/gen/literal/textureLoad/2e09aa.wgsl
new file mode 100644
index 0000000..c202f48
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/2e09aa.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_multisampled_2d<f32>;
+
+// fn textureLoad(texture: texture_multisampled_2d<f32>, coords: vec2<u32>, sample_index: u32) -> vec4<f32>
+fn textureLoad_2e09aa() {
+  var res: vec4<f32> = textureLoad(arg_0, vec2<u32>(), 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_2e09aa();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_2e09aa();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_2e09aa();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/2e09aa.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/2e09aa.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..9cc10ce
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/2e09aa.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+Texture2DMS<float4> arg_0 : register(t0, space1);
+
+void textureLoad_2e09aa() {
+  float4 res = arg_0.Load((0u).xx, 1u);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_2e09aa();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_2e09aa();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_2e09aa();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/2e09aa.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/2e09aa.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..9cc10ce
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/2e09aa.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+Texture2DMS<float4> arg_0 : register(t0, space1);
+
+void textureLoad_2e09aa() {
+  float4 res = arg_0.Load((0u).xx, 1u);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_2e09aa();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_2e09aa();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_2e09aa();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/2e09aa.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/2e09aa.wgsl.expected.glsl
new file mode 100644
index 0000000..1fc3bfb
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/2e09aa.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+uniform highp sampler2DMS arg_0_1;
+void textureLoad_2e09aa() {
+  vec4 res = texelFetch(arg_0_1, ivec2(uvec2(0u)), int(1u));
+}
+
+vec4 vertex_main() {
+  textureLoad_2e09aa();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2DMS arg_0_1;
+void textureLoad_2e09aa() {
+  vec4 res = texelFetch(arg_0_1, ivec2(uvec2(0u)), int(1u));
+}
+
+void fragment_main() {
+  textureLoad_2e09aa();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp sampler2DMS arg_0_1;
+void textureLoad_2e09aa() {
+  vec4 res = texelFetch(arg_0_1, ivec2(uvec2(0u)), int(1u));
+}
+
+void compute_main() {
+  textureLoad_2e09aa();
+}
+
+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/textureLoad/2e09aa.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/2e09aa.wgsl.expected.msl
new file mode 100644
index 0000000..48b5ac4
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/2e09aa.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_2e09aa(texture2d_ms<float, access::read> tint_symbol_1) {
+  float4 res = tint_symbol_1.read(uint2(uint2(0u)), 1u);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_ms<float, access::read> tint_symbol_2) {
+  textureLoad_2e09aa(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_ms<float, access::read> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_ms<float, access::read> tint_symbol_4 [[texture(0)]]) {
+  textureLoad_2e09aa(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d_ms<float, access::read> tint_symbol_5 [[texture(0)]]) {
+  textureLoad_2e09aa(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/2e09aa.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/2e09aa.wgsl.expected.spvasm
new file mode 100644
index 0000000..1964e30
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/2e09aa.wgsl.expected.spvasm
@@ -0,0 +1,75 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 38
+; 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 %textureLoad_2e09aa "textureLoad_2e09aa"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 0 1 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %12 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+         %20 = OpConstantNull %v2uint
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+         %24 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_2e09aa = OpFunction %void None %12
+         %15 = OpLabel
+        %res = OpVariable %_ptr_Function_v4float Function %5
+         %17 = OpLoad %11 %arg_0
+         %16 = OpImageFetch %v4float %17 %20 Sample %uint_1
+               OpStore %res %16
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %24
+         %26 = OpLabel
+         %27 = OpFunctionCall %void %textureLoad_2e09aa
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+         %29 = OpLabel
+         %30 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %30
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %textureLoad_2e09aa
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %12
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %textureLoad_2e09aa
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/2e09aa.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/2e09aa.wgsl.expected.wgsl
new file mode 100644
index 0000000..ca4270f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/2e09aa.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_multisampled_2d<f32>;
+
+fn textureLoad_2e09aa() {
+  var res : vec4<f32> = textureLoad(arg_0, vec2<u32>(), 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_2e09aa();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_2e09aa();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_2e09aa();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/47e818.wgsl b/test/tint/builtins/gen/literal/textureLoad/47e818.wgsl
new file mode 100644
index 0000000..76e9718
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/47e818.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_3d<i32>;
+
+// fn textureLoad(texture: texture_3d<i32>, coords: vec3<u32>, level: u32) -> vec4<i32>
+fn textureLoad_47e818() {
+  var res: vec4<i32> = textureLoad(arg_0, vec3<u32>(), 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_47e818();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_47e818();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_47e818();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/47e818.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/47e818.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..a0f9ce2
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/47e818.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+Texture3D<int4> arg_0 : register(t0, space1);
+
+void textureLoad_47e818() {
+  int4 res = arg_0.Load(uint4(0u, 0u, 0u, 1u));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_47e818();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_47e818();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_47e818();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/47e818.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/47e818.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..a0f9ce2
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/47e818.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+Texture3D<int4> arg_0 : register(t0, space1);
+
+void textureLoad_47e818() {
+  int4 res = arg_0.Load(uint4(0u, 0u, 0u, 1u));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_47e818();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_47e818();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_47e818();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/47e818.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/47e818.wgsl.expected.glsl
new file mode 100644
index 0000000..78f7a1c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/47e818.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+uniform highp isampler3D arg_0_1;
+void textureLoad_47e818() {
+  ivec4 res = texelFetch(arg_0_1, ivec3(uvec3(0u)), int(1u));
+}
+
+vec4 vertex_main() {
+  textureLoad_47e818();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp isampler3D arg_0_1;
+void textureLoad_47e818() {
+  ivec4 res = texelFetch(arg_0_1, ivec3(uvec3(0u)), int(1u));
+}
+
+void fragment_main() {
+  textureLoad_47e818();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp isampler3D arg_0_1;
+void textureLoad_47e818() {
+  ivec4 res = texelFetch(arg_0_1, ivec3(uvec3(0u)), int(1u));
+}
+
+void compute_main() {
+  textureLoad_47e818();
+}
+
+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/textureLoad/47e818.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/47e818.wgsl.expected.msl
new file mode 100644
index 0000000..91e3739
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/47e818.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_47e818(texture3d<int, access::sample> tint_symbol_1) {
+  int4 res = tint_symbol_1.read(uint3(uint3(0u)), 1u);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<int, access::sample> tint_symbol_2) {
+  textureLoad_47e818(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<int, access::sample> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture3d<int, access::sample> tint_symbol_4 [[texture(0)]]) {
+  textureLoad_47e818(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture3d<int, access::sample> tint_symbol_5 [[texture(0)]]) {
+  textureLoad_47e818(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/47e818.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/47e818.wgsl.expected.spvasm
new file mode 100644
index 0000000..fbb4de7
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/47e818.wgsl.expected.spvasm
@@ -0,0 +1,78 @@
+; 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 %textureLoad_47e818 "textureLoad_47e818"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 3D 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+      %v4int = OpTypeVector %int 4
+       %uint = OpTypeInt 32 0
+     %v3uint = OpTypeVector %uint 3
+         %22 = OpConstantNull %v3uint
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+         %26 = OpConstantNull %v4int
+         %27 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_47e818 = OpFunction %void None %13
+         %16 = OpLabel
+        %res = OpVariable %_ptr_Function_v4int Function %26
+         %19 = OpLoad %11 %arg_0
+         %17 = OpImageFetch %v4int %19 %22 Lod %uint_1
+               OpStore %res %17
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %27
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %textureLoad_47e818
+               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 %textureLoad_47e818
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %39 = OpLabel
+         %40 = OpFunctionCall %void %textureLoad_47e818
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/47e818.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/47e818.wgsl.expected.wgsl
new file mode 100644
index 0000000..3f95949
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/47e818.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_3d<i32>;
+
+fn textureLoad_47e818() {
+  var res : vec4<i32> = textureLoad(arg_0, vec3<u32>(), 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_47e818();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_47e818();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_47e818();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/49f76f.wgsl b/test/tint/builtins/gen/literal/textureLoad/49f76f.wgsl
new file mode 100644
index 0000000..d4e1195
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/49f76f.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_multisampled_2d<u32>;
+
+// fn textureLoad(texture: texture_multisampled_2d<u32>, coords: vec2<u32>, sample_index: u32) -> vec4<u32>
+fn textureLoad_49f76f() {
+  var res: vec4<u32> = textureLoad(arg_0, vec2<u32>(), 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_49f76f();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_49f76f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_49f76f();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/49f76f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/49f76f.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..6152f02
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/49f76f.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+Texture2DMS<uint4> arg_0 : register(t0, space1);
+
+void textureLoad_49f76f() {
+  uint4 res = arg_0.Load((0u).xx, 1u);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_49f76f();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_49f76f();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_49f76f();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/49f76f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/49f76f.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..6152f02
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/49f76f.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+Texture2DMS<uint4> arg_0 : register(t0, space1);
+
+void textureLoad_49f76f() {
+  uint4 res = arg_0.Load((0u).xx, 1u);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_49f76f();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_49f76f();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_49f76f();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/49f76f.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/49f76f.wgsl.expected.glsl
new file mode 100644
index 0000000..4f67942
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/49f76f.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+uniform highp usampler2DMS arg_0_1;
+void textureLoad_49f76f() {
+  uvec4 res = texelFetch(arg_0_1, ivec2(uvec2(0u)), int(1u));
+}
+
+vec4 vertex_main() {
+  textureLoad_49f76f();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp usampler2DMS arg_0_1;
+void textureLoad_49f76f() {
+  uvec4 res = texelFetch(arg_0_1, ivec2(uvec2(0u)), int(1u));
+}
+
+void fragment_main() {
+  textureLoad_49f76f();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp usampler2DMS arg_0_1;
+void textureLoad_49f76f() {
+  uvec4 res = texelFetch(arg_0_1, ivec2(uvec2(0u)), int(1u));
+}
+
+void compute_main() {
+  textureLoad_49f76f();
+}
+
+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/textureLoad/49f76f.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/49f76f.wgsl.expected.msl
new file mode 100644
index 0000000..cae2ed1
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/49f76f.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_49f76f(texture2d_ms<uint, access::read> tint_symbol_1) {
+  uint4 res = tint_symbol_1.read(uint2(uint2(0u)), 1u);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_ms<uint, access::read> tint_symbol_2) {
+  textureLoad_49f76f(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_ms<uint, access::read> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_ms<uint, access::read> tint_symbol_4 [[texture(0)]]) {
+  textureLoad_49f76f(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d_ms<uint, access::read> tint_symbol_5 [[texture(0)]]) {
+  textureLoad_49f76f(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/49f76f.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/49f76f.wgsl.expected.spvasm
new file mode 100644
index 0000000..12cfa42
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/49f76f.wgsl.expected.spvasm
@@ -0,0 +1,77 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 40
+; 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 %textureLoad_49f76f "textureLoad_49f76f"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 2D 0 0 1 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+     %v4uint = OpTypeVector %uint 4
+     %v2uint = OpTypeVector %uint 2
+         %21 = OpConstantNull %v2uint
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+         %25 = OpConstantNull %v4uint
+         %26 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_49f76f = OpFunction %void None %13
+         %16 = OpLabel
+        %res = OpVariable %_ptr_Function_v4uint Function %25
+         %19 = OpLoad %11 %arg_0
+         %17 = OpImageFetch %v4uint %19 %21 Sample %uint_1
+               OpStore %res %17
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %26
+         %28 = OpLabel
+         %29 = OpFunctionCall %void %textureLoad_49f76f
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %31 = OpLabel
+         %32 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %32
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %35 = OpLabel
+         %36 = OpFunctionCall %void %textureLoad_49f76f
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %38 = OpLabel
+         %39 = OpFunctionCall %void %textureLoad_49f76f
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/49f76f.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/49f76f.wgsl.expected.wgsl
new file mode 100644
index 0000000..b1ad019
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/49f76f.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_multisampled_2d<u32>;
+
+fn textureLoad_49f76f() {
+  var res : vec4<u32> = textureLoad(arg_0, vec2<u32>(), 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_49f76f();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_49f76f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_49f76f();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/4db25c.wgsl b/test/tint/builtins/gen/literal/textureLoad/4db25c.wgsl
new file mode 100644
index 0000000..3418786
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/4db25c.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_depth_multisampled_2d;
+
+// fn textureLoad(texture: texture_depth_multisampled_2d, coords: vec2<u32>, sample_index: u32) -> f32
+fn textureLoad_4db25c() {
+  var res: f32 = textureLoad(arg_0, vec2<u32>(), 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_4db25c();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_4db25c();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_4db25c();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/4db25c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/4db25c.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..13ff0ba
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/4db25c.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+Texture2DMS<float4> arg_0 : register(t0, space1);
+
+void textureLoad_4db25c() {
+  float res = arg_0.Load(uint3(0u, 0u, uint(0)), 1u).x;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_4db25c();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_4db25c();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_4db25c();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/4db25c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/4db25c.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..13ff0ba
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/4db25c.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+Texture2DMS<float4> arg_0 : register(t0, space1);
+
+void textureLoad_4db25c() {
+  float res = arg_0.Load(uint3(0u, 0u, uint(0)), 1u).x;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_4db25c();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_4db25c();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_4db25c();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/4db25c.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/4db25c.wgsl.expected.glsl
new file mode 100644
index 0000000..ddef4d9
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/4db25c.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+uniform highp sampler2DMS arg_0_1;
+void textureLoad_4db25c() {
+  float res = texelFetch(arg_0_1, ivec2(uvec2(0u)), int(1u)).x;
+}
+
+vec4 vertex_main() {
+  textureLoad_4db25c();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2DMS arg_0_1;
+void textureLoad_4db25c() {
+  float res = texelFetch(arg_0_1, ivec2(uvec2(0u)), int(1u)).x;
+}
+
+void fragment_main() {
+  textureLoad_4db25c();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp sampler2DMS arg_0_1;
+void textureLoad_4db25c() {
+  float res = texelFetch(arg_0_1, ivec2(uvec2(0u)), int(1u)).x;
+}
+
+void compute_main() {
+  textureLoad_4db25c();
+}
+
+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/textureLoad/4db25c.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/4db25c.wgsl.expected.msl
new file mode 100644
index 0000000..28efe98
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/4db25c.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_4db25c(depth2d_ms<float, access::read> tint_symbol_1) {
+  float res = tint_symbol_1.read(uint2(uint2(0u)), 1u);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(depth2d_ms<float, access::read> tint_symbol_2) {
+  textureLoad_4db25c(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(depth2d_ms<float, access::read> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(depth2d_ms<float, access::read> tint_symbol_4 [[texture(0)]]) {
+  textureLoad_4db25c(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(depth2d_ms<float, access::read> tint_symbol_5 [[texture(0)]]) {
+  textureLoad_4db25c(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/4db25c.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/4db25c.wgsl.expected.spvasm
new file mode 100644
index 0000000..27c7101
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/4db25c.wgsl.expected.spvasm
@@ -0,0 +1,76 @@
+; 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 %textureLoad_4db25c "textureLoad_4db25c"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 0 1 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %12 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+         %21 = OpConstantNull %v2uint
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_float = OpTypePointer Function %float
+         %25 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_4db25c = OpFunction %void None %12
+         %15 = OpLabel
+        %res = OpVariable %_ptr_Function_float Function %8
+         %18 = OpLoad %11 %arg_0
+         %17 = OpImageFetch %v4float %18 %21 Sample %uint_1
+         %16 = OpCompositeExtract %float %17 0
+               OpStore %res %16
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %25
+         %27 = OpLabel
+         %28 = OpFunctionCall %void %textureLoad_4db25c
+               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 %textureLoad_4db25c
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %12
+         %37 = OpLabel
+         %38 = OpFunctionCall %void %textureLoad_4db25c
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/4db25c.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/4db25c.wgsl.expected.wgsl
new file mode 100644
index 0000000..467f37a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/4db25c.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_depth_multisampled_2d;
+
+fn textureLoad_4db25c() {
+  var res : f32 = textureLoad(arg_0, vec2<u32>(), 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_4db25c();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_4db25c();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_4db25c();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/639962.wgsl b/test/tint/builtins/gen/literal/textureLoad/639962.wgsl
new file mode 100644
index 0000000..9311705
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/639962.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_multisampled_2d<i32>;
+
+// fn textureLoad(texture: texture_multisampled_2d<i32>, coords: vec2<u32>, sample_index: u32) -> vec4<i32>
+fn textureLoad_639962() {
+  var res: vec4<i32> = textureLoad(arg_0, vec2<u32>(), 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_639962();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_639962();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_639962();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/639962.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/639962.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..42bb7f1
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/639962.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+Texture2DMS<int4> arg_0 : register(t0, space1);
+
+void textureLoad_639962() {
+  int4 res = arg_0.Load((0u).xx, 1u);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_639962();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_639962();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_639962();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/639962.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/639962.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..42bb7f1
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/639962.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+Texture2DMS<int4> arg_0 : register(t0, space1);
+
+void textureLoad_639962() {
+  int4 res = arg_0.Load((0u).xx, 1u);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_639962();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_639962();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_639962();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/639962.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/639962.wgsl.expected.glsl
new file mode 100644
index 0000000..40ede06
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/639962.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+uniform highp isampler2DMS arg_0_1;
+void textureLoad_639962() {
+  ivec4 res = texelFetch(arg_0_1, ivec2(uvec2(0u)), int(1u));
+}
+
+vec4 vertex_main() {
+  textureLoad_639962();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp isampler2DMS arg_0_1;
+void textureLoad_639962() {
+  ivec4 res = texelFetch(arg_0_1, ivec2(uvec2(0u)), int(1u));
+}
+
+void fragment_main() {
+  textureLoad_639962();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp isampler2DMS arg_0_1;
+void textureLoad_639962() {
+  ivec4 res = texelFetch(arg_0_1, ivec2(uvec2(0u)), int(1u));
+}
+
+void compute_main() {
+  textureLoad_639962();
+}
+
+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/textureLoad/639962.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/639962.wgsl.expected.msl
new file mode 100644
index 0000000..c0022d9
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/639962.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_639962(texture2d_ms<int, access::read> tint_symbol_1) {
+  int4 res = tint_symbol_1.read(uint2(uint2(0u)), 1u);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_ms<int, access::read> tint_symbol_2) {
+  textureLoad_639962(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_ms<int, access::read> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_ms<int, access::read> tint_symbol_4 [[texture(0)]]) {
+  textureLoad_639962(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d_ms<int, access::read> tint_symbol_5 [[texture(0)]]) {
+  textureLoad_639962(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/639962.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/639962.wgsl.expected.spvasm
new file mode 100644
index 0000000..2c8ccab
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/639962.wgsl.expected.spvasm
@@ -0,0 +1,78 @@
+; 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 %textureLoad_639962 "textureLoad_639962"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 2D 0 0 1 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+      %v4int = OpTypeVector %int 4
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+         %22 = OpConstantNull %v2uint
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+         %26 = OpConstantNull %v4int
+         %27 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_639962 = OpFunction %void None %13
+         %16 = OpLabel
+        %res = OpVariable %_ptr_Function_v4int Function %26
+         %19 = OpLoad %11 %arg_0
+         %17 = OpImageFetch %v4int %19 %22 Sample %uint_1
+               OpStore %res %17
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %27
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %textureLoad_639962
+               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 %textureLoad_639962
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %39 = OpLabel
+         %40 = OpFunctionCall %void %textureLoad_639962
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/639962.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/639962.wgsl.expected.wgsl
new file mode 100644
index 0000000..f7aa89a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/639962.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_multisampled_2d<i32>;
+
+fn textureLoad_639962() {
+  var res : vec4<i32> = textureLoad(arg_0, vec2<u32>(), 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_639962();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_639962();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_639962();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/6d376a.wgsl b/test/tint/builtins/gen/literal/textureLoad/6d376a.wgsl
new file mode 100644
index 0000000..849bb5a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/6d376a.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_1d<f32>;
+
+// fn textureLoad(texture: texture_1d<f32>, coords: u32, level: u32) -> vec4<f32>
+fn textureLoad_6d376a() {
+  var res: vec4<f32> = textureLoad(arg_0, 1u, 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_6d376a();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_6d376a();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_6d376a();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/6d376a.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/6d376a.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..51583e3
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/6d376a.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+Texture1D<float4> arg_0 : register(t0, space1);
+
+void textureLoad_6d376a() {
+  float4 res = arg_0.Load(uint2(1u, 1u));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_6d376a();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_6d376a();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_6d376a();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/6d376a.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/6d376a.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..51583e3
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/6d376a.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+Texture1D<float4> arg_0 : register(t0, space1);
+
+void textureLoad_6d376a() {
+  float4 res = arg_0.Load(uint2(1u, 1u));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_6d376a();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_6d376a();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_6d376a();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/6d376a.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/6d376a.wgsl.expected.glsl
new file mode 100644
index 0000000..c4a6d4c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/6d376a.wgsl.expected.glsl
@@ -0,0 +1,75 @@
+SKIP: FAILED
+
+#version 310 es
+
+uniform highp sampler1D arg_0_1;
+void textureLoad_6d376a() {
+  vec4 res = texelFetch(arg_0_1, int(1u), int(1u));
+}
+
+vec4 vertex_main() {
+  textureLoad_6d376a();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'sampler1D' : Reserved word. 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+uniform highp sampler1D arg_0_1;
+void textureLoad_6d376a() {
+  vec4 res = texelFetch(arg_0_1, int(1u), int(1u));
+}
+
+void fragment_main() {
+  textureLoad_6d376a();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'sampler1D' : Reserved word. 
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+uniform highp sampler1D arg_0_1;
+void textureLoad_6d376a() {
+  vec4 res = texelFetch(arg_0_1, int(1u), int(1u));
+}
+
+void compute_main() {
+  textureLoad_6d376a();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'sampler1D' : Reserved word. 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/6d376a.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/6d376a.wgsl.expected.msl
new file mode 100644
index 0000000..c5370ac
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/6d376a.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_6d376a(texture1d<float, access::sample> tint_symbol_1) {
+  float4 res = tint_symbol_1.read(uint(1u), 0);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<float, access::sample> tint_symbol_2) {
+  textureLoad_6d376a(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<float, access::sample> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<float, access::sample> tint_symbol_4 [[texture(0)]]) {
+  textureLoad_6d376a(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture1d<float, access::sample> tint_symbol_5 [[texture(0)]]) {
+  textureLoad_6d376a(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/6d376a.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/6d376a.wgsl.expected.spvasm
new file mode 100644
index 0000000..c627641
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/6d376a.wgsl.expected.spvasm
@@ -0,0 +1,74 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 36
+; Schema: 0
+               OpCapability Shader
+               OpCapability Sampled1D
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureLoad_6d376a "textureLoad_6d376a"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 1D 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %12 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+         %22 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_6d376a = OpFunction %void None %12
+         %15 = OpLabel
+        %res = OpVariable %_ptr_Function_v4float Function %5
+         %17 = OpLoad %11 %arg_0
+         %16 = OpImageFetch %v4float %17 %uint_1 Lod %uint_1
+               OpStore %res %16
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %22
+         %24 = OpLabel
+         %25 = OpFunctionCall %void %textureLoad_6d376a
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+         %27 = OpLabel
+         %28 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %28
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+         %31 = OpLabel
+         %32 = OpFunctionCall %void %textureLoad_6d376a
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %12
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %textureLoad_6d376a
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/6d376a.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/6d376a.wgsl.expected.wgsl
new file mode 100644
index 0000000..498f136
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/6d376a.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_1d<f32>;
+
+fn textureLoad_6d376a() {
+  var res : vec4<f32> = textureLoad(arg_0, 1u, 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_6d376a();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_6d376a();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_6d376a();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/714471.wgsl b/test/tint/builtins/gen/literal/textureLoad/714471.wgsl
new file mode 100644
index 0000000..784ea18
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/714471.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_2d<i32>;
+
+// fn textureLoad(texture: texture_2d<i32>, coords: vec2<u32>, level: u32) -> vec4<i32>
+fn textureLoad_714471() {
+  var res: vec4<i32> = textureLoad(arg_0, vec2<u32>(), 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_714471();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_714471();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_714471();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/714471.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/714471.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..c201b76
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/714471.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+Texture2D<int4> arg_0 : register(t0, space1);
+
+void textureLoad_714471() {
+  int4 res = arg_0.Load(uint3(0u, 0u, 1u));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_714471();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_714471();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_714471();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/714471.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/714471.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..c201b76
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/714471.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+Texture2D<int4> arg_0 : register(t0, space1);
+
+void textureLoad_714471() {
+  int4 res = arg_0.Load(uint3(0u, 0u, 1u));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_714471();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_714471();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_714471();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/714471.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/714471.wgsl.expected.glsl
new file mode 100644
index 0000000..16a781c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/714471.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+uniform highp isampler2D arg_0_1;
+void textureLoad_714471() {
+  ivec4 res = texelFetch(arg_0_1, ivec2(uvec2(0u)), int(1u));
+}
+
+vec4 vertex_main() {
+  textureLoad_714471();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp isampler2D arg_0_1;
+void textureLoad_714471() {
+  ivec4 res = texelFetch(arg_0_1, ivec2(uvec2(0u)), int(1u));
+}
+
+void fragment_main() {
+  textureLoad_714471();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp isampler2D arg_0_1;
+void textureLoad_714471() {
+  ivec4 res = texelFetch(arg_0_1, ivec2(uvec2(0u)), int(1u));
+}
+
+void compute_main() {
+  textureLoad_714471();
+}
+
+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/textureLoad/714471.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/714471.wgsl.expected.msl
new file mode 100644
index 0000000..dfe204f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/714471.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_714471(texture2d<int, access::sample> tint_symbol_1) {
+  int4 res = tint_symbol_1.read(uint2(uint2(0u)), 1u);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<int, access::sample> tint_symbol_2) {
+  textureLoad_714471(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<int, access::sample> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<int, access::sample> tint_symbol_4 [[texture(0)]]) {
+  textureLoad_714471(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d<int, access::sample> tint_symbol_5 [[texture(0)]]) {
+  textureLoad_714471(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/714471.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/714471.wgsl.expected.spvasm
new file mode 100644
index 0000000..845ee95
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/714471.wgsl.expected.spvasm
@@ -0,0 +1,78 @@
+; 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 %textureLoad_714471 "textureLoad_714471"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 2D 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+      %v4int = OpTypeVector %int 4
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+         %22 = OpConstantNull %v2uint
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+         %26 = OpConstantNull %v4int
+         %27 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_714471 = OpFunction %void None %13
+         %16 = OpLabel
+        %res = OpVariable %_ptr_Function_v4int Function %26
+         %19 = OpLoad %11 %arg_0
+         %17 = OpImageFetch %v4int %19 %22 Lod %uint_1
+               OpStore %res %17
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %27
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %textureLoad_714471
+               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 %textureLoad_714471
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %39 = OpLabel
+         %40 = OpFunctionCall %void %textureLoad_714471
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/714471.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/714471.wgsl.expected.wgsl
new file mode 100644
index 0000000..b6f83de
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/714471.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_2d<i32>;
+
+fn textureLoad_714471() {
+  var res : vec4<i32> = textureLoad(arg_0, vec2<u32>(), 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_714471();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_714471();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_714471();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/7b63e0.wgsl b/test/tint/builtins/gen/literal/textureLoad/7b63e0.wgsl
new file mode 100644
index 0000000..0c629f1
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/7b63e0.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_depth_2d_array;
+
+// fn textureLoad(texture: texture_depth_2d_array, coords: vec2<u32>, array_index: u32, level: u32) -> f32
+fn textureLoad_7b63e0() {
+  var res: f32 = textureLoad(arg_0, vec2<u32>(), 1u, 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_7b63e0();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_7b63e0();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_7b63e0();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/7b63e0.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/7b63e0.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..fd429fc
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/7b63e0.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+Texture2DArray arg_0 : register(t0, space1);
+
+void textureLoad_7b63e0() {
+  float res = arg_0.Load(uint4(0u, 0u, 1u, 1u)).x;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_7b63e0();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_7b63e0();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_7b63e0();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/7b63e0.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/7b63e0.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..fd429fc
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/7b63e0.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+Texture2DArray arg_0 : register(t0, space1);
+
+void textureLoad_7b63e0() {
+  float res = arg_0.Load(uint4(0u, 0u, 1u, 1u)).x;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_7b63e0();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_7b63e0();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_7b63e0();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/7b63e0.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/7b63e0.wgsl.expected.glsl
new file mode 100644
index 0000000..9e3335b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/7b63e0.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+uniform highp sampler2DArray arg_0_1;
+void textureLoad_7b63e0() {
+  float res = texelFetch(arg_0_1, ivec3(uvec3(0u, 0u, 1u)), int(1u)).x;
+}
+
+vec4 vertex_main() {
+  textureLoad_7b63e0();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2DArray arg_0_1;
+void textureLoad_7b63e0() {
+  float res = texelFetch(arg_0_1, ivec3(uvec3(0u, 0u, 1u)), int(1u)).x;
+}
+
+void fragment_main() {
+  textureLoad_7b63e0();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp sampler2DArray arg_0_1;
+void textureLoad_7b63e0() {
+  float res = texelFetch(arg_0_1, ivec3(uvec3(0u, 0u, 1u)), int(1u)).x;
+}
+
+void compute_main() {
+  textureLoad_7b63e0();
+}
+
+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/textureLoad/7b63e0.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/7b63e0.wgsl.expected.msl
new file mode 100644
index 0000000..16c3883
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/7b63e0.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_7b63e0(depth2d_array<float, access::sample> tint_symbol_1) {
+  float res = tint_symbol_1.read(uint2(uint2(0u)), 1u, 1u);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(depth2d_array<float, access::sample> tint_symbol_2) {
+  textureLoad_7b63e0(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(depth2d_array<float, access::sample> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(depth2d_array<float, access::sample> tint_symbol_4 [[texture(0)]]) {
+  textureLoad_7b63e0(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(depth2d_array<float, access::sample> tint_symbol_5 [[texture(0)]]) {
+  textureLoad_7b63e0(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/7b63e0.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/7b63e0.wgsl.expected.spvasm
new file mode 100644
index 0000000..7619398
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/7b63e0.wgsl.expected.spvasm
@@ -0,0 +1,77 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 40
+; 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 %textureLoad_7b63e0 "textureLoad_7b63e0"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %12 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v3uint = OpTypeVector %uint 3
+     %uint_0 = OpConstant %uint 0
+     %uint_1 = OpConstant %uint 1
+         %23 = OpConstantComposite %v3uint %uint_0 %uint_0 %uint_1
+%_ptr_Function_float = OpTypePointer Function %float
+         %26 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_7b63e0 = OpFunction %void None %12
+         %15 = OpLabel
+        %res = OpVariable %_ptr_Function_float Function %8
+         %18 = OpLoad %11 %arg_0
+         %17 = OpImageFetch %v4float %18 %23 Lod %uint_1
+         %16 = OpCompositeExtract %float %17 0
+               OpStore %res %16
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %26
+         %28 = OpLabel
+         %29 = OpFunctionCall %void %textureLoad_7b63e0
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+         %31 = OpLabel
+         %32 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %32
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+         %35 = OpLabel
+         %36 = OpFunctionCall %void %textureLoad_7b63e0
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %12
+         %38 = OpLabel
+         %39 = OpFunctionCall %void %textureLoad_7b63e0
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/7b63e0.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/7b63e0.wgsl.expected.wgsl
new file mode 100644
index 0000000..9f9e633
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/7b63e0.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_depth_2d_array;
+
+fn textureLoad_7b63e0() {
+  var res : f32 = textureLoad(arg_0, vec2<u32>(), 1u, 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_7b63e0();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_7b63e0();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_7b63e0();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/84dee1.wgsl b/test/tint/builtins/gen/literal/textureLoad/84dee1.wgsl
new file mode 100644
index 0000000..8a57894
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/84dee1.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_2d<f32>;
+
+// fn textureLoad(texture: texture_2d<f32>, coords: vec2<u32>, level: u32) -> vec4<f32>
+fn textureLoad_84dee1() {
+  var res: vec4<f32> = textureLoad(arg_0, vec2<u32>(), 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_84dee1();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_84dee1();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_84dee1();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/84dee1.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/84dee1.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..44ec101
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/84dee1.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+Texture2D<float4> arg_0 : register(t0, space1);
+
+void textureLoad_84dee1() {
+  float4 res = arg_0.Load(uint3(0u, 0u, 1u));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_84dee1();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_84dee1();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_84dee1();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/84dee1.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/84dee1.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..44ec101
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/84dee1.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+Texture2D<float4> arg_0 : register(t0, space1);
+
+void textureLoad_84dee1() {
+  float4 res = arg_0.Load(uint3(0u, 0u, 1u));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_84dee1();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_84dee1();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_84dee1();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/84dee1.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/84dee1.wgsl.expected.glsl
new file mode 100644
index 0000000..61255d3
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/84dee1.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+uniform highp sampler2D arg_0_1;
+void textureLoad_84dee1() {
+  vec4 res = texelFetch(arg_0_1, ivec2(uvec2(0u)), int(1u));
+}
+
+vec4 vertex_main() {
+  textureLoad_84dee1();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2D arg_0_1;
+void textureLoad_84dee1() {
+  vec4 res = texelFetch(arg_0_1, ivec2(uvec2(0u)), int(1u));
+}
+
+void fragment_main() {
+  textureLoad_84dee1();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp sampler2D arg_0_1;
+void textureLoad_84dee1() {
+  vec4 res = texelFetch(arg_0_1, ivec2(uvec2(0u)), int(1u));
+}
+
+void compute_main() {
+  textureLoad_84dee1();
+}
+
+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/textureLoad/84dee1.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/84dee1.wgsl.expected.msl
new file mode 100644
index 0000000..f487844
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/84dee1.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_84dee1(texture2d<float, access::sample> tint_symbol_1) {
+  float4 res = tint_symbol_1.read(uint2(uint2(0u)), 1u);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<float, access::sample> tint_symbol_2) {
+  textureLoad_84dee1(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<float, access::sample> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<float, access::sample> tint_symbol_4 [[texture(0)]]) {
+  textureLoad_84dee1(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d<float, access::sample> tint_symbol_5 [[texture(0)]]) {
+  textureLoad_84dee1(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/84dee1.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/84dee1.wgsl.expected.spvasm
new file mode 100644
index 0000000..06cffb7
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/84dee1.wgsl.expected.spvasm
@@ -0,0 +1,75 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 38
+; 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 %textureLoad_84dee1 "textureLoad_84dee1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %12 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+         %20 = OpConstantNull %v2uint
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+         %24 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_84dee1 = OpFunction %void None %12
+         %15 = OpLabel
+        %res = OpVariable %_ptr_Function_v4float Function %5
+         %17 = OpLoad %11 %arg_0
+         %16 = OpImageFetch %v4float %17 %20 Lod %uint_1
+               OpStore %res %16
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %24
+         %26 = OpLabel
+         %27 = OpFunctionCall %void %textureLoad_84dee1
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+         %29 = OpLabel
+         %30 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %30
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %textureLoad_84dee1
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %12
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %textureLoad_84dee1
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/84dee1.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/84dee1.wgsl.expected.wgsl
new file mode 100644
index 0000000..8c71828
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/84dee1.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_2d<f32>;
+
+fn textureLoad_84dee1() {
+  var res : vec4<f32> = textureLoad(arg_0, vec2<u32>(), 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_84dee1();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_84dee1();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_84dee1();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/8527b1.wgsl b/test/tint/builtins/gen/literal/textureLoad/8527b1.wgsl
new file mode 100644
index 0000000..30e2321
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/8527b1.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_2d_array<u32>;
+
+// fn textureLoad(texture: texture_2d_array<u32>, coords: vec2<u32>, array_index: u32, level: u32) -> vec4<u32>
+fn textureLoad_8527b1() {
+  var res: vec4<u32> = textureLoad(arg_0, vec2<u32>(), 1u, 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_8527b1();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_8527b1();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_8527b1();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/8527b1.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/8527b1.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..996ba2b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/8527b1.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+Texture2DArray<uint4> arg_0 : register(t0, space1);
+
+void textureLoad_8527b1() {
+  uint4 res = arg_0.Load(uint4(0u, 0u, 1u, 1u));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_8527b1();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_8527b1();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_8527b1();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/8527b1.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/8527b1.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..996ba2b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/8527b1.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+Texture2DArray<uint4> arg_0 : register(t0, space1);
+
+void textureLoad_8527b1() {
+  uint4 res = arg_0.Load(uint4(0u, 0u, 1u, 1u));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_8527b1();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_8527b1();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_8527b1();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/8527b1.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/8527b1.wgsl.expected.glsl
new file mode 100644
index 0000000..d8b25ad
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/8527b1.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+uniform highp usampler2DArray arg_0_1;
+void textureLoad_8527b1() {
+  uvec4 res = texelFetch(arg_0_1, ivec3(uvec3(0u, 0u, 1u)), int(1u));
+}
+
+vec4 vertex_main() {
+  textureLoad_8527b1();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp usampler2DArray arg_0_1;
+void textureLoad_8527b1() {
+  uvec4 res = texelFetch(arg_0_1, ivec3(uvec3(0u, 0u, 1u)), int(1u));
+}
+
+void fragment_main() {
+  textureLoad_8527b1();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp usampler2DArray arg_0_1;
+void textureLoad_8527b1() {
+  uvec4 res = texelFetch(arg_0_1, ivec3(uvec3(0u, 0u, 1u)), int(1u));
+}
+
+void compute_main() {
+  textureLoad_8527b1();
+}
+
+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/textureLoad/8527b1.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/8527b1.wgsl.expected.msl
new file mode 100644
index 0000000..925232e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/8527b1.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_8527b1(texture2d_array<uint, access::sample> tint_symbol_1) {
+  uint4 res = tint_symbol_1.read(uint2(uint2(0u)), 1u, 1u);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<uint, access::sample> tint_symbol_2) {
+  textureLoad_8527b1(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<uint, access::sample> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<uint, access::sample> tint_symbol_4 [[texture(0)]]) {
+  textureLoad_8527b1(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d_array<uint, access::sample> tint_symbol_5 [[texture(0)]]) {
+  textureLoad_8527b1(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/8527b1.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/8527b1.wgsl.expected.spvasm
new file mode 100644
index 0000000..a5774fc
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/8527b1.wgsl.expected.spvasm
@@ -0,0 +1,78 @@
+; 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 %textureLoad_8527b1 "textureLoad_8527b1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+     %v4uint = OpTypeVector %uint 4
+     %v3uint = OpTypeVector %uint 3
+     %uint_0 = OpConstant %uint 0
+     %uint_1 = OpConstant %uint 1
+         %23 = OpConstantComposite %v3uint %uint_0 %uint_0 %uint_1
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+         %26 = OpConstantNull %v4uint
+         %27 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_8527b1 = OpFunction %void None %13
+         %16 = OpLabel
+        %res = OpVariable %_ptr_Function_v4uint Function %26
+         %19 = OpLoad %11 %arg_0
+         %17 = OpImageFetch %v4uint %19 %23 Lod %uint_1
+               OpStore %res %17
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %27
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %textureLoad_8527b1
+               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 %textureLoad_8527b1
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %39 = OpLabel
+         %40 = OpFunctionCall %void %textureLoad_8527b1
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/8527b1.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/8527b1.wgsl.expected.wgsl
new file mode 100644
index 0000000..0c8f290
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/8527b1.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_2d_array<u32>;
+
+fn textureLoad_8527b1() {
+  var res : vec4<u32> = textureLoad(arg_0, vec2<u32>(), 1u, 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_8527b1();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_8527b1();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_8527b1();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/897cf3.wgsl b/test/tint/builtins/gen/literal/textureLoad/897cf3.wgsl
new file mode 100644
index 0000000..1f056a2
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/897cf3.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_2d<u32>;
+
+// fn textureLoad(texture: texture_2d<u32>, coords: vec2<u32>, level: u32) -> vec4<u32>
+fn textureLoad_897cf3() {
+  var res: vec4<u32> = textureLoad(arg_0, vec2<u32>(), 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_897cf3();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_897cf3();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_897cf3();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/897cf3.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/897cf3.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..c099bb5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/897cf3.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+Texture2D<uint4> arg_0 : register(t0, space1);
+
+void textureLoad_897cf3() {
+  uint4 res = arg_0.Load(uint3(0u, 0u, 1u));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_897cf3();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_897cf3();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_897cf3();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/897cf3.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/897cf3.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..c099bb5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/897cf3.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+Texture2D<uint4> arg_0 : register(t0, space1);
+
+void textureLoad_897cf3() {
+  uint4 res = arg_0.Load(uint3(0u, 0u, 1u));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_897cf3();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_897cf3();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_897cf3();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/897cf3.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/897cf3.wgsl.expected.glsl
new file mode 100644
index 0000000..e77f26b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/897cf3.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+uniform highp usampler2D arg_0_1;
+void textureLoad_897cf3() {
+  uvec4 res = texelFetch(arg_0_1, ivec2(uvec2(0u)), int(1u));
+}
+
+vec4 vertex_main() {
+  textureLoad_897cf3();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp usampler2D arg_0_1;
+void textureLoad_897cf3() {
+  uvec4 res = texelFetch(arg_0_1, ivec2(uvec2(0u)), int(1u));
+}
+
+void fragment_main() {
+  textureLoad_897cf3();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp usampler2D arg_0_1;
+void textureLoad_897cf3() {
+  uvec4 res = texelFetch(arg_0_1, ivec2(uvec2(0u)), int(1u));
+}
+
+void compute_main() {
+  textureLoad_897cf3();
+}
+
+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/textureLoad/897cf3.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/897cf3.wgsl.expected.msl
new file mode 100644
index 0000000..dfbe3e3
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/897cf3.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_897cf3(texture2d<uint, access::sample> tint_symbol_1) {
+  uint4 res = tint_symbol_1.read(uint2(uint2(0u)), 1u);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<uint, access::sample> tint_symbol_2) {
+  textureLoad_897cf3(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<uint, access::sample> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<uint, access::sample> tint_symbol_4 [[texture(0)]]) {
+  textureLoad_897cf3(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d<uint, access::sample> tint_symbol_5 [[texture(0)]]) {
+  textureLoad_897cf3(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/897cf3.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/897cf3.wgsl.expected.spvasm
new file mode 100644
index 0000000..d6fb44d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/897cf3.wgsl.expected.spvasm
@@ -0,0 +1,77 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 40
+; 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 %textureLoad_897cf3 "textureLoad_897cf3"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 2D 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+     %v4uint = OpTypeVector %uint 4
+     %v2uint = OpTypeVector %uint 2
+         %21 = OpConstantNull %v2uint
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+         %25 = OpConstantNull %v4uint
+         %26 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_897cf3 = OpFunction %void None %13
+         %16 = OpLabel
+        %res = OpVariable %_ptr_Function_v4uint Function %25
+         %19 = OpLoad %11 %arg_0
+         %17 = OpImageFetch %v4uint %19 %21 Lod %uint_1
+               OpStore %res %17
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %26
+         %28 = OpLabel
+         %29 = OpFunctionCall %void %textureLoad_897cf3
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %31 = OpLabel
+         %32 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %32
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %35 = OpLabel
+         %36 = OpFunctionCall %void %textureLoad_897cf3
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %38 = OpLabel
+         %39 = OpFunctionCall %void %textureLoad_897cf3
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/897cf3.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/897cf3.wgsl.expected.wgsl
new file mode 100644
index 0000000..4acf456
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/897cf3.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_2d<u32>;
+
+fn textureLoad_897cf3() {
+  var res : vec4<u32> = textureLoad(arg_0, vec2<u32>(), 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_897cf3();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_897cf3();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_897cf3();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/96efd5.wgsl b/test/tint/builtins/gen/literal/textureLoad/96efd5.wgsl
new file mode 100644
index 0000000..2a5a5d7
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/96efd5.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_2d_array<f32>;
+
+// fn textureLoad(texture: texture_2d_array<f32>, coords: vec2<u32>, array_index: u32, level: u32) -> vec4<f32>
+fn textureLoad_96efd5() {
+  var res: vec4<f32> = textureLoad(arg_0, vec2<u32>(), 1u, 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_96efd5();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_96efd5();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_96efd5();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/96efd5.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/96efd5.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..67c4f1b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/96efd5.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+
+void textureLoad_96efd5() {
+  float4 res = arg_0.Load(uint4(0u, 0u, 1u, 1u));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_96efd5();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_96efd5();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_96efd5();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/96efd5.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/96efd5.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..67c4f1b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/96efd5.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+
+void textureLoad_96efd5() {
+  float4 res = arg_0.Load(uint4(0u, 0u, 1u, 1u));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_96efd5();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_96efd5();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_96efd5();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/96efd5.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/96efd5.wgsl.expected.glsl
new file mode 100644
index 0000000..f3f8f17
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/96efd5.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+uniform highp sampler2DArray arg_0_1;
+void textureLoad_96efd5() {
+  vec4 res = texelFetch(arg_0_1, ivec3(uvec3(0u, 0u, 1u)), int(1u));
+}
+
+vec4 vertex_main() {
+  textureLoad_96efd5();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2DArray arg_0_1;
+void textureLoad_96efd5() {
+  vec4 res = texelFetch(arg_0_1, ivec3(uvec3(0u, 0u, 1u)), int(1u));
+}
+
+void fragment_main() {
+  textureLoad_96efd5();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp sampler2DArray arg_0_1;
+void textureLoad_96efd5() {
+  vec4 res = texelFetch(arg_0_1, ivec3(uvec3(0u, 0u, 1u)), int(1u));
+}
+
+void compute_main() {
+  textureLoad_96efd5();
+}
+
+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/textureLoad/96efd5.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/96efd5.wgsl.expected.msl
new file mode 100644
index 0000000..3f9f55f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/96efd5.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_96efd5(texture2d_array<float, access::sample> tint_symbol_1) {
+  float4 res = tint_symbol_1.read(uint2(uint2(0u)), 1u, 1u);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<float, access::sample> tint_symbol_2) {
+  textureLoad_96efd5(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<float, access::sample> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<float, access::sample> tint_symbol_4 [[texture(0)]]) {
+  textureLoad_96efd5(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d_array<float, access::sample> tint_symbol_5 [[texture(0)]]) {
+  textureLoad_96efd5(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/96efd5.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/96efd5.wgsl.expected.spvasm
new file mode 100644
index 0000000..e75371c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/96efd5.wgsl.expected.spvasm
@@ -0,0 +1,76 @@
+; 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 %textureLoad_96efd5 "textureLoad_96efd5"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %12 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v3uint = OpTypeVector %uint 3
+     %uint_0 = OpConstant %uint 0
+     %uint_1 = OpConstant %uint 1
+         %22 = OpConstantComposite %v3uint %uint_0 %uint_0 %uint_1
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+         %25 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_96efd5 = OpFunction %void None %12
+         %15 = OpLabel
+        %res = OpVariable %_ptr_Function_v4float Function %5
+         %17 = OpLoad %11 %arg_0
+         %16 = OpImageFetch %v4float %17 %22 Lod %uint_1
+               OpStore %res %16
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %25
+         %27 = OpLabel
+         %28 = OpFunctionCall %void %textureLoad_96efd5
+               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 %textureLoad_96efd5
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %12
+         %37 = OpLabel
+         %38 = OpFunctionCall %void %textureLoad_96efd5
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/96efd5.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/96efd5.wgsl.expected.wgsl
new file mode 100644
index 0000000..d6f1fec
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/96efd5.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_2d_array<f32>;
+
+fn textureLoad_96efd5() {
+  var res : vec4<f32> = textureLoad(arg_0, vec2<u32>(), 1u, 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_96efd5();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_96efd5();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_96efd5();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/9885b0.wgsl b/test/tint/builtins/gen/literal/textureLoad/9885b0.wgsl
new file mode 100644
index 0000000..7932e4f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/9885b0.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_2d_array<i32>;
+
+// fn textureLoad(texture: texture_2d_array<i32>, coords: vec2<u32>, array_index: u32, level: u32) -> vec4<i32>
+fn textureLoad_9885b0() {
+  var res: vec4<i32> = textureLoad(arg_0, vec2<u32>(), 1u, 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_9885b0();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_9885b0();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_9885b0();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/9885b0.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/9885b0.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..1362ee5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/9885b0.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+Texture2DArray<int4> arg_0 : register(t0, space1);
+
+void textureLoad_9885b0() {
+  int4 res = arg_0.Load(uint4(0u, 0u, 1u, 1u));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_9885b0();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_9885b0();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_9885b0();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/9885b0.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/9885b0.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..1362ee5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/9885b0.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+Texture2DArray<int4> arg_0 : register(t0, space1);
+
+void textureLoad_9885b0() {
+  int4 res = arg_0.Load(uint4(0u, 0u, 1u, 1u));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_9885b0();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_9885b0();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_9885b0();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/9885b0.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/9885b0.wgsl.expected.glsl
new file mode 100644
index 0000000..37d02a3
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/9885b0.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+uniform highp isampler2DArray arg_0_1;
+void textureLoad_9885b0() {
+  ivec4 res = texelFetch(arg_0_1, ivec3(uvec3(0u, 0u, 1u)), int(1u));
+}
+
+vec4 vertex_main() {
+  textureLoad_9885b0();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp isampler2DArray arg_0_1;
+void textureLoad_9885b0() {
+  ivec4 res = texelFetch(arg_0_1, ivec3(uvec3(0u, 0u, 1u)), int(1u));
+}
+
+void fragment_main() {
+  textureLoad_9885b0();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp isampler2DArray arg_0_1;
+void textureLoad_9885b0() {
+  ivec4 res = texelFetch(arg_0_1, ivec3(uvec3(0u, 0u, 1u)), int(1u));
+}
+
+void compute_main() {
+  textureLoad_9885b0();
+}
+
+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/textureLoad/9885b0.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/9885b0.wgsl.expected.msl
new file mode 100644
index 0000000..9962116
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/9885b0.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_9885b0(texture2d_array<int, access::sample> tint_symbol_1) {
+  int4 res = tint_symbol_1.read(uint2(uint2(0u)), 1u, 1u);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<int, access::sample> tint_symbol_2) {
+  textureLoad_9885b0(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<int, access::sample> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<int, access::sample> tint_symbol_4 [[texture(0)]]) {
+  textureLoad_9885b0(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d_array<int, access::sample> tint_symbol_5 [[texture(0)]]) {
+  textureLoad_9885b0(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/9885b0.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/9885b0.wgsl.expected.spvasm
new file mode 100644
index 0000000..4f1bcb5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/9885b0.wgsl.expected.spvasm
@@ -0,0 +1,79 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 42
+; 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 %textureLoad_9885b0 "textureLoad_9885b0"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+      %v4int = OpTypeVector %int 4
+       %uint = OpTypeInt 32 0
+     %v3uint = OpTypeVector %uint 3
+     %uint_0 = OpConstant %uint 0
+     %uint_1 = OpConstant %uint 1
+         %24 = OpConstantComposite %v3uint %uint_0 %uint_0 %uint_1
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+         %27 = OpConstantNull %v4int
+         %28 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_9885b0 = OpFunction %void None %13
+         %16 = OpLabel
+        %res = OpVariable %_ptr_Function_v4int Function %27
+         %19 = OpLoad %11 %arg_0
+         %17 = OpImageFetch %v4int %19 %24 Lod %uint_1
+               OpStore %res %17
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %28
+         %30 = OpLabel
+         %31 = OpFunctionCall %void %textureLoad_9885b0
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %33 = OpLabel
+         %34 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %34
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %37 = OpLabel
+         %38 = OpFunctionCall %void %textureLoad_9885b0
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %textureLoad_9885b0
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/9885b0.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/9885b0.wgsl.expected.wgsl
new file mode 100644
index 0000000..0c52bf4
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/9885b0.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_2d_array<i32>;
+
+fn textureLoad_9885b0() {
+  var res : vec4<i32> = textureLoad(arg_0, vec2<u32>(), 1u, 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_9885b0();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_9885b0();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_9885b0();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/9ed19e.wgsl b/test/tint/builtins/gen/literal/textureLoad/9ed19e.wgsl
new file mode 100644
index 0000000..d14a733
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/9ed19e.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_depth_2d;
+
+// fn textureLoad(texture: texture_depth_2d, coords: vec2<u32>, level: u32) -> f32
+fn textureLoad_9ed19e() {
+  var res: f32 = textureLoad(arg_0, vec2<u32>(), 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_9ed19e();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_9ed19e();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_9ed19e();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/9ed19e.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/9ed19e.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..589c875
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/9ed19e.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+Texture2D arg_0 : register(t0, space1);
+
+void textureLoad_9ed19e() {
+  float res = arg_0.Load(uint3(0u, 0u, 1u)).x;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_9ed19e();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_9ed19e();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_9ed19e();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/9ed19e.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/9ed19e.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..589c875
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/9ed19e.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+Texture2D arg_0 : register(t0, space1);
+
+void textureLoad_9ed19e() {
+  float res = arg_0.Load(uint3(0u, 0u, 1u)).x;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_9ed19e();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_9ed19e();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_9ed19e();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/9ed19e.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/9ed19e.wgsl.expected.glsl
new file mode 100644
index 0000000..a973885
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/9ed19e.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+uniform highp sampler2D arg_0_1;
+void textureLoad_9ed19e() {
+  float res = texelFetch(arg_0_1, ivec2(uvec2(0u)), int(1u)).x;
+}
+
+vec4 vertex_main() {
+  textureLoad_9ed19e();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2D arg_0_1;
+void textureLoad_9ed19e() {
+  float res = texelFetch(arg_0_1, ivec2(uvec2(0u)), int(1u)).x;
+}
+
+void fragment_main() {
+  textureLoad_9ed19e();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp sampler2D arg_0_1;
+void textureLoad_9ed19e() {
+  float res = texelFetch(arg_0_1, ivec2(uvec2(0u)), int(1u)).x;
+}
+
+void compute_main() {
+  textureLoad_9ed19e();
+}
+
+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/textureLoad/9ed19e.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/9ed19e.wgsl.expected.msl
new file mode 100644
index 0000000..0e15d47
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/9ed19e.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_9ed19e(depth2d<float, access::sample> tint_symbol_1) {
+  float res = tint_symbol_1.read(uint2(uint2(0u)), 1u);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(depth2d<float, access::sample> tint_symbol_2) {
+  textureLoad_9ed19e(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(depth2d<float, access::sample> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(depth2d<float, access::sample> tint_symbol_4 [[texture(0)]]) {
+  textureLoad_9ed19e(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(depth2d<float, access::sample> tint_symbol_5 [[texture(0)]]) {
+  textureLoad_9ed19e(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/9ed19e.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/9ed19e.wgsl.expected.spvasm
new file mode 100644
index 0000000..c4d6e10
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/9ed19e.wgsl.expected.spvasm
@@ -0,0 +1,76 @@
+; 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 %textureLoad_9ed19e "textureLoad_9ed19e"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %12 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+         %21 = OpConstantNull %v2uint
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_float = OpTypePointer Function %float
+         %25 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_9ed19e = OpFunction %void None %12
+         %15 = OpLabel
+        %res = OpVariable %_ptr_Function_float Function %8
+         %18 = OpLoad %11 %arg_0
+         %17 = OpImageFetch %v4float %18 %21 Lod %uint_1
+         %16 = OpCompositeExtract %float %17 0
+               OpStore %res %16
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %25
+         %27 = OpLabel
+         %28 = OpFunctionCall %void %textureLoad_9ed19e
+               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 %textureLoad_9ed19e
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %12
+         %37 = OpLabel
+         %38 = OpFunctionCall %void %textureLoad_9ed19e
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/9ed19e.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/9ed19e.wgsl.expected.wgsl
new file mode 100644
index 0000000..a4f6f1f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/9ed19e.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_depth_2d;
+
+fn textureLoad_9ed19e() {
+  var res : f32 = textureLoad(arg_0, vec2<u32>(), 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_9ed19e();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_9ed19e();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_9ed19e();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/bc3201.wgsl b/test/tint/builtins/gen/literal/textureLoad/bc3201.wgsl
new file mode 100644
index 0000000..04234f9
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/bc3201.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_1d<u32>;
+
+// fn textureLoad(texture: texture_1d<u32>, coords: u32, level: u32) -> vec4<u32>
+fn textureLoad_bc3201() {
+  var res: vec4<u32> = textureLoad(arg_0, 1u, 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_bc3201();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_bc3201();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_bc3201();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/bc3201.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/bc3201.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..1da9ad5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/bc3201.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+Texture1D<uint4> arg_0 : register(t0, space1);
+
+void textureLoad_bc3201() {
+  uint4 res = arg_0.Load(uint2(1u, 1u));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_bc3201();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_bc3201();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_bc3201();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/bc3201.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/bc3201.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..1da9ad5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/bc3201.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+Texture1D<uint4> arg_0 : register(t0, space1);
+
+void textureLoad_bc3201() {
+  uint4 res = arg_0.Load(uint2(1u, 1u));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_bc3201();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_bc3201();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_bc3201();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/bc3201.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/bc3201.wgsl.expected.glsl
new file mode 100644
index 0000000..9ae41f2
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/bc3201.wgsl.expected.glsl
@@ -0,0 +1,75 @@
+SKIP: FAILED
+
+#version 310 es
+
+uniform highp usampler1D arg_0_1;
+void textureLoad_bc3201() {
+  uvec4 res = texelFetch(arg_0_1, int(1u), int(1u));
+}
+
+vec4 vertex_main() {
+  textureLoad_bc3201();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'usampler1D' : Reserved word. 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+uniform highp usampler1D arg_0_1;
+void textureLoad_bc3201() {
+  uvec4 res = texelFetch(arg_0_1, int(1u), int(1u));
+}
+
+void fragment_main() {
+  textureLoad_bc3201();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'usampler1D' : Reserved word. 
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+uniform highp usampler1D arg_0_1;
+void textureLoad_bc3201() {
+  uvec4 res = texelFetch(arg_0_1, int(1u), int(1u));
+}
+
+void compute_main() {
+  textureLoad_bc3201();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'usampler1D' : Reserved word. 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/bc3201.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/bc3201.wgsl.expected.msl
new file mode 100644
index 0000000..aaf9344
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/bc3201.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_bc3201(texture1d<uint, access::sample> tint_symbol_1) {
+  uint4 res = tint_symbol_1.read(uint(1u), 0);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<uint, access::sample> tint_symbol_2) {
+  textureLoad_bc3201(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<uint, access::sample> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<uint, access::sample> tint_symbol_4 [[texture(0)]]) {
+  textureLoad_bc3201(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture1d<uint, access::sample> tint_symbol_5 [[texture(0)]]) {
+  textureLoad_bc3201(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/bc3201.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/bc3201.wgsl.expected.spvasm
new file mode 100644
index 0000000..e156f8a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/bc3201.wgsl.expected.spvasm
@@ -0,0 +1,76 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 38
+; Schema: 0
+               OpCapability Shader
+               OpCapability Sampled1D
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureLoad_bc3201 "textureLoad_bc3201"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 1D 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+     %v4uint = OpTypeVector %uint 4
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+         %23 = OpConstantNull %v4uint
+         %24 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_bc3201 = OpFunction %void None %13
+         %16 = OpLabel
+        %res = OpVariable %_ptr_Function_v4uint Function %23
+         %19 = OpLoad %11 %arg_0
+         %17 = OpImageFetch %v4uint %19 %uint_1 Lod %uint_1
+               OpStore %res %17
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %24
+         %26 = OpLabel
+         %27 = OpFunctionCall %void %textureLoad_bc3201
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %29 = OpLabel
+         %30 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %30
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %textureLoad_bc3201
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %textureLoad_bc3201
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/bc3201.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/bc3201.wgsl.expected.wgsl
new file mode 100644
index 0000000..f4de77b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/bc3201.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_1d<u32>;
+
+fn textureLoad_bc3201() {
+  var res : vec4<u32> = textureLoad(arg_0, 1u, 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_bc3201();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_bc3201();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_bc3201();
+}
diff --git a/test/tint/builtins/gen/literal/textureSample/193203.wgsl b/test/tint/builtins/gen/literal/textureSample/193203.wgsl
new file mode 100644
index 0000000..da6cdf5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSample/193203.wgsl
@@ -0,0 +1,34 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_2d_array<f32>;
+@group(1) @binding(1) var arg_1: sampler;
+
+// fn textureSample(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: u32, @const offset: vec2<i32>) -> vec4<f32>
+fn textureSample_193203() {
+  var res: vec4<f32> = textureSample(arg_0, arg_1, vec2<f32>(), 1u, vec2<i32>());
+}
+
+@fragment
+fn fragment_main() {
+  textureSample_193203();
+}
diff --git a/test/tint/builtins/gen/literal/textureSample/193203.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSample/193203.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..187167c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSample/193203.wgsl.expected.dxc.hlsl
@@ -0,0 +1,11 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSample_193203() {
+  float4 res = arg_0.Sample(arg_1, float3(0.0f, 0.0f, float(1u)), (0).xx);
+}
+
+void fragment_main() {
+  textureSample_193203();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureSample/193203.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSample/193203.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..187167c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSample/193203.wgsl.expected.fxc.hlsl
@@ -0,0 +1,11 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSample_193203() {
+  float4 res = arg_0.Sample(arg_1, float3(0.0f, 0.0f, float(1u)), (0).xx);
+}
+
+void fragment_main() {
+  textureSample_193203();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureSample/193203.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSample/193203.wgsl.expected.glsl
new file mode 100644
index 0000000..ef540d8
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSample/193203.wgsl.expected.glsl
@@ -0,0 +1,17 @@
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2DArray arg_0_arg_1;
+
+void textureSample_193203() {
+  vec4 res = textureOffset(arg_0_arg_1, vec3(0.0f, 0.0f, float(1u)), ivec2(0));
+}
+
+void fragment_main() {
+  textureSample_193203();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureSample/193203.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSample/193203.wgsl.expected.msl
new file mode 100644
index 0000000..c558b32
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSample/193203.wgsl.expected.msl
@@ -0,0 +1,12 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureSample_193203(texture2d_array<float, access::sample> tint_symbol, sampler tint_symbol_1) {
+  float4 res = tint_symbol.sample(tint_symbol_1, float2(0.0f), 1u, int2(0));
+}
+
+fragment void fragment_main(texture2d_array<float, access::sample> tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) {
+  textureSample_193203(tint_symbol_2, tint_symbol_3);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureSample/193203.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSample/193203.wgsl.expected.spvasm
new file mode 100644
index 0000000..8804d99
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSample/193203.wgsl.expected.spvasm
@@ -0,0 +1,55 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 33
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpName %arg_0 "arg_0"
+               OpName %arg_1 "arg_1"
+               OpName %textureSample_193203 "textureSample_193203"
+               OpName %res "res"
+               OpName %fragment_main "fragment_main"
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %arg_1 DescriptorSet 1
+               OpDecorate %arg_1 Binding 1
+      %float = OpTypeFloat 32
+          %3 = OpTypeImage %float 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_3 = OpTypePointer UniformConstant %3
+      %arg_0 = OpVariable %_ptr_UniformConstant_3 UniformConstant
+          %7 = OpTypeSampler
+%_ptr_UniformConstant_7 = OpTypePointer UniformConstant %7
+      %arg_1 = OpVariable %_ptr_UniformConstant_7 UniformConstant
+       %void = OpTypeVoid
+          %8 = OpTypeFunction %void
+    %v4float = OpTypeVector %float 4
+         %16 = OpTypeSampledImage %3
+    %v3float = OpTypeVector %float 3
+    %float_0 = OpConstant %float 0
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+        %int = OpTypeInt 32 1
+      %v2int = OpTypeVector %int 2
+         %26 = OpConstantNull %v2int
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+         %29 = OpConstantNull %v4float
+%textureSample_193203 = OpFunction %void None %8
+         %11 = OpLabel
+        %res = OpVariable %_ptr_Function_v4float Function %29
+         %14 = OpLoad %7 %arg_1
+         %15 = OpLoad %3 %arg_0
+         %17 = OpSampledImage %16 %15 %14
+         %20 = OpConvertUToF %float %uint_1
+         %23 = OpCompositeConstruct %v3float %float_0 %float_0 %20
+         %12 = OpImageSampleImplicitLod %v4float %17 %23 ConstOffset %26
+               OpStore %res %12
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %8
+         %31 = OpLabel
+         %32 = OpFunctionCall %void %textureSample_193203
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureSample/193203.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSample/193203.wgsl.expected.wgsl
new file mode 100644
index 0000000..3413bbc
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSample/193203.wgsl.expected.wgsl
@@ -0,0 +1,12 @@
+@group(1) @binding(0) var arg_0 : texture_2d_array<f32>;
+
+@group(1) @binding(1) var arg_1 : sampler;
+
+fn textureSample_193203() {
+  var res : vec4<f32> = textureSample(arg_0, arg_1, vec2<f32>(), 1u, vec2<i32>());
+}
+
+@fragment
+fn fragment_main() {
+  textureSample_193203();
+}
diff --git a/test/tint/builtins/gen/literal/textureSample/1a4e1b.wgsl b/test/tint/builtins/gen/literal/textureSample/1a4e1b.wgsl
new file mode 100644
index 0000000..852f2bd
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSample/1a4e1b.wgsl
@@ -0,0 +1,34 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_depth_2d_array;
+@group(1) @binding(1) var arg_1: sampler;
+
+// fn textureSample(texture: texture_depth_2d_array, sampler: sampler, coords: vec2<f32>, array_index: u32) -> f32
+fn textureSample_1a4e1b() {
+  var res: f32 = textureSample(arg_0, arg_1, vec2<f32>(), 1u);
+}
+
+@fragment
+fn fragment_main() {
+  textureSample_1a4e1b();
+}
diff --git a/test/tint/builtins/gen/literal/textureSample/1a4e1b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSample/1a4e1b.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..4c9c23a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSample/1a4e1b.wgsl.expected.dxc.hlsl
@@ -0,0 +1,11 @@
+Texture2DArray arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSample_1a4e1b() {
+  float res = arg_0.Sample(arg_1, float3(0.0f, 0.0f, float(1u))).x;
+}
+
+void fragment_main() {
+  textureSample_1a4e1b();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureSample/1a4e1b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSample/1a4e1b.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..4c9c23a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSample/1a4e1b.wgsl.expected.fxc.hlsl
@@ -0,0 +1,11 @@
+Texture2DArray arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSample_1a4e1b() {
+  float res = arg_0.Sample(arg_1, float3(0.0f, 0.0f, float(1u))).x;
+}
+
+void fragment_main() {
+  textureSample_1a4e1b();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureSample/1a4e1b.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSample/1a4e1b.wgsl.expected.glsl
new file mode 100644
index 0000000..492bbc0
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSample/1a4e1b.wgsl.expected.glsl
@@ -0,0 +1,17 @@
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2DArrayShadow arg_0_arg_1;
+
+void textureSample_1a4e1b() {
+  float res = texture(arg_0_arg_1, vec4(0.0f, 0.0f, float(1u), 0.0f));
+}
+
+void fragment_main() {
+  textureSample_1a4e1b();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureSample/1a4e1b.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSample/1a4e1b.wgsl.expected.msl
new file mode 100644
index 0000000..efc575c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSample/1a4e1b.wgsl.expected.msl
@@ -0,0 +1,12 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureSample_1a4e1b(depth2d_array<float, access::sample> tint_symbol, sampler tint_symbol_1) {
+  float res = tint_symbol.sample(tint_symbol_1, float2(0.0f), 1u);
+}
+
+fragment void fragment_main(depth2d_array<float, access::sample> tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) {
+  textureSample_1a4e1b(tint_symbol_2, tint_symbol_3);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureSample/1a4e1b.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSample/1a4e1b.wgsl.expected.spvasm
new file mode 100644
index 0000000..2da95e8
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSample/1a4e1b.wgsl.expected.spvasm
@@ -0,0 +1,53 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 31
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpName %arg_0 "arg_0"
+               OpName %arg_1 "arg_1"
+               OpName %textureSample_1a4e1b "textureSample_1a4e1b"
+               OpName %res "res"
+               OpName %fragment_main "fragment_main"
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %arg_1 DescriptorSet 1
+               OpDecorate %arg_1 Binding 1
+      %float = OpTypeFloat 32
+          %3 = OpTypeImage %float 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_3 = OpTypePointer UniformConstant %3
+      %arg_0 = OpVariable %_ptr_UniformConstant_3 UniformConstant
+          %7 = OpTypeSampler
+%_ptr_UniformConstant_7 = OpTypePointer UniformConstant %7
+      %arg_1 = OpVariable %_ptr_UniformConstant_7 UniformConstant
+       %void = OpTypeVoid
+          %8 = OpTypeFunction %void
+    %v4float = OpTypeVector %float 4
+         %17 = OpTypeSampledImage %3
+    %v3float = OpTypeVector %float 3
+    %float_0 = OpConstant %float 0
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_float = OpTypePointer Function %float
+         %27 = OpConstantNull %float
+%textureSample_1a4e1b = OpFunction %void None %8
+         %11 = OpLabel
+        %res = OpVariable %_ptr_Function_float Function %27
+         %15 = OpLoad %7 %arg_1
+         %16 = OpLoad %3 %arg_0
+         %18 = OpSampledImage %17 %16 %15
+         %21 = OpConvertUToF %float %uint_1
+         %24 = OpCompositeConstruct %v3float %float_0 %float_0 %21
+         %13 = OpImageSampleImplicitLod %v4float %18 %24
+         %12 = OpCompositeExtract %float %13 0
+               OpStore %res %12
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %8
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %textureSample_1a4e1b
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureSample/1a4e1b.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSample/1a4e1b.wgsl.expected.wgsl
new file mode 100644
index 0000000..7bc414e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSample/1a4e1b.wgsl.expected.wgsl
@@ -0,0 +1,12 @@
+@group(1) @binding(0) var arg_0 : texture_depth_2d_array;
+
+@group(1) @binding(1) var arg_1 : sampler;
+
+fn textureSample_1a4e1b() {
+  var res : f32 = textureSample(arg_0, arg_1, vec2<f32>(), 1u);
+}
+
+@fragment
+fn fragment_main() {
+  textureSample_1a4e1b();
+}
diff --git a/test/tint/builtins/gen/literal/textureSample/4703d0.wgsl b/test/tint/builtins/gen/literal/textureSample/4703d0.wgsl
new file mode 100644
index 0000000..3e7b95d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSample/4703d0.wgsl
@@ -0,0 +1,34 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_depth_2d_array;
+@group(1) @binding(1) var arg_1: sampler;
+
+// fn textureSample(texture: texture_depth_2d_array, sampler: sampler, coords: vec2<f32>, array_index: u32, @const offset: vec2<i32>) -> f32
+fn textureSample_4703d0() {
+  var res: f32 = textureSample(arg_0, arg_1, vec2<f32>(), 1u, vec2<i32>());
+}
+
+@fragment
+fn fragment_main() {
+  textureSample_4703d0();
+}
diff --git a/test/tint/builtins/gen/literal/textureSample/4703d0.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSample/4703d0.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..6d8b7dd
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSample/4703d0.wgsl.expected.dxc.hlsl
@@ -0,0 +1,11 @@
+Texture2DArray arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSample_4703d0() {
+  float res = arg_0.Sample(arg_1, float3(0.0f, 0.0f, float(1u)), (0).xx).x;
+}
+
+void fragment_main() {
+  textureSample_4703d0();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureSample/4703d0.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSample/4703d0.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..6d8b7dd
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSample/4703d0.wgsl.expected.fxc.hlsl
@@ -0,0 +1,11 @@
+Texture2DArray arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSample_4703d0() {
+  float res = arg_0.Sample(arg_1, float3(0.0f, 0.0f, float(1u)), (0).xx).x;
+}
+
+void fragment_main() {
+  textureSample_4703d0();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureSample/4703d0.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSample/4703d0.wgsl.expected.glsl
new file mode 100644
index 0000000..221c6b6
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSample/4703d0.wgsl.expected.glsl
@@ -0,0 +1,26 @@
+SKIP: FAILED
+
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2DArrayShadow arg_0_arg_1;
+
+void textureSample_4703d0() {
+  float res = textureOffset(arg_0_arg_1, vec4(0.0f, 0.0f, float(1u), 0.0f), ivec2(0));
+}
+
+void fragment_main() {
+  textureSample_4703d0();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:7: 'sampler' : TextureOffset does not support sampler2DArrayShadow :  ES Profile
+ERROR: 0:7: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureSample/4703d0.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSample/4703d0.wgsl.expected.msl
new file mode 100644
index 0000000..e412a9c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSample/4703d0.wgsl.expected.msl
@@ -0,0 +1,12 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureSample_4703d0(depth2d_array<float, access::sample> tint_symbol, sampler tint_symbol_1) {
+  float res = tint_symbol.sample(tint_symbol_1, float2(0.0f), 1u, int2(0));
+}
+
+fragment void fragment_main(depth2d_array<float, access::sample> tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) {
+  textureSample_4703d0(tint_symbol_2, tint_symbol_3);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureSample/4703d0.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSample/4703d0.wgsl.expected.spvasm
new file mode 100644
index 0000000..178481b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSample/4703d0.wgsl.expected.spvasm
@@ -0,0 +1,56 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 34
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpName %arg_0 "arg_0"
+               OpName %arg_1 "arg_1"
+               OpName %textureSample_4703d0 "textureSample_4703d0"
+               OpName %res "res"
+               OpName %fragment_main "fragment_main"
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %arg_1 DescriptorSet 1
+               OpDecorate %arg_1 Binding 1
+      %float = OpTypeFloat 32
+          %3 = OpTypeImage %float 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_3 = OpTypePointer UniformConstant %3
+      %arg_0 = OpVariable %_ptr_UniformConstant_3 UniformConstant
+          %7 = OpTypeSampler
+%_ptr_UniformConstant_7 = OpTypePointer UniformConstant %7
+      %arg_1 = OpVariable %_ptr_UniformConstant_7 UniformConstant
+       %void = OpTypeVoid
+          %8 = OpTypeFunction %void
+    %v4float = OpTypeVector %float 4
+         %17 = OpTypeSampledImage %3
+    %v3float = OpTypeVector %float 3
+    %float_0 = OpConstant %float 0
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+        %int = OpTypeInt 32 1
+      %v2int = OpTypeVector %int 2
+         %27 = OpConstantNull %v2int
+%_ptr_Function_float = OpTypePointer Function %float
+         %30 = OpConstantNull %float
+%textureSample_4703d0 = OpFunction %void None %8
+         %11 = OpLabel
+        %res = OpVariable %_ptr_Function_float Function %30
+         %15 = OpLoad %7 %arg_1
+         %16 = OpLoad %3 %arg_0
+         %18 = OpSampledImage %17 %16 %15
+         %21 = OpConvertUToF %float %uint_1
+         %24 = OpCompositeConstruct %v3float %float_0 %float_0 %21
+         %13 = OpImageSampleImplicitLod %v4float %18 %24 ConstOffset %27
+         %12 = OpCompositeExtract %float %13 0
+               OpStore %res %12
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %8
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %textureSample_4703d0
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureSample/4703d0.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSample/4703d0.wgsl.expected.wgsl
new file mode 100644
index 0000000..0ee6598
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSample/4703d0.wgsl.expected.wgsl
@@ -0,0 +1,12 @@
+@group(1) @binding(0) var arg_0 : texture_depth_2d_array;
+
+@group(1) @binding(1) var arg_1 : sampler;
+
+fn textureSample_4703d0() {
+  var res : f32 = textureSample(arg_0, arg_1, vec2<f32>(), 1u, vec2<i32>());
+}
+
+@fragment
+fn fragment_main() {
+  textureSample_4703d0();
+}
diff --git a/test/tint/builtins/gen/literal/textureSample/7fd8cb.wgsl b/test/tint/builtins/gen/literal/textureSample/7fd8cb.wgsl
new file mode 100644
index 0000000..f9375b6
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSample/7fd8cb.wgsl
@@ -0,0 +1,34 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_depth_cube_array;
+@group(1) @binding(1) var arg_1: sampler;
+
+// fn textureSample(texture: texture_depth_cube_array, sampler: sampler, coords: vec3<f32>, array_index: u32) -> f32
+fn textureSample_7fd8cb() {
+  var res: f32 = textureSample(arg_0, arg_1, vec3<f32>(), 1u);
+}
+
+@fragment
+fn fragment_main() {
+  textureSample_7fd8cb();
+}
diff --git a/test/tint/builtins/gen/literal/textureSample/7fd8cb.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSample/7fd8cb.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..b5845ec
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSample/7fd8cb.wgsl.expected.dxc.hlsl
@@ -0,0 +1,11 @@
+TextureCubeArray arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSample_7fd8cb() {
+  float res = arg_0.Sample(arg_1, float4(0.0f, 0.0f, 0.0f, float(1u))).x;
+}
+
+void fragment_main() {
+  textureSample_7fd8cb();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureSample/7fd8cb.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSample/7fd8cb.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..b5845ec
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSample/7fd8cb.wgsl.expected.fxc.hlsl
@@ -0,0 +1,11 @@
+TextureCubeArray arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSample_7fd8cb() {
+  float res = arg_0.Sample(arg_1, float4(0.0f, 0.0f, 0.0f, float(1u))).x;
+}
+
+void fragment_main() {
+  textureSample_7fd8cb();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureSample/7fd8cb.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSample/7fd8cb.wgsl.expected.glsl
new file mode 100644
index 0000000..4871559
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSample/7fd8cb.wgsl.expected.glsl
@@ -0,0 +1,26 @@
+SKIP: FAILED
+
+#version 310 es
+precision mediump float;
+
+uniform highp samplerCubeArrayShadow arg_0_arg_1;
+
+void textureSample_7fd8cb() {
+  float res = texture(arg_0_arg_1, vec4(0.0f, 0.0f, 0.0f, float(1u)), 0.0f);
+}
+
+void fragment_main() {
+  textureSample_7fd8cb();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'samplerCubeArrayShadow' : Reserved word. 
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureSample/7fd8cb.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSample/7fd8cb.wgsl.expected.msl
new file mode 100644
index 0000000..d3e7dae
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSample/7fd8cb.wgsl.expected.msl
@@ -0,0 +1,12 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureSample_7fd8cb(depthcube_array<float, access::sample> tint_symbol, sampler tint_symbol_1) {
+  float res = tint_symbol.sample(tint_symbol_1, float3(0.0f), 1u);
+}
+
+fragment void fragment_main(depthcube_array<float, access::sample> tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) {
+  textureSample_7fd8cb(tint_symbol_2, tint_symbol_3);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureSample/7fd8cb.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSample/7fd8cb.wgsl.expected.spvasm
new file mode 100644
index 0000000..bf1bc8b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSample/7fd8cb.wgsl.expected.spvasm
@@ -0,0 +1,53 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 30
+; Schema: 0
+               OpCapability Shader
+               OpCapability SampledCubeArray
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpName %arg_0 "arg_0"
+               OpName %arg_1 "arg_1"
+               OpName %textureSample_7fd8cb "textureSample_7fd8cb"
+               OpName %res "res"
+               OpName %fragment_main "fragment_main"
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %arg_1 DescriptorSet 1
+               OpDecorate %arg_1 Binding 1
+      %float = OpTypeFloat 32
+          %3 = OpTypeImage %float Cube 0 1 0 1 Unknown
+%_ptr_UniformConstant_3 = OpTypePointer UniformConstant %3
+      %arg_0 = OpVariable %_ptr_UniformConstant_3 UniformConstant
+          %7 = OpTypeSampler
+%_ptr_UniformConstant_7 = OpTypePointer UniformConstant %7
+      %arg_1 = OpVariable %_ptr_UniformConstant_7 UniformConstant
+       %void = OpTypeVoid
+          %8 = OpTypeFunction %void
+    %v4float = OpTypeVector %float 4
+         %17 = OpTypeSampledImage %3
+    %float_0 = OpConstant %float 0
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_float = OpTypePointer Function %float
+         %26 = OpConstantNull %float
+%textureSample_7fd8cb = OpFunction %void None %8
+         %11 = OpLabel
+        %res = OpVariable %_ptr_Function_float Function %26
+         %15 = OpLoad %7 %arg_1
+         %16 = OpLoad %3 %arg_0
+         %18 = OpSampledImage %17 %16 %15
+         %20 = OpConvertUToF %float %uint_1
+         %23 = OpCompositeConstruct %v4float %float_0 %float_0 %float_0 %20
+         %13 = OpImageSampleImplicitLod %v4float %18 %23
+         %12 = OpCompositeExtract %float %13 0
+               OpStore %res %12
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %8
+         %28 = OpLabel
+         %29 = OpFunctionCall %void %textureSample_7fd8cb
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureSample/7fd8cb.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSample/7fd8cb.wgsl.expected.wgsl
new file mode 100644
index 0000000..113fb82
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSample/7fd8cb.wgsl.expected.wgsl
@@ -0,0 +1,12 @@
+@group(1) @binding(0) var arg_0 : texture_depth_cube_array;
+
+@group(1) @binding(1) var arg_1 : sampler;
+
+fn textureSample_7fd8cb() {
+  var res : f32 = textureSample(arg_0, arg_1, vec3<f32>(), 1u);
+}
+
+@fragment
+fn fragment_main() {
+  textureSample_7fd8cb();
+}
diff --git a/test/tint/builtins/gen/literal/textureSample/bc7477.wgsl b/test/tint/builtins/gen/literal/textureSample/bc7477.wgsl
new file mode 100644
index 0000000..b1003d5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSample/bc7477.wgsl
@@ -0,0 +1,34 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_cube_array<f32>;
+@group(1) @binding(1) var arg_1: sampler;
+
+// fn textureSample(texture: texture_cube_array<f32>, sampler: sampler, coords: vec3<f32>, array_index: u32) -> vec4<f32>
+fn textureSample_bc7477() {
+  var res: vec4<f32> = textureSample(arg_0, arg_1, vec3<f32>(), 1u);
+}
+
+@fragment
+fn fragment_main() {
+  textureSample_bc7477();
+}
diff --git a/test/tint/builtins/gen/literal/textureSample/bc7477.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSample/bc7477.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..9a8aa64
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSample/bc7477.wgsl.expected.dxc.hlsl
@@ -0,0 +1,11 @@
+TextureCubeArray<float4> arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSample_bc7477() {
+  float4 res = arg_0.Sample(arg_1, float4(0.0f, 0.0f, 0.0f, float(1u)));
+}
+
+void fragment_main() {
+  textureSample_bc7477();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureSample/bc7477.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSample/bc7477.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..9a8aa64
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSample/bc7477.wgsl.expected.fxc.hlsl
@@ -0,0 +1,11 @@
+TextureCubeArray<float4> arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSample_bc7477() {
+  float4 res = arg_0.Sample(arg_1, float4(0.0f, 0.0f, 0.0f, float(1u)));
+}
+
+void fragment_main() {
+  textureSample_bc7477();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureSample/bc7477.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSample/bc7477.wgsl.expected.glsl
new file mode 100644
index 0000000..9007344
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSample/bc7477.wgsl.expected.glsl
@@ -0,0 +1,26 @@
+SKIP: FAILED
+
+#version 310 es
+precision mediump float;
+
+uniform highp samplerCubeArray arg_0_arg_1;
+
+void textureSample_bc7477() {
+  vec4 res = texture(arg_0_arg_1, vec4(0.0f, 0.0f, 0.0f, float(1u)));
+}
+
+void fragment_main() {
+  textureSample_bc7477();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'samplerCubeArray' : Reserved word. 
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureSample/bc7477.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSample/bc7477.wgsl.expected.msl
new file mode 100644
index 0000000..e106ef0
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSample/bc7477.wgsl.expected.msl
@@ -0,0 +1,12 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureSample_bc7477(texturecube_array<float, access::sample> tint_symbol, sampler tint_symbol_1) {
+  float4 res = tint_symbol.sample(tint_symbol_1, float3(0.0f), 1u);
+}
+
+fragment void fragment_main(texturecube_array<float, access::sample> tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) {
+  textureSample_bc7477(tint_symbol_2, tint_symbol_3);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureSample/bc7477.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSample/bc7477.wgsl.expected.spvasm
new file mode 100644
index 0000000..5c437e0
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSample/bc7477.wgsl.expected.spvasm
@@ -0,0 +1,52 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 29
+; Schema: 0
+               OpCapability Shader
+               OpCapability SampledCubeArray
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpName %arg_0 "arg_0"
+               OpName %arg_1 "arg_1"
+               OpName %textureSample_bc7477 "textureSample_bc7477"
+               OpName %res "res"
+               OpName %fragment_main "fragment_main"
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %arg_1 DescriptorSet 1
+               OpDecorate %arg_1 Binding 1
+      %float = OpTypeFloat 32
+          %3 = OpTypeImage %float Cube 0 1 0 1 Unknown
+%_ptr_UniformConstant_3 = OpTypePointer UniformConstant %3
+      %arg_0 = OpVariable %_ptr_UniformConstant_3 UniformConstant
+          %7 = OpTypeSampler
+%_ptr_UniformConstant_7 = OpTypePointer UniformConstant %7
+      %arg_1 = OpVariable %_ptr_UniformConstant_7 UniformConstant
+       %void = OpTypeVoid
+          %8 = OpTypeFunction %void
+    %v4float = OpTypeVector %float 4
+         %16 = OpTypeSampledImage %3
+    %float_0 = OpConstant %float 0
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+         %25 = OpConstantNull %v4float
+%textureSample_bc7477 = OpFunction %void None %8
+         %11 = OpLabel
+        %res = OpVariable %_ptr_Function_v4float Function %25
+         %14 = OpLoad %7 %arg_1
+         %15 = OpLoad %3 %arg_0
+         %17 = OpSampledImage %16 %15 %14
+         %19 = OpConvertUToF %float %uint_1
+         %22 = OpCompositeConstruct %v4float %float_0 %float_0 %float_0 %19
+         %12 = OpImageSampleImplicitLod %v4float %17 %22
+               OpStore %res %12
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %8
+         %27 = OpLabel
+         %28 = OpFunctionCall %void %textureSample_bc7477
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureSample/bc7477.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSample/bc7477.wgsl.expected.wgsl
new file mode 100644
index 0000000..ed1eaf5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSample/bc7477.wgsl.expected.wgsl
@@ -0,0 +1,12 @@
+@group(1) @binding(0) var arg_0 : texture_cube_array<f32>;
+
+@group(1) @binding(1) var arg_1 : sampler;
+
+fn textureSample_bc7477() {
+  var res : vec4<f32> = textureSample(arg_0, arg_1, vec3<f32>(), 1u);
+}
+
+@fragment
+fn fragment_main() {
+  textureSample_bc7477();
+}
diff --git a/test/tint/builtins/gen/literal/textureSample/d6b281.wgsl b/test/tint/builtins/gen/literal/textureSample/d6b281.wgsl
new file mode 100644
index 0000000..a73972e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSample/d6b281.wgsl
@@ -0,0 +1,34 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_2d_array<f32>;
+@group(1) @binding(1) var arg_1: sampler;
+
+// fn textureSample(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: u32) -> vec4<f32>
+fn textureSample_d6b281() {
+  var res: vec4<f32> = textureSample(arg_0, arg_1, vec2<f32>(), 1u);
+}
+
+@fragment
+fn fragment_main() {
+  textureSample_d6b281();
+}
diff --git a/test/tint/builtins/gen/literal/textureSample/d6b281.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSample/d6b281.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..aea0117
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSample/d6b281.wgsl.expected.dxc.hlsl
@@ -0,0 +1,11 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSample_d6b281() {
+  float4 res = arg_0.Sample(arg_1, float3(0.0f, 0.0f, float(1u)));
+}
+
+void fragment_main() {
+  textureSample_d6b281();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureSample/d6b281.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSample/d6b281.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..aea0117
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSample/d6b281.wgsl.expected.fxc.hlsl
@@ -0,0 +1,11 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSample_d6b281() {
+  float4 res = arg_0.Sample(arg_1, float3(0.0f, 0.0f, float(1u)));
+}
+
+void fragment_main() {
+  textureSample_d6b281();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureSample/d6b281.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSample/d6b281.wgsl.expected.glsl
new file mode 100644
index 0000000..b375b29
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSample/d6b281.wgsl.expected.glsl
@@ -0,0 +1,17 @@
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2DArray arg_0_arg_1;
+
+void textureSample_d6b281() {
+  vec4 res = texture(arg_0_arg_1, vec3(0.0f, 0.0f, float(1u)));
+}
+
+void fragment_main() {
+  textureSample_d6b281();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureSample/d6b281.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSample/d6b281.wgsl.expected.msl
new file mode 100644
index 0000000..0819cfe
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSample/d6b281.wgsl.expected.msl
@@ -0,0 +1,12 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureSample_d6b281(texture2d_array<float, access::sample> tint_symbol, sampler tint_symbol_1) {
+  float4 res = tint_symbol.sample(tint_symbol_1, float2(0.0f), 1u);
+}
+
+fragment void fragment_main(texture2d_array<float, access::sample> tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) {
+  textureSample_d6b281(tint_symbol_2, tint_symbol_3);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureSample/d6b281.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSample/d6b281.wgsl.expected.spvasm
new file mode 100644
index 0000000..f8028706
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSample/d6b281.wgsl.expected.spvasm
@@ -0,0 +1,52 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 30
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpName %arg_0 "arg_0"
+               OpName %arg_1 "arg_1"
+               OpName %textureSample_d6b281 "textureSample_d6b281"
+               OpName %res "res"
+               OpName %fragment_main "fragment_main"
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %arg_1 DescriptorSet 1
+               OpDecorate %arg_1 Binding 1
+      %float = OpTypeFloat 32
+          %3 = OpTypeImage %float 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_3 = OpTypePointer UniformConstant %3
+      %arg_0 = OpVariable %_ptr_UniformConstant_3 UniformConstant
+          %7 = OpTypeSampler
+%_ptr_UniformConstant_7 = OpTypePointer UniformConstant %7
+      %arg_1 = OpVariable %_ptr_UniformConstant_7 UniformConstant
+       %void = OpTypeVoid
+          %8 = OpTypeFunction %void
+    %v4float = OpTypeVector %float 4
+         %16 = OpTypeSampledImage %3
+    %v3float = OpTypeVector %float 3
+    %float_0 = OpConstant %float 0
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+         %26 = OpConstantNull %v4float
+%textureSample_d6b281 = OpFunction %void None %8
+         %11 = OpLabel
+        %res = OpVariable %_ptr_Function_v4float Function %26
+         %14 = OpLoad %7 %arg_1
+         %15 = OpLoad %3 %arg_0
+         %17 = OpSampledImage %16 %15 %14
+         %20 = OpConvertUToF %float %uint_1
+         %23 = OpCompositeConstruct %v3float %float_0 %float_0 %20
+         %12 = OpImageSampleImplicitLod %v4float %17 %23
+               OpStore %res %12
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %8
+         %28 = OpLabel
+         %29 = OpFunctionCall %void %textureSample_d6b281
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureSample/d6b281.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSample/d6b281.wgsl.expected.wgsl
new file mode 100644
index 0000000..63495a9
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSample/d6b281.wgsl.expected.wgsl
@@ -0,0 +1,12 @@
+@group(1) @binding(0) var arg_0 : texture_2d_array<f32>;
+
+@group(1) @binding(1) var arg_1 : sampler;
+
+fn textureSample_d6b281() {
+  var res : vec4<f32> = textureSample(arg_0, arg_1, vec2<f32>(), 1u);
+}
+
+@fragment
+fn fragment_main() {
+  textureSample_d6b281();
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleBias/1c707e.wgsl b/test/tint/builtins/gen/literal/textureSampleBias/1c707e.wgsl
new file mode 100644
index 0000000..f76a6b2
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleBias/1c707e.wgsl
@@ -0,0 +1,34 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_2d_array<f32>;
+@group(1) @binding(1) var arg_1: sampler;
+
+// fn textureSampleBias(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: u32, bias: f32) -> vec4<f32>
+fn textureSampleBias_1c707e() {
+  var res: vec4<f32> = textureSampleBias(arg_0, arg_1, vec2<f32>(), 1u, 1.f);
+}
+
+@fragment
+fn fragment_main() {
+  textureSampleBias_1c707e();
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleBias/1c707e.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleBias/1c707e.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..f0c0f28
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleBias/1c707e.wgsl.expected.dxc.hlsl
@@ -0,0 +1,11 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSampleBias_1c707e() {
+  float4 res = arg_0.SampleBias(arg_1, float3(0.0f, 0.0f, float(1u)), 1.0f);
+}
+
+void fragment_main() {
+  textureSampleBias_1c707e();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleBias/1c707e.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleBias/1c707e.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..f0c0f28
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleBias/1c707e.wgsl.expected.fxc.hlsl
@@ -0,0 +1,11 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSampleBias_1c707e() {
+  float4 res = arg_0.SampleBias(arg_1, float3(0.0f, 0.0f, float(1u)), 1.0f);
+}
+
+void fragment_main() {
+  textureSampleBias_1c707e();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleBias/1c707e.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSampleBias/1c707e.wgsl.expected.glsl
new file mode 100644
index 0000000..6463438
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleBias/1c707e.wgsl.expected.glsl
@@ -0,0 +1,17 @@
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2DArray arg_0_arg_1;
+
+void textureSampleBias_1c707e() {
+  vec4 res = texture(arg_0_arg_1, vec3(0.0f, 0.0f, float(1u)), 1.0f);
+}
+
+void fragment_main() {
+  textureSampleBias_1c707e();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleBias/1c707e.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleBias/1c707e.wgsl.expected.msl
new file mode 100644
index 0000000..606c7f3
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleBias/1c707e.wgsl.expected.msl
@@ -0,0 +1,12 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureSampleBias_1c707e(texture2d_array<float, access::sample> tint_symbol, sampler tint_symbol_1) {
+  float4 res = tint_symbol.sample(tint_symbol_1, float2(0.0f), 1u, bias(1.0f));
+}
+
+fragment void fragment_main(texture2d_array<float, access::sample> tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) {
+  textureSampleBias_1c707e(tint_symbol_2, tint_symbol_3);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureSampleBias/1c707e.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleBias/1c707e.wgsl.expected.spvasm
new file mode 100644
index 0000000..c809e51
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleBias/1c707e.wgsl.expected.spvasm
@@ -0,0 +1,53 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 31
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpName %arg_0 "arg_0"
+               OpName %arg_1 "arg_1"
+               OpName %textureSampleBias_1c707e "textureSampleBias_1c707e"
+               OpName %res "res"
+               OpName %fragment_main "fragment_main"
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %arg_1 DescriptorSet 1
+               OpDecorate %arg_1 Binding 1
+      %float = OpTypeFloat 32
+          %3 = OpTypeImage %float 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_3 = OpTypePointer UniformConstant %3
+      %arg_0 = OpVariable %_ptr_UniformConstant_3 UniformConstant
+          %7 = OpTypeSampler
+%_ptr_UniformConstant_7 = OpTypePointer UniformConstant %7
+      %arg_1 = OpVariable %_ptr_UniformConstant_7 UniformConstant
+       %void = OpTypeVoid
+          %8 = OpTypeFunction %void
+    %v4float = OpTypeVector %float 4
+         %16 = OpTypeSampledImage %3
+    %v3float = OpTypeVector %float 3
+    %float_0 = OpConstant %float 0
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+    %float_1 = OpConstant %float 1
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+         %27 = OpConstantNull %v4float
+%textureSampleBias_1c707e = OpFunction %void None %8
+         %11 = OpLabel
+        %res = OpVariable %_ptr_Function_v4float Function %27
+         %14 = OpLoad %7 %arg_1
+         %15 = OpLoad %3 %arg_0
+         %17 = OpSampledImage %16 %15 %14
+         %20 = OpConvertUToF %float %uint_1
+         %23 = OpCompositeConstruct %v3float %float_0 %float_0 %20
+         %12 = OpImageSampleImplicitLod %v4float %17 %23 Bias %float_1
+               OpStore %res %12
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %8
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %textureSampleBias_1c707e
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureSampleBias/1c707e.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleBias/1c707e.wgsl.expected.wgsl
new file mode 100644
index 0000000..a738d9c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleBias/1c707e.wgsl.expected.wgsl
@@ -0,0 +1,12 @@
+@group(1) @binding(0) var arg_0 : texture_2d_array<f32>;
+
+@group(1) @binding(1) var arg_1 : sampler;
+
+fn textureSampleBias_1c707e() {
+  var res : vec4<f32> = textureSampleBias(arg_0, arg_1, vec2<f32>(), 1u, 1.0f);
+}
+
+@fragment
+fn fragment_main() {
+  textureSampleBias_1c707e();
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleBias/87915c.wgsl b/test/tint/builtins/gen/literal/textureSampleBias/87915c.wgsl
new file mode 100644
index 0000000..dc6ef1e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleBias/87915c.wgsl
@@ -0,0 +1,34 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_2d_array<f32>;
+@group(1) @binding(1) var arg_1: sampler;
+
+// fn textureSampleBias(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: u32, bias: f32, @const offset: vec2<i32>) -> vec4<f32>
+fn textureSampleBias_87915c() {
+  var res: vec4<f32> = textureSampleBias(arg_0, arg_1, vec2<f32>(), 1u, 1.f, vec2<i32>());
+}
+
+@fragment
+fn fragment_main() {
+  textureSampleBias_87915c();
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleBias/87915c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleBias/87915c.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..d6e02c4
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleBias/87915c.wgsl.expected.dxc.hlsl
@@ -0,0 +1,11 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSampleBias_87915c() {
+  float4 res = arg_0.SampleBias(arg_1, float3(0.0f, 0.0f, float(1u)), 1.0f, (0).xx);
+}
+
+void fragment_main() {
+  textureSampleBias_87915c();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleBias/87915c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleBias/87915c.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..d6e02c4
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleBias/87915c.wgsl.expected.fxc.hlsl
@@ -0,0 +1,11 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSampleBias_87915c() {
+  float4 res = arg_0.SampleBias(arg_1, float3(0.0f, 0.0f, float(1u)), 1.0f, (0).xx);
+}
+
+void fragment_main() {
+  textureSampleBias_87915c();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleBias/87915c.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSampleBias/87915c.wgsl.expected.glsl
new file mode 100644
index 0000000..27f3db1
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleBias/87915c.wgsl.expected.glsl
@@ -0,0 +1,17 @@
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2DArray arg_0_arg_1;
+
+void textureSampleBias_87915c() {
+  vec4 res = textureOffset(arg_0_arg_1, vec3(0.0f, 0.0f, float(1u)), ivec2(0), 1.0f);
+}
+
+void fragment_main() {
+  textureSampleBias_87915c();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleBias/87915c.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleBias/87915c.wgsl.expected.msl
new file mode 100644
index 0000000..0d11b74
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleBias/87915c.wgsl.expected.msl
@@ -0,0 +1,12 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureSampleBias_87915c(texture2d_array<float, access::sample> tint_symbol, sampler tint_symbol_1) {
+  float4 res = tint_symbol.sample(tint_symbol_1, float2(0.0f), 1u, bias(1.0f), int2(0));
+}
+
+fragment void fragment_main(texture2d_array<float, access::sample> tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) {
+  textureSampleBias_87915c(tint_symbol_2, tint_symbol_3);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureSampleBias/87915c.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleBias/87915c.wgsl.expected.spvasm
new file mode 100644
index 0000000..fc3f131
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleBias/87915c.wgsl.expected.spvasm
@@ -0,0 +1,56 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 34
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpName %arg_0 "arg_0"
+               OpName %arg_1 "arg_1"
+               OpName %textureSampleBias_87915c "textureSampleBias_87915c"
+               OpName %res "res"
+               OpName %fragment_main "fragment_main"
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %arg_1 DescriptorSet 1
+               OpDecorate %arg_1 Binding 1
+      %float = OpTypeFloat 32
+          %3 = OpTypeImage %float 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_3 = OpTypePointer UniformConstant %3
+      %arg_0 = OpVariable %_ptr_UniformConstant_3 UniformConstant
+          %7 = OpTypeSampler
+%_ptr_UniformConstant_7 = OpTypePointer UniformConstant %7
+      %arg_1 = OpVariable %_ptr_UniformConstant_7 UniformConstant
+       %void = OpTypeVoid
+          %8 = OpTypeFunction %void
+    %v4float = OpTypeVector %float 4
+         %16 = OpTypeSampledImage %3
+    %v3float = OpTypeVector %float 3
+    %float_0 = OpConstant %float 0
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+    %float_1 = OpConstant %float 1
+        %int = OpTypeInt 32 1
+      %v2int = OpTypeVector %int 2
+         %27 = OpConstantNull %v2int
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+         %30 = OpConstantNull %v4float
+%textureSampleBias_87915c = OpFunction %void None %8
+         %11 = OpLabel
+        %res = OpVariable %_ptr_Function_v4float Function %30
+         %14 = OpLoad %7 %arg_1
+         %15 = OpLoad %3 %arg_0
+         %17 = OpSampledImage %16 %15 %14
+         %20 = OpConvertUToF %float %uint_1
+         %23 = OpCompositeConstruct %v3float %float_0 %float_0 %20
+         %12 = OpImageSampleImplicitLod %v4float %17 %23 Bias|ConstOffset %float_1 %27
+               OpStore %res %12
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %8
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %textureSampleBias_87915c
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureSampleBias/87915c.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleBias/87915c.wgsl.expected.wgsl
new file mode 100644
index 0000000..ff707a3
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleBias/87915c.wgsl.expected.wgsl
@@ -0,0 +1,12 @@
+@group(1) @binding(0) var arg_0 : texture_2d_array<f32>;
+
+@group(1) @binding(1) var arg_1 : sampler;
+
+fn textureSampleBias_87915c() {
+  var res : vec4<f32> = textureSampleBias(arg_0, arg_1, vec2<f32>(), 1u, 1.0f, vec2<i32>());
+}
+
+@fragment
+fn fragment_main() {
+  textureSampleBias_87915c();
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleBias/c6953d.wgsl b/test/tint/builtins/gen/literal/textureSampleBias/c6953d.wgsl
new file mode 100644
index 0000000..2104892
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleBias/c6953d.wgsl
@@ -0,0 +1,34 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_cube_array<f32>;
+@group(1) @binding(1) var arg_1: sampler;
+
+// fn textureSampleBias(texture: texture_cube_array<f32>, sampler: sampler, coords: vec3<f32>, array_index: u32, bias: f32) -> vec4<f32>
+fn textureSampleBias_c6953d() {
+  var res: vec4<f32> = textureSampleBias(arg_0, arg_1, vec3<f32>(), 1u, 1.f);
+}
+
+@fragment
+fn fragment_main() {
+  textureSampleBias_c6953d();
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleBias/c6953d.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleBias/c6953d.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..ed2fe60
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleBias/c6953d.wgsl.expected.dxc.hlsl
@@ -0,0 +1,11 @@
+TextureCubeArray<float4> arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSampleBias_c6953d() {
+  float4 res = arg_0.SampleBias(arg_1, float4(0.0f, 0.0f, 0.0f, float(1u)), 1.0f);
+}
+
+void fragment_main() {
+  textureSampleBias_c6953d();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleBias/c6953d.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleBias/c6953d.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..ed2fe60
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleBias/c6953d.wgsl.expected.fxc.hlsl
@@ -0,0 +1,11 @@
+TextureCubeArray<float4> arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSampleBias_c6953d() {
+  float4 res = arg_0.SampleBias(arg_1, float4(0.0f, 0.0f, 0.0f, float(1u)), 1.0f);
+}
+
+void fragment_main() {
+  textureSampleBias_c6953d();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleBias/c6953d.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSampleBias/c6953d.wgsl.expected.glsl
new file mode 100644
index 0000000..3338dd1
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleBias/c6953d.wgsl.expected.glsl
@@ -0,0 +1,26 @@
+SKIP: FAILED
+
+#version 310 es
+precision mediump float;
+
+uniform highp samplerCubeArray arg_0_arg_1;
+
+void textureSampleBias_c6953d() {
+  vec4 res = texture(arg_0_arg_1, vec4(0.0f, 0.0f, 0.0f, float(1u)), 1.0f);
+}
+
+void fragment_main() {
+  textureSampleBias_c6953d();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'samplerCubeArray' : Reserved word. 
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureSampleBias/c6953d.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleBias/c6953d.wgsl.expected.msl
new file mode 100644
index 0000000..a116ed6
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleBias/c6953d.wgsl.expected.msl
@@ -0,0 +1,12 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureSampleBias_c6953d(texturecube_array<float, access::sample> tint_symbol, sampler tint_symbol_1) {
+  float4 res = tint_symbol.sample(tint_symbol_1, float3(0.0f), 1u, bias(1.0f));
+}
+
+fragment void fragment_main(texturecube_array<float, access::sample> tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) {
+  textureSampleBias_c6953d(tint_symbol_2, tint_symbol_3);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureSampleBias/c6953d.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleBias/c6953d.wgsl.expected.spvasm
new file mode 100644
index 0000000..9e266d7
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleBias/c6953d.wgsl.expected.spvasm
@@ -0,0 +1,53 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 30
+; Schema: 0
+               OpCapability Shader
+               OpCapability SampledCubeArray
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpName %arg_0 "arg_0"
+               OpName %arg_1 "arg_1"
+               OpName %textureSampleBias_c6953d "textureSampleBias_c6953d"
+               OpName %res "res"
+               OpName %fragment_main "fragment_main"
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %arg_1 DescriptorSet 1
+               OpDecorate %arg_1 Binding 1
+      %float = OpTypeFloat 32
+          %3 = OpTypeImage %float Cube 0 1 0 1 Unknown
+%_ptr_UniformConstant_3 = OpTypePointer UniformConstant %3
+      %arg_0 = OpVariable %_ptr_UniformConstant_3 UniformConstant
+          %7 = OpTypeSampler
+%_ptr_UniformConstant_7 = OpTypePointer UniformConstant %7
+      %arg_1 = OpVariable %_ptr_UniformConstant_7 UniformConstant
+       %void = OpTypeVoid
+          %8 = OpTypeFunction %void
+    %v4float = OpTypeVector %float 4
+         %16 = OpTypeSampledImage %3
+    %float_0 = OpConstant %float 0
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+    %float_1 = OpConstant %float 1
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+         %26 = OpConstantNull %v4float
+%textureSampleBias_c6953d = OpFunction %void None %8
+         %11 = OpLabel
+        %res = OpVariable %_ptr_Function_v4float Function %26
+         %14 = OpLoad %7 %arg_1
+         %15 = OpLoad %3 %arg_0
+         %17 = OpSampledImage %16 %15 %14
+         %19 = OpConvertUToF %float %uint_1
+         %22 = OpCompositeConstruct %v4float %float_0 %float_0 %float_0 %19
+         %12 = OpImageSampleImplicitLod %v4float %17 %22 Bias %float_1
+               OpStore %res %12
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %8
+         %28 = OpLabel
+         %29 = OpFunctionCall %void %textureSampleBias_c6953d
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureSampleBias/c6953d.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleBias/c6953d.wgsl.expected.wgsl
new file mode 100644
index 0000000..3309656
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleBias/c6953d.wgsl.expected.wgsl
@@ -0,0 +1,12 @@
+@group(1) @binding(0) var arg_0 : texture_cube_array<f32>;
+
+@group(1) @binding(1) var arg_1 : sampler;
+
+fn textureSampleBias_c6953d() {
+  var res : vec4<f32> = textureSampleBias(arg_0, arg_1, vec3<f32>(), 1u, 1.0f);
+}
+
+@fragment
+fn fragment_main() {
+  textureSampleBias_c6953d();
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/1912e5.wgsl b/test/tint/builtins/gen/literal/textureSampleCompare/1912e5.wgsl
new file mode 100644
index 0000000..5bf28c5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleCompare/1912e5.wgsl
@@ -0,0 +1,34 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_depth_cube_array;
+@group(1) @binding(1) var arg_1: sampler_comparison;
+
+// fn textureSampleCompare(texture: texture_depth_cube_array, sampler: sampler_comparison, coords: vec3<f32>, array_index: u32, depth_ref: f32) -> f32
+fn textureSampleCompare_1912e5() {
+  var res: f32 = textureSampleCompare(arg_0, arg_1, vec3<f32>(), 1u, 1.f);
+}
+
+@fragment
+fn fragment_main() {
+  textureSampleCompare_1912e5();
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/1912e5.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleCompare/1912e5.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..1547bd9
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleCompare/1912e5.wgsl.expected.dxc.hlsl
@@ -0,0 +1,11 @@
+TextureCubeArray arg_0 : register(t0, space1);
+SamplerComparisonState arg_1 : register(s1, space1);
+
+void textureSampleCompare_1912e5() {
+  float res = arg_0.SampleCmp(arg_1, float4(0.0f, 0.0f, 0.0f, float(1u)), 1.0f);
+}
+
+void fragment_main() {
+  textureSampleCompare_1912e5();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/1912e5.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleCompare/1912e5.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..1547bd9
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleCompare/1912e5.wgsl.expected.fxc.hlsl
@@ -0,0 +1,11 @@
+TextureCubeArray arg_0 : register(t0, space1);
+SamplerComparisonState arg_1 : register(s1, space1);
+
+void textureSampleCompare_1912e5() {
+  float res = arg_0.SampleCmp(arg_1, float4(0.0f, 0.0f, 0.0f, float(1u)), 1.0f);
+}
+
+void fragment_main() {
+  textureSampleCompare_1912e5();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/1912e5.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSampleCompare/1912e5.wgsl.expected.glsl
new file mode 100644
index 0000000..623232f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleCompare/1912e5.wgsl.expected.glsl
@@ -0,0 +1,26 @@
+SKIP: FAILED
+
+#version 310 es
+precision mediump float;
+
+uniform highp samplerCubeArrayShadow arg_0_arg_1;
+
+void textureSampleCompare_1912e5() {
+  float res = texture(arg_0_arg_1, vec4(0.0f, 0.0f, 0.0f, float(1u)), 1.0f);
+}
+
+void fragment_main() {
+  textureSampleCompare_1912e5();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'samplerCubeArrayShadow' : Reserved word. 
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/1912e5.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleCompare/1912e5.wgsl.expected.msl
new file mode 100644
index 0000000..13fdf12
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleCompare/1912e5.wgsl.expected.msl
@@ -0,0 +1,12 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureSampleCompare_1912e5(depthcube_array<float, access::sample> tint_symbol, sampler tint_symbol_1) {
+  float res = tint_symbol.sample_compare(tint_symbol_1, float3(0.0f), 1u, 1.0f);
+}
+
+fragment void fragment_main(depthcube_array<float, access::sample> tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) {
+  textureSampleCompare_1912e5(tint_symbol_2, tint_symbol_3);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/1912e5.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleCompare/1912e5.wgsl.expected.spvasm
new file mode 100644
index 0000000..c678e74
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleCompare/1912e5.wgsl.expected.spvasm
@@ -0,0 +1,53 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 30
+; Schema: 0
+               OpCapability Shader
+               OpCapability SampledCubeArray
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpName %arg_0 "arg_0"
+               OpName %arg_1 "arg_1"
+               OpName %textureSampleCompare_1912e5 "textureSampleCompare_1912e5"
+               OpName %res "res"
+               OpName %fragment_main "fragment_main"
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %arg_1 DescriptorSet 1
+               OpDecorate %arg_1 Binding 1
+      %float = OpTypeFloat 32
+          %3 = OpTypeImage %float Cube 0 1 0 1 Unknown
+%_ptr_UniformConstant_3 = OpTypePointer UniformConstant %3
+      %arg_0 = OpVariable %_ptr_UniformConstant_3 UniformConstant
+          %7 = OpTypeSampler
+%_ptr_UniformConstant_7 = OpTypePointer UniformConstant %7
+      %arg_1 = OpVariable %_ptr_UniformConstant_7 UniformConstant
+       %void = OpTypeVoid
+          %8 = OpTypeFunction %void
+         %15 = OpTypeSampledImage %3
+    %v4float = OpTypeVector %float 4
+    %float_0 = OpConstant %float 0
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+    %float_1 = OpConstant %float 1
+%_ptr_Function_float = OpTypePointer Function %float
+         %26 = OpConstantNull %float
+%textureSampleCompare_1912e5 = OpFunction %void None %8
+         %11 = OpLabel
+        %res = OpVariable %_ptr_Function_float Function %26
+         %13 = OpLoad %7 %arg_1
+         %14 = OpLoad %3 %arg_0
+         %16 = OpSampledImage %15 %14 %13
+         %19 = OpConvertUToF %float %uint_1
+         %22 = OpCompositeConstruct %v4float %float_0 %float_0 %float_0 %19
+         %12 = OpImageSampleDrefImplicitLod %float %16 %22 %float_1
+               OpStore %res %12
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %8
+         %28 = OpLabel
+         %29 = OpFunctionCall %void %textureSampleCompare_1912e5
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/1912e5.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleCompare/1912e5.wgsl.expected.wgsl
new file mode 100644
index 0000000..8f16f24
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleCompare/1912e5.wgsl.expected.wgsl
@@ -0,0 +1,12 @@
+@group(1) @binding(0) var arg_0 : texture_depth_cube_array;
+
+@group(1) @binding(1) var arg_1 : sampler_comparison;
+
+fn textureSampleCompare_1912e5() {
+  var res : f32 = textureSampleCompare(arg_0, arg_1, vec3<f32>(), 1u, 1.0f);
+}
+
+@fragment
+fn fragment_main() {
+  textureSampleCompare_1912e5();
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/7b5025.wgsl b/test/tint/builtins/gen/literal/textureSampleCompare/7b5025.wgsl
new file mode 100644
index 0000000..58da027
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleCompare/7b5025.wgsl
@@ -0,0 +1,34 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_depth_2d_array;
+@group(1) @binding(1) var arg_1: sampler_comparison;
+
+// fn textureSampleCompare(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2<f32>, array_index: u32, depth_ref: f32, @const offset: vec2<i32>) -> f32
+fn textureSampleCompare_7b5025() {
+  var res: f32 = textureSampleCompare(arg_0, arg_1, vec2<f32>(), 1u, 1.f, vec2<i32>());
+}
+
+@fragment
+fn fragment_main() {
+  textureSampleCompare_7b5025();
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/7b5025.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleCompare/7b5025.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..fa4f65a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleCompare/7b5025.wgsl.expected.dxc.hlsl
@@ -0,0 +1,11 @@
+Texture2DArray arg_0 : register(t0, space1);
+SamplerComparisonState arg_1 : register(s1, space1);
+
+void textureSampleCompare_7b5025() {
+  float res = arg_0.SampleCmp(arg_1, float3(0.0f, 0.0f, float(1u)), 1.0f, (0).xx);
+}
+
+void fragment_main() {
+  textureSampleCompare_7b5025();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/7b5025.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleCompare/7b5025.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..fa4f65a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleCompare/7b5025.wgsl.expected.fxc.hlsl
@@ -0,0 +1,11 @@
+Texture2DArray arg_0 : register(t0, space1);
+SamplerComparisonState arg_1 : register(s1, space1);
+
+void textureSampleCompare_7b5025() {
+  float res = arg_0.SampleCmp(arg_1, float3(0.0f, 0.0f, float(1u)), 1.0f, (0).xx);
+}
+
+void fragment_main() {
+  textureSampleCompare_7b5025();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/7b5025.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSampleCompare/7b5025.wgsl.expected.glsl
new file mode 100644
index 0000000..0a1dfc3
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleCompare/7b5025.wgsl.expected.glsl
@@ -0,0 +1,26 @@
+SKIP: FAILED
+
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2DArrayShadow arg_0_arg_1;
+
+void textureSampleCompare_7b5025() {
+  float res = textureOffset(arg_0_arg_1, vec4(0.0f, 0.0f, float(1u), 1.0f), ivec2(0));
+}
+
+void fragment_main() {
+  textureSampleCompare_7b5025();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:7: 'sampler' : TextureOffset does not support sampler2DArrayShadow :  ES Profile
+ERROR: 0:7: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/7b5025.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleCompare/7b5025.wgsl.expected.msl
new file mode 100644
index 0000000..eb74d38
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleCompare/7b5025.wgsl.expected.msl
@@ -0,0 +1,12 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureSampleCompare_7b5025(depth2d_array<float, access::sample> tint_symbol, sampler tint_symbol_1) {
+  float res = tint_symbol.sample_compare(tint_symbol_1, float2(0.0f), 1u, 1.0f, int2(0));
+}
+
+fragment void fragment_main(depth2d_array<float, access::sample> tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) {
+  textureSampleCompare_7b5025(tint_symbol_2, tint_symbol_3);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/7b5025.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleCompare/7b5025.wgsl.expected.spvasm
new file mode 100644
index 0000000..5baaf3c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleCompare/7b5025.wgsl.expected.spvasm
@@ -0,0 +1,55 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 33
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpName %arg_0 "arg_0"
+               OpName %arg_1 "arg_1"
+               OpName %textureSampleCompare_7b5025 "textureSampleCompare_7b5025"
+               OpName %res "res"
+               OpName %fragment_main "fragment_main"
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %arg_1 DescriptorSet 1
+               OpDecorate %arg_1 Binding 1
+      %float = OpTypeFloat 32
+          %3 = OpTypeImage %float 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_3 = OpTypePointer UniformConstant %3
+      %arg_0 = OpVariable %_ptr_UniformConstant_3 UniformConstant
+          %7 = OpTypeSampler
+%_ptr_UniformConstant_7 = OpTypePointer UniformConstant %7
+      %arg_1 = OpVariable %_ptr_UniformConstant_7 UniformConstant
+       %void = OpTypeVoid
+          %8 = OpTypeFunction %void
+         %15 = OpTypeSampledImage %3
+    %v3float = OpTypeVector %float 3
+    %float_0 = OpConstant %float 0
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+    %float_1 = OpConstant %float 1
+        %int = OpTypeInt 32 1
+      %v2int = OpTypeVector %int 2
+         %26 = OpConstantNull %v2int
+%_ptr_Function_float = OpTypePointer Function %float
+         %29 = OpConstantNull %float
+%textureSampleCompare_7b5025 = OpFunction %void None %8
+         %11 = OpLabel
+        %res = OpVariable %_ptr_Function_float Function %29
+         %13 = OpLoad %7 %arg_1
+         %14 = OpLoad %3 %arg_0
+         %16 = OpSampledImage %15 %14 %13
+         %19 = OpConvertUToF %float %uint_1
+         %22 = OpCompositeConstruct %v3float %float_0 %float_0 %19
+         %12 = OpImageSampleDrefImplicitLod %float %16 %22 %float_1 ConstOffset %26
+               OpStore %res %12
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %8
+         %31 = OpLabel
+         %32 = OpFunctionCall %void %textureSampleCompare_7b5025
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/7b5025.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleCompare/7b5025.wgsl.expected.wgsl
new file mode 100644
index 0000000..602982c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleCompare/7b5025.wgsl.expected.wgsl
@@ -0,0 +1,12 @@
+@group(1) @binding(0) var arg_0 : texture_depth_2d_array;
+
+@group(1) @binding(1) var arg_1 : sampler_comparison;
+
+fn textureSampleCompare_7b5025() {
+  var res : f32 = textureSampleCompare(arg_0, arg_1, vec2<f32>(), 1u, 1.0f, vec2<i32>());
+}
+
+@fragment
+fn fragment_main() {
+  textureSampleCompare_7b5025();
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/90ae56.wgsl b/test/tint/builtins/gen/literal/textureSampleCompare/90ae56.wgsl
new file mode 100644
index 0000000..7483dd5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleCompare/90ae56.wgsl
@@ -0,0 +1,34 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_depth_2d_array;
+@group(1) @binding(1) var arg_1: sampler_comparison;
+
+// fn textureSampleCompare(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2<f32>, array_index: u32, depth_ref: f32) -> f32
+fn textureSampleCompare_90ae56() {
+  var res: f32 = textureSampleCompare(arg_0, arg_1, vec2<f32>(), 1u, 1.f);
+}
+
+@fragment
+fn fragment_main() {
+  textureSampleCompare_90ae56();
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/90ae56.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleCompare/90ae56.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..7e358fb
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleCompare/90ae56.wgsl.expected.dxc.hlsl
@@ -0,0 +1,11 @@
+Texture2DArray arg_0 : register(t0, space1);
+SamplerComparisonState arg_1 : register(s1, space1);
+
+void textureSampleCompare_90ae56() {
+  float res = arg_0.SampleCmp(arg_1, float3(0.0f, 0.0f, float(1u)), 1.0f);
+}
+
+void fragment_main() {
+  textureSampleCompare_90ae56();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/90ae56.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleCompare/90ae56.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..7e358fb
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleCompare/90ae56.wgsl.expected.fxc.hlsl
@@ -0,0 +1,11 @@
+Texture2DArray arg_0 : register(t0, space1);
+SamplerComparisonState arg_1 : register(s1, space1);
+
+void textureSampleCompare_90ae56() {
+  float res = arg_0.SampleCmp(arg_1, float3(0.0f, 0.0f, float(1u)), 1.0f);
+}
+
+void fragment_main() {
+  textureSampleCompare_90ae56();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/90ae56.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSampleCompare/90ae56.wgsl.expected.glsl
new file mode 100644
index 0000000..abfc412
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleCompare/90ae56.wgsl.expected.glsl
@@ -0,0 +1,17 @@
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2DArrayShadow arg_0_arg_1;
+
+void textureSampleCompare_90ae56() {
+  float res = texture(arg_0_arg_1, vec4(0.0f, 0.0f, float(1u), 1.0f));
+}
+
+void fragment_main() {
+  textureSampleCompare_90ae56();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/90ae56.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleCompare/90ae56.wgsl.expected.msl
new file mode 100644
index 0000000..00080f4
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleCompare/90ae56.wgsl.expected.msl
@@ -0,0 +1,12 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureSampleCompare_90ae56(depth2d_array<float, access::sample> tint_symbol, sampler tint_symbol_1) {
+  float res = tint_symbol.sample_compare(tint_symbol_1, float2(0.0f), 1u, 1.0f);
+}
+
+fragment void fragment_main(depth2d_array<float, access::sample> tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) {
+  textureSampleCompare_90ae56(tint_symbol_2, tint_symbol_3);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/90ae56.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleCompare/90ae56.wgsl.expected.spvasm
new file mode 100644
index 0000000..89b9887
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleCompare/90ae56.wgsl.expected.spvasm
@@ -0,0 +1,52 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 30
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpName %arg_0 "arg_0"
+               OpName %arg_1 "arg_1"
+               OpName %textureSampleCompare_90ae56 "textureSampleCompare_90ae56"
+               OpName %res "res"
+               OpName %fragment_main "fragment_main"
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %arg_1 DescriptorSet 1
+               OpDecorate %arg_1 Binding 1
+      %float = OpTypeFloat 32
+          %3 = OpTypeImage %float 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_3 = OpTypePointer UniformConstant %3
+      %arg_0 = OpVariable %_ptr_UniformConstant_3 UniformConstant
+          %7 = OpTypeSampler
+%_ptr_UniformConstant_7 = OpTypePointer UniformConstant %7
+      %arg_1 = OpVariable %_ptr_UniformConstant_7 UniformConstant
+       %void = OpTypeVoid
+          %8 = OpTypeFunction %void
+         %15 = OpTypeSampledImage %3
+    %v3float = OpTypeVector %float 3
+    %float_0 = OpConstant %float 0
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+    %float_1 = OpConstant %float 1
+%_ptr_Function_float = OpTypePointer Function %float
+         %26 = OpConstantNull %float
+%textureSampleCompare_90ae56 = OpFunction %void None %8
+         %11 = OpLabel
+        %res = OpVariable %_ptr_Function_float Function %26
+         %13 = OpLoad %7 %arg_1
+         %14 = OpLoad %3 %arg_0
+         %16 = OpSampledImage %15 %14 %13
+         %19 = OpConvertUToF %float %uint_1
+         %22 = OpCompositeConstruct %v3float %float_0 %float_0 %19
+         %12 = OpImageSampleDrefImplicitLod %float %16 %22 %float_1
+               OpStore %res %12
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %8
+         %28 = OpLabel
+         %29 = OpFunctionCall %void %textureSampleCompare_90ae56
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/90ae56.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleCompare/90ae56.wgsl.expected.wgsl
new file mode 100644
index 0000000..8559700
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleCompare/90ae56.wgsl.expected.wgsl
@@ -0,0 +1,12 @@
+@group(1) @binding(0) var arg_0 : texture_depth_2d_array;
+
+@group(1) @binding(1) var arg_1 : sampler_comparison;
+
+fn textureSampleCompare_90ae56() {
+  var res : f32 = textureSampleCompare(arg_0, arg_1, vec2<f32>(), 1u, 1.0f);
+}
+
+@fragment
+fn fragment_main() {
+  textureSampleCompare_90ae56();
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/7dc3c0.wgsl b/test/tint/builtins/gen/literal/textureSampleCompareLevel/7dc3c0.wgsl
new file mode 100644
index 0000000..c27866b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/7dc3c0.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_depth_2d_array;
+@group(1) @binding(1) var arg_1: sampler_comparison;
+
+// fn textureSampleCompareLevel(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2<f32>, array_index: u32, depth_ref: f32) -> f32
+fn textureSampleCompareLevel_7dc3c0() {
+  var res: f32 = textureSampleCompareLevel(arg_0, arg_1, vec2<f32>(), 1u, 1.f);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureSampleCompareLevel_7dc3c0();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureSampleCompareLevel_7dc3c0();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureSampleCompareLevel_7dc3c0();
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/7dc3c0.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleCompareLevel/7dc3c0.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..6c1d906
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/7dc3c0.wgsl.expected.dxc.hlsl
@@ -0,0 +1,33 @@
+Texture2DArray arg_0 : register(t0, space1);
+SamplerComparisonState arg_1 : register(s1, space1);
+
+void textureSampleCompareLevel_7dc3c0() {
+  float res = arg_0.SampleCmpLevelZero(arg_1, float3(0.0f, 0.0f, float(1u)), 1.0f);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureSampleCompareLevel_7dc3c0();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureSampleCompareLevel_7dc3c0();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureSampleCompareLevel_7dc3c0();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/7dc3c0.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleCompareLevel/7dc3c0.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..6c1d906
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/7dc3c0.wgsl.expected.fxc.hlsl
@@ -0,0 +1,33 @@
+Texture2DArray arg_0 : register(t0, space1);
+SamplerComparisonState arg_1 : register(s1, space1);
+
+void textureSampleCompareLevel_7dc3c0() {
+  float res = arg_0.SampleCmpLevelZero(arg_1, float3(0.0f, 0.0f, float(1u)), 1.0f);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureSampleCompareLevel_7dc3c0();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureSampleCompareLevel_7dc3c0();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureSampleCompareLevel_7dc3c0();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/7dc3c0.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSampleCompareLevel/7dc3c0.wgsl.expected.glsl
new file mode 100644
index 0000000..37e69e4
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/7dc3c0.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+
+uniform highp sampler2DArrayShadow arg_0_arg_1;
+
+void textureSampleCompareLevel_7dc3c0() {
+  float res = texture(arg_0_arg_1, vec4(0.0f, 0.0f, float(1u), 1.0f));
+}
+
+vec4 vertex_main() {
+  textureSampleCompareLevel_7dc3c0();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2DArrayShadow arg_0_arg_1;
+
+void textureSampleCompareLevel_7dc3c0() {
+  float res = texture(arg_0_arg_1, vec4(0.0f, 0.0f, float(1u), 1.0f));
+}
+
+void fragment_main() {
+  textureSampleCompareLevel_7dc3c0();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp sampler2DArrayShadow arg_0_arg_1;
+
+void textureSampleCompareLevel_7dc3c0() {
+  float res = texture(arg_0_arg_1, vec4(0.0f, 0.0f, float(1u), 1.0f));
+}
+
+void compute_main() {
+  textureSampleCompareLevel_7dc3c0();
+}
+
+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/textureSampleCompareLevel/7dc3c0.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleCompareLevel/7dc3c0.wgsl.expected.msl
new file mode 100644
index 0000000..3cf80ae
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/7dc3c0.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureSampleCompareLevel_7dc3c0(depth2d_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+  float res = tint_symbol_1.sample_compare(tint_symbol_2, float2(0.0f), 1u, 1.0f, level(0));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(depth2d_array<float, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+  textureSampleCompareLevel_7dc3c0(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(depth2d_array<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(depth2d_array<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+  textureSampleCompareLevel_7dc3c0(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(depth2d_array<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+  textureSampleCompareLevel_7dc3c0(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/7dc3c0.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleCompareLevel/7dc3c0.wgsl.expected.spvasm
new file mode 100644
index 0000000..a56b0ee
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/7dc3c0.wgsl.expected.spvasm
@@ -0,0 +1,86 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 46
+; 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 %arg_1 "arg_1"
+               OpName %textureSampleCompareLevel_7dc3c0 "textureSampleCompareLevel_7dc3c0"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %arg_1 DescriptorSet 1
+               OpDecorate %arg_1 Binding 1
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+         %14 = OpTypeSampler
+%_ptr_UniformConstant_14 = OpTypePointer UniformConstant %14
+      %arg_1 = OpVariable %_ptr_UniformConstant_14 UniformConstant
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+         %22 = OpTypeSampledImage %11
+    %v3float = OpTypeVector %float 3
+    %float_0 = OpConstant %float 0
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+    %float_1 = OpConstant %float 1
+%_ptr_Function_float = OpTypePointer Function %float
+         %33 = OpTypeFunction %v4float
+%textureSampleCompareLevel_7dc3c0 = OpFunction %void None %15
+         %18 = OpLabel
+        %res = OpVariable %_ptr_Function_float Function %8
+         %20 = OpLoad %14 %arg_1
+         %21 = OpLoad %11 %arg_0
+         %23 = OpSampledImage %22 %21 %20
+         %26 = OpConvertUToF %float %uint_1
+         %29 = OpCompositeConstruct %v3float %float_0 %float_0 %26
+         %19 = OpImageSampleDrefExplicitLod %float %23 %29 %float_1 Lod %float_0
+               OpStore %res %19
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %33
+         %35 = OpLabel
+         %36 = OpFunctionCall %void %textureSampleCompareLevel_7dc3c0
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %38 = OpLabel
+         %39 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %39
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %41 = OpLabel
+         %42 = OpFunctionCall %void %textureSampleCompareLevel_7dc3c0
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %44 = OpLabel
+         %45 = OpFunctionCall %void %textureSampleCompareLevel_7dc3c0
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/7dc3c0.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleCompareLevel/7dc3c0.wgsl.expected.wgsl
new file mode 100644
index 0000000..1e65a08
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/7dc3c0.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(0) var arg_0 : texture_depth_2d_array;
+
+@group(1) @binding(1) var arg_1 : sampler_comparison;
+
+fn textureSampleCompareLevel_7dc3c0() {
+  var res : f32 = textureSampleCompareLevel(arg_0, arg_1, vec2<f32>(), 1u, 1.0f);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureSampleCompareLevel_7dc3c0();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureSampleCompareLevel_7dc3c0();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureSampleCompareLevel_7dc3c0();
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/958c87.wgsl b/test/tint/builtins/gen/literal/textureSampleCompareLevel/958c87.wgsl
new file mode 100644
index 0000000..42d6fb2
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/958c87.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_depth_cube_array;
+@group(1) @binding(1) var arg_1: sampler_comparison;
+
+// fn textureSampleCompareLevel(texture: texture_depth_cube_array, sampler: sampler_comparison, coords: vec3<f32>, array_index: u32, depth_ref: f32) -> f32
+fn textureSampleCompareLevel_958c87() {
+  var res: f32 = textureSampleCompareLevel(arg_0, arg_1, vec3<f32>(), 1u, 1.f);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureSampleCompareLevel_958c87();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureSampleCompareLevel_958c87();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureSampleCompareLevel_958c87();
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/958c87.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleCompareLevel/958c87.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..267052f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/958c87.wgsl.expected.dxc.hlsl
@@ -0,0 +1,33 @@
+TextureCubeArray arg_0 : register(t0, space1);
+SamplerComparisonState arg_1 : register(s1, space1);
+
+void textureSampleCompareLevel_958c87() {
+  float res = arg_0.SampleCmpLevelZero(arg_1, float4(0.0f, 0.0f, 0.0f, float(1u)), 1.0f);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureSampleCompareLevel_958c87();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureSampleCompareLevel_958c87();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureSampleCompareLevel_958c87();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/958c87.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleCompareLevel/958c87.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..267052f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/958c87.wgsl.expected.fxc.hlsl
@@ -0,0 +1,33 @@
+TextureCubeArray arg_0 : register(t0, space1);
+SamplerComparisonState arg_1 : register(s1, space1);
+
+void textureSampleCompareLevel_958c87() {
+  float res = arg_0.SampleCmpLevelZero(arg_1, float4(0.0f, 0.0f, 0.0f, float(1u)), 1.0f);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureSampleCompareLevel_958c87();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureSampleCompareLevel_958c87();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureSampleCompareLevel_958c87();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/958c87.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSampleCompareLevel/958c87.wgsl.expected.glsl
new file mode 100644
index 0000000..9385379
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/958c87.wgsl.expected.glsl
@@ -0,0 +1,78 @@
+SKIP: FAILED
+
+#version 310 es
+
+uniform highp samplerCubeArrayShadow arg_0_arg_1;
+
+void textureSampleCompareLevel_958c87() {
+  float res = texture(arg_0_arg_1, vec4(0.0f, 0.0f, 0.0f, float(1u)), 1.0f);
+}
+
+vec4 vertex_main() {
+  textureSampleCompareLevel_958c87();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  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: 'samplerCubeArrayShadow' : Reserved word. 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+uniform highp samplerCubeArrayShadow arg_0_arg_1;
+
+void textureSampleCompareLevel_958c87() {
+  float res = texture(arg_0_arg_1, vec4(0.0f, 0.0f, 0.0f, float(1u)), 1.0f);
+}
+
+void fragment_main() {
+  textureSampleCompareLevel_958c87();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'samplerCubeArrayShadow' : Reserved word. 
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+uniform highp samplerCubeArrayShadow arg_0_arg_1;
+
+void textureSampleCompareLevel_958c87() {
+  float res = texture(arg_0_arg_1, vec4(0.0f, 0.0f, 0.0f, float(1u)), 1.0f);
+}
+
+void compute_main() {
+  textureSampleCompareLevel_958c87();
+}
+
+layout(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: 'samplerCubeArrayShadow' : Reserved word. 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/958c87.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleCompareLevel/958c87.wgsl.expected.msl
new file mode 100644
index 0000000..a46a096
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/958c87.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureSampleCompareLevel_958c87(depthcube_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+  float res = tint_symbol_1.sample_compare(tint_symbol_2, float3(0.0f), 1u, 1.0f, level(0));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(depthcube_array<float, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+  textureSampleCompareLevel_958c87(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(depthcube_array<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(depthcube_array<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+  textureSampleCompareLevel_958c87(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(depthcube_array<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+  textureSampleCompareLevel_958c87(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/958c87.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleCompareLevel/958c87.wgsl.expected.spvasm
new file mode 100644
index 0000000..6669c55
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/958c87.wgsl.expected.spvasm
@@ -0,0 +1,86 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 45
+; Schema: 0
+               OpCapability Shader
+               OpCapability SampledCubeArray
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %arg_1 "arg_1"
+               OpName %textureSampleCompareLevel_958c87 "textureSampleCompareLevel_958c87"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %arg_1 DescriptorSet 1
+               OpDecorate %arg_1 Binding 1
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float Cube 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+         %14 = OpTypeSampler
+%_ptr_UniformConstant_14 = OpTypePointer UniformConstant %14
+      %arg_1 = OpVariable %_ptr_UniformConstant_14 UniformConstant
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+         %22 = OpTypeSampledImage %11
+    %float_0 = OpConstant %float 0
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+    %float_1 = OpConstant %float 1
+%_ptr_Function_float = OpTypePointer Function %float
+         %32 = OpTypeFunction %v4float
+%textureSampleCompareLevel_958c87 = OpFunction %void None %15
+         %18 = OpLabel
+        %res = OpVariable %_ptr_Function_float Function %8
+         %20 = OpLoad %14 %arg_1
+         %21 = OpLoad %11 %arg_0
+         %23 = OpSampledImage %22 %21 %20
+         %25 = OpConvertUToF %float %uint_1
+         %28 = OpCompositeConstruct %v4float %float_0 %float_0 %float_0 %25
+         %19 = OpImageSampleDrefExplicitLod %float %23 %28 %float_1 Lod %float_0
+               OpStore %res %19
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %32
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %textureSampleCompareLevel_958c87
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %37 = OpLabel
+         %38 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %38
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %textureSampleCompareLevel_958c87
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %43 = OpLabel
+         %44 = OpFunctionCall %void %textureSampleCompareLevel_958c87
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/958c87.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleCompareLevel/958c87.wgsl.expected.wgsl
new file mode 100644
index 0000000..7b6e087
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/958c87.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(0) var arg_0 : texture_depth_cube_array;
+
+@group(1) @binding(1) var arg_1 : sampler_comparison;
+
+fn textureSampleCompareLevel_958c87() {
+  var res : f32 = textureSampleCompareLevel(arg_0, arg_1, vec3<f32>(), 1u, 1.0f);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureSampleCompareLevel_958c87();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureSampleCompareLevel_958c87();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureSampleCompareLevel_958c87();
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/bcb3dd.wgsl b/test/tint/builtins/gen/literal/textureSampleCompareLevel/bcb3dd.wgsl
new file mode 100644
index 0000000..59d04fb
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/bcb3dd.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_depth_2d_array;
+@group(1) @binding(1) var arg_1: sampler_comparison;
+
+// fn textureSampleCompareLevel(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2<f32>, array_index: u32, depth_ref: f32, @const offset: vec2<i32>) -> f32
+fn textureSampleCompareLevel_bcb3dd() {
+  var res: f32 = textureSampleCompareLevel(arg_0, arg_1, vec2<f32>(), 1u, 1.f, vec2<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureSampleCompareLevel_bcb3dd();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureSampleCompareLevel_bcb3dd();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureSampleCompareLevel_bcb3dd();
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/bcb3dd.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleCompareLevel/bcb3dd.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..25f2ddc
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/bcb3dd.wgsl.expected.dxc.hlsl
@@ -0,0 +1,33 @@
+Texture2DArray arg_0 : register(t0, space1);
+SamplerComparisonState arg_1 : register(s1, space1);
+
+void textureSampleCompareLevel_bcb3dd() {
+  float res = arg_0.SampleCmpLevelZero(arg_1, float3(0.0f, 0.0f, float(1u)), 1.0f, (0).xx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureSampleCompareLevel_bcb3dd();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureSampleCompareLevel_bcb3dd();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureSampleCompareLevel_bcb3dd();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/bcb3dd.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleCompareLevel/bcb3dd.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..25f2ddc
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/bcb3dd.wgsl.expected.fxc.hlsl
@@ -0,0 +1,33 @@
+Texture2DArray arg_0 : register(t0, space1);
+SamplerComparisonState arg_1 : register(s1, space1);
+
+void textureSampleCompareLevel_bcb3dd() {
+  float res = arg_0.SampleCmpLevelZero(arg_1, float3(0.0f, 0.0f, float(1u)), 1.0f, (0).xx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureSampleCompareLevel_bcb3dd();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureSampleCompareLevel_bcb3dd();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureSampleCompareLevel_bcb3dd();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/bcb3dd.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSampleCompareLevel/bcb3dd.wgsl.expected.glsl
new file mode 100644
index 0000000..b5df2f6
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/bcb3dd.wgsl.expected.glsl
@@ -0,0 +1,78 @@
+SKIP: FAILED
+
+#version 310 es
+
+uniform highp sampler2DArrayShadow arg_0_arg_1;
+
+void textureSampleCompareLevel_bcb3dd() {
+  float res = textureOffset(arg_0_arg_1, vec4(0.0f, 0.0f, float(1u), 1.0f), ivec2(0));
+}
+
+vec4 vertex_main() {
+  textureSampleCompareLevel_bcb3dd();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:6: 'sampler' : TextureOffset does not support sampler2DArrayShadow :  ES Profile
+ERROR: 0:6: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2DArrayShadow arg_0_arg_1;
+
+void textureSampleCompareLevel_bcb3dd() {
+  float res = textureOffset(arg_0_arg_1, vec4(0.0f, 0.0f, float(1u), 1.0f), ivec2(0));
+}
+
+void fragment_main() {
+  textureSampleCompareLevel_bcb3dd();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:7: 'sampler' : TextureOffset does not support sampler2DArrayShadow :  ES Profile
+ERROR: 0:7: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+uniform highp sampler2DArrayShadow arg_0_arg_1;
+
+void textureSampleCompareLevel_bcb3dd() {
+  float res = textureOffset(arg_0_arg_1, vec4(0.0f, 0.0f, float(1u), 1.0f), ivec2(0));
+}
+
+void compute_main() {
+  textureSampleCompareLevel_bcb3dd();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:6: 'sampler' : TextureOffset does not support sampler2DArrayShadow :  ES Profile
+ERROR: 0:6: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/bcb3dd.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleCompareLevel/bcb3dd.wgsl.expected.msl
new file mode 100644
index 0000000..035ddc3
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/bcb3dd.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureSampleCompareLevel_bcb3dd(depth2d_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+  float res = tint_symbol_1.sample_compare(tint_symbol_2, float2(0.0f), 1u, 1.0f, level(0), int2(0));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(depth2d_array<float, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+  textureSampleCompareLevel_bcb3dd(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(depth2d_array<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(depth2d_array<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+  textureSampleCompareLevel_bcb3dd(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(depth2d_array<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+  textureSampleCompareLevel_bcb3dd(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/bcb3dd.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleCompareLevel/bcb3dd.wgsl.expected.spvasm
new file mode 100644
index 0000000..a7672e5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/bcb3dd.wgsl.expected.spvasm
@@ -0,0 +1,89 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 49
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %arg_1 "arg_1"
+               OpName %textureSampleCompareLevel_bcb3dd "textureSampleCompareLevel_bcb3dd"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %arg_1 DescriptorSet 1
+               OpDecorate %arg_1 Binding 1
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+         %14 = OpTypeSampler
+%_ptr_UniformConstant_14 = OpTypePointer UniformConstant %14
+      %arg_1 = OpVariable %_ptr_UniformConstant_14 UniformConstant
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+         %22 = OpTypeSampledImage %11
+    %v3float = OpTypeVector %float 3
+    %float_0 = OpConstant %float 0
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+    %float_1 = OpConstant %float 1
+        %int = OpTypeInt 32 1
+      %v2int = OpTypeVector %int 2
+         %33 = OpConstantNull %v2int
+%_ptr_Function_float = OpTypePointer Function %float
+         %36 = OpTypeFunction %v4float
+%textureSampleCompareLevel_bcb3dd = OpFunction %void None %15
+         %18 = OpLabel
+        %res = OpVariable %_ptr_Function_float Function %8
+         %20 = OpLoad %14 %arg_1
+         %21 = OpLoad %11 %arg_0
+         %23 = OpSampledImage %22 %21 %20
+         %26 = OpConvertUToF %float %uint_1
+         %29 = OpCompositeConstruct %v3float %float_0 %float_0 %26
+         %19 = OpImageSampleDrefExplicitLod %float %23 %29 %float_1 Lod|ConstOffset %float_0 %33
+               OpStore %res %19
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %36
+         %38 = OpLabel
+         %39 = OpFunctionCall %void %textureSampleCompareLevel_bcb3dd
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %41 = OpLabel
+         %42 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %42
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %44 = OpLabel
+         %45 = OpFunctionCall %void %textureSampleCompareLevel_bcb3dd
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %47 = OpLabel
+         %48 = OpFunctionCall %void %textureSampleCompareLevel_bcb3dd
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/bcb3dd.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleCompareLevel/bcb3dd.wgsl.expected.wgsl
new file mode 100644
index 0000000..41956b8
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/bcb3dd.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(0) var arg_0 : texture_depth_2d_array;
+
+@group(1) @binding(1) var arg_1 : sampler_comparison;
+
+fn textureSampleCompareLevel_bcb3dd() {
+  var res : f32 = textureSampleCompareLevel(arg_0, arg_1, vec2<f32>(), 1u, 1.0f, vec2<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureSampleCompareLevel_bcb3dd();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureSampleCompareLevel_bcb3dd();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureSampleCompareLevel_bcb3dd();
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/7cd6de.wgsl b/test/tint/builtins/gen/literal/textureSampleGrad/7cd6de.wgsl
new file mode 100644
index 0000000..b6d18f5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleGrad/7cd6de.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_2d_array<f32>;
+@group(1) @binding(1) var arg_1: sampler;
+
+// fn textureSampleGrad(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: u32, ddx: vec2<f32>, ddy: vec2<f32>, @const offset: vec2<i32>) -> vec4<f32>
+fn textureSampleGrad_7cd6de() {
+  var res: vec4<f32> = textureSampleGrad(arg_0, arg_1, vec2<f32>(), 1u, vec2<f32>(), vec2<f32>(), vec2<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureSampleGrad_7cd6de();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureSampleGrad_7cd6de();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureSampleGrad_7cd6de();
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/7cd6de.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleGrad/7cd6de.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..6a9c86c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleGrad/7cd6de.wgsl.expected.dxc.hlsl
@@ -0,0 +1,33 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSampleGrad_7cd6de() {
+  float4 res = arg_0.SampleGrad(arg_1, float3(0.0f, 0.0f, float(1u)), (0.0f).xx, (0.0f).xx, (0).xx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureSampleGrad_7cd6de();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureSampleGrad_7cd6de();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureSampleGrad_7cd6de();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/7cd6de.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleGrad/7cd6de.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..6a9c86c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleGrad/7cd6de.wgsl.expected.fxc.hlsl
@@ -0,0 +1,33 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSampleGrad_7cd6de() {
+  float4 res = arg_0.SampleGrad(arg_1, float3(0.0f, 0.0f, float(1u)), (0.0f).xx, (0.0f).xx, (0).xx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureSampleGrad_7cd6de();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureSampleGrad_7cd6de();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureSampleGrad_7cd6de();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/7cd6de.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSampleGrad/7cd6de.wgsl.expected.glsl
new file mode 100644
index 0000000..d56773c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleGrad/7cd6de.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+
+uniform highp sampler2DArray arg_0_arg_1;
+
+void textureSampleGrad_7cd6de() {
+  vec4 res = textureGradOffset(arg_0_arg_1, vec3(0.0f, 0.0f, float(1u)), vec2(0.0f), vec2(0.0f), ivec2(0));
+}
+
+vec4 vertex_main() {
+  textureSampleGrad_7cd6de();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2DArray arg_0_arg_1;
+
+void textureSampleGrad_7cd6de() {
+  vec4 res = textureGradOffset(arg_0_arg_1, vec3(0.0f, 0.0f, float(1u)), vec2(0.0f), vec2(0.0f), ivec2(0));
+}
+
+void fragment_main() {
+  textureSampleGrad_7cd6de();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp sampler2DArray arg_0_arg_1;
+
+void textureSampleGrad_7cd6de() {
+  vec4 res = textureGradOffset(arg_0_arg_1, vec3(0.0f, 0.0f, float(1u)), vec2(0.0f), vec2(0.0f), ivec2(0));
+}
+
+void compute_main() {
+  textureSampleGrad_7cd6de();
+}
+
+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/textureSampleGrad/7cd6de.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleGrad/7cd6de.wgsl.expected.msl
new file mode 100644
index 0000000..06c4d90
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleGrad/7cd6de.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureSampleGrad_7cd6de(texture2d_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+  float4 res = tint_symbol_1.sample(tint_symbol_2, float2(0.0f), 1u, gradient2d(float2(0.0f), float2(0.0f)), int2(0));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<float, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+  textureSampleGrad_7cd6de(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+  textureSampleGrad_7cd6de(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+  textureSampleGrad_7cd6de(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/7cd6de.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleGrad/7cd6de.wgsl.expected.spvasm
new file mode 100644
index 0000000..1513358
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleGrad/7cd6de.wgsl.expected.spvasm
@@ -0,0 +1,91 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 51
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %arg_1 "arg_1"
+               OpName %textureSampleGrad_7cd6de "textureSampleGrad_7cd6de"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %arg_1 DescriptorSet 1
+               OpDecorate %arg_1 Binding 1
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+         %14 = OpTypeSampler
+%_ptr_UniformConstant_14 = OpTypePointer UniformConstant %14
+      %arg_1 = OpVariable %_ptr_UniformConstant_14 UniformConstant
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+         %22 = OpTypeSampledImage %11
+    %v3float = OpTypeVector %float 3
+    %float_0 = OpConstant %float 0
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+    %v2float = OpTypeVector %float 2
+         %31 = OpConstantNull %v2float
+        %int = OpTypeInt 32 1
+      %v2int = OpTypeVector %int 2
+         %34 = OpConstantNull %v2int
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+         %37 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureSampleGrad_7cd6de = OpFunction %void None %15
+         %18 = OpLabel
+        %res = OpVariable %_ptr_Function_v4float Function %5
+         %20 = OpLoad %14 %arg_1
+         %21 = OpLoad %11 %arg_0
+         %23 = OpSampledImage %22 %21 %20
+         %26 = OpConvertUToF %float %uint_1
+         %29 = OpCompositeConstruct %v3float %float_0 %float_0 %26
+         %19 = OpImageSampleExplicitLod %v4float %23 %29 Grad|ConstOffset %31 %31 %34
+               OpStore %res %19
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %37
+         %39 = OpLabel
+         %40 = OpFunctionCall %void %textureSampleGrad_7cd6de
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %42 = OpLabel
+         %43 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %43
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %46 = OpLabel
+         %47 = OpFunctionCall %void %textureSampleGrad_7cd6de
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %49 = OpLabel
+         %50 = OpFunctionCall %void %textureSampleGrad_7cd6de
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/7cd6de.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleGrad/7cd6de.wgsl.expected.wgsl
new file mode 100644
index 0000000..ae06e64
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleGrad/7cd6de.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(0) var arg_0 : texture_2d_array<f32>;
+
+@group(1) @binding(1) var arg_1 : sampler;
+
+fn textureSampleGrad_7cd6de() {
+  var res : vec4<f32> = textureSampleGrad(arg_0, arg_1, vec2<f32>(), 1u, vec2<f32>(), vec2<f32>(), vec2<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureSampleGrad_7cd6de();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureSampleGrad_7cd6de();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureSampleGrad_7cd6de();
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/a09131.wgsl b/test/tint/builtins/gen/literal/textureSampleGrad/a09131.wgsl
new file mode 100644
index 0000000..5e9988e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleGrad/a09131.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_2d_array<f32>;
+@group(1) @binding(1) var arg_1: sampler;
+
+// fn textureSampleGrad(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: u32, ddx: vec2<f32>, ddy: vec2<f32>) -> vec4<f32>
+fn textureSampleGrad_a09131() {
+  var res: vec4<f32> = textureSampleGrad(arg_0, arg_1, vec2<f32>(), 1u, vec2<f32>(), vec2<f32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureSampleGrad_a09131();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureSampleGrad_a09131();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureSampleGrad_a09131();
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/a09131.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleGrad/a09131.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..24569b5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleGrad/a09131.wgsl.expected.dxc.hlsl
@@ -0,0 +1,33 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSampleGrad_a09131() {
+  float4 res = arg_0.SampleGrad(arg_1, float3(0.0f, 0.0f, float(1u)), (0.0f).xx, (0.0f).xx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureSampleGrad_a09131();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureSampleGrad_a09131();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureSampleGrad_a09131();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/a09131.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleGrad/a09131.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..24569b5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleGrad/a09131.wgsl.expected.fxc.hlsl
@@ -0,0 +1,33 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSampleGrad_a09131() {
+  float4 res = arg_0.SampleGrad(arg_1, float3(0.0f, 0.0f, float(1u)), (0.0f).xx, (0.0f).xx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureSampleGrad_a09131();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureSampleGrad_a09131();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureSampleGrad_a09131();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/a09131.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSampleGrad/a09131.wgsl.expected.glsl
new file mode 100644
index 0000000..8667462
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleGrad/a09131.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+
+uniform highp sampler2DArray arg_0_arg_1;
+
+void textureSampleGrad_a09131() {
+  vec4 res = textureGrad(arg_0_arg_1, vec3(0.0f, 0.0f, float(1u)), vec2(0.0f), vec2(0.0f));
+}
+
+vec4 vertex_main() {
+  textureSampleGrad_a09131();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2DArray arg_0_arg_1;
+
+void textureSampleGrad_a09131() {
+  vec4 res = textureGrad(arg_0_arg_1, vec3(0.0f, 0.0f, float(1u)), vec2(0.0f), vec2(0.0f));
+}
+
+void fragment_main() {
+  textureSampleGrad_a09131();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp sampler2DArray arg_0_arg_1;
+
+void textureSampleGrad_a09131() {
+  vec4 res = textureGrad(arg_0_arg_1, vec3(0.0f, 0.0f, float(1u)), vec2(0.0f), vec2(0.0f));
+}
+
+void compute_main() {
+  textureSampleGrad_a09131();
+}
+
+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/textureSampleGrad/a09131.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleGrad/a09131.wgsl.expected.msl
new file mode 100644
index 0000000..ae0a0d9
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleGrad/a09131.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureSampleGrad_a09131(texture2d_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+  float4 res = tint_symbol_1.sample(tint_symbol_2, float2(0.0f), 1u, gradient2d(float2(0.0f), float2(0.0f)));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<float, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+  textureSampleGrad_a09131(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+  textureSampleGrad_a09131(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+  textureSampleGrad_a09131(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/a09131.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleGrad/a09131.wgsl.expected.spvasm
new file mode 100644
index 0000000..c5bbfc2
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleGrad/a09131.wgsl.expected.spvasm
@@ -0,0 +1,88 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 48
+; 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 %arg_1 "arg_1"
+               OpName %textureSampleGrad_a09131 "textureSampleGrad_a09131"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %arg_1 DescriptorSet 1
+               OpDecorate %arg_1 Binding 1
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+         %14 = OpTypeSampler
+%_ptr_UniformConstant_14 = OpTypePointer UniformConstant %14
+      %arg_1 = OpVariable %_ptr_UniformConstant_14 UniformConstant
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+         %22 = OpTypeSampledImage %11
+    %v3float = OpTypeVector %float 3
+    %float_0 = OpConstant %float 0
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+    %v2float = OpTypeVector %float 2
+         %31 = OpConstantNull %v2float
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+         %34 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureSampleGrad_a09131 = OpFunction %void None %15
+         %18 = OpLabel
+        %res = OpVariable %_ptr_Function_v4float Function %5
+         %20 = OpLoad %14 %arg_1
+         %21 = OpLoad %11 %arg_0
+         %23 = OpSampledImage %22 %21 %20
+         %26 = OpConvertUToF %float %uint_1
+         %29 = OpCompositeConstruct %v3float %float_0 %float_0 %26
+         %19 = OpImageSampleExplicitLod %v4float %23 %29 Grad %31 %31
+               OpStore %res %19
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %34
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %textureSampleGrad_a09131
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %39 = OpLabel
+         %40 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %40
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %43 = OpLabel
+         %44 = OpFunctionCall %void %textureSampleGrad_a09131
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %46 = OpLabel
+         %47 = OpFunctionCall %void %textureSampleGrad_a09131
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/a09131.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleGrad/a09131.wgsl.expected.wgsl
new file mode 100644
index 0000000..212ffa8
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleGrad/a09131.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(0) var arg_0 : texture_2d_array<f32>;
+
+@group(1) @binding(1) var arg_1 : sampler;
+
+fn textureSampleGrad_a09131() {
+  var res : vec4<f32> = textureSampleGrad(arg_0, arg_1, vec2<f32>(), 1u, vec2<f32>(), vec2<f32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureSampleGrad_a09131();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureSampleGrad_a09131();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureSampleGrad_a09131();
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/bbb58f.wgsl b/test/tint/builtins/gen/literal/textureSampleGrad/bbb58f.wgsl
new file mode 100644
index 0000000..8e3968d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleGrad/bbb58f.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_cube_array<f32>;
+@group(1) @binding(1) var arg_1: sampler;
+
+// fn textureSampleGrad(texture: texture_cube_array<f32>, sampler: sampler, coords: vec3<f32>, array_index: u32, ddx: vec3<f32>, ddy: vec3<f32>) -> vec4<f32>
+fn textureSampleGrad_bbb58f() {
+  var res: vec4<f32> = textureSampleGrad(arg_0, arg_1, vec3<f32>(), 1u, vec3<f32>(), vec3<f32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureSampleGrad_bbb58f();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureSampleGrad_bbb58f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureSampleGrad_bbb58f();
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/bbb58f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleGrad/bbb58f.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..8c07d5e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleGrad/bbb58f.wgsl.expected.dxc.hlsl
@@ -0,0 +1,33 @@
+TextureCubeArray<float4> arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSampleGrad_bbb58f() {
+  float4 res = arg_0.SampleGrad(arg_1, float4(0.0f, 0.0f, 0.0f, float(1u)), (0.0f).xxx, (0.0f).xxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureSampleGrad_bbb58f();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureSampleGrad_bbb58f();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureSampleGrad_bbb58f();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/bbb58f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleGrad/bbb58f.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..8c07d5e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleGrad/bbb58f.wgsl.expected.fxc.hlsl
@@ -0,0 +1,33 @@
+TextureCubeArray<float4> arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSampleGrad_bbb58f() {
+  float4 res = arg_0.SampleGrad(arg_1, float4(0.0f, 0.0f, 0.0f, float(1u)), (0.0f).xxx, (0.0f).xxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureSampleGrad_bbb58f();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureSampleGrad_bbb58f();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureSampleGrad_bbb58f();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/bbb58f.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSampleGrad/bbb58f.wgsl.expected.glsl
new file mode 100644
index 0000000..0123ec3
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleGrad/bbb58f.wgsl.expected.glsl
@@ -0,0 +1,78 @@
+SKIP: FAILED
+
+#version 310 es
+
+uniform highp samplerCubeArray arg_0_arg_1;
+
+void textureSampleGrad_bbb58f() {
+  vec4 res = textureGrad(arg_0_arg_1, vec4(0.0f, 0.0f, 0.0f, float(1u)), vec3(0.0f), vec3(0.0f));
+}
+
+vec4 vertex_main() {
+  textureSampleGrad_bbb58f();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'samplerCubeArray' : Reserved word. 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+uniform highp samplerCubeArray arg_0_arg_1;
+
+void textureSampleGrad_bbb58f() {
+  vec4 res = textureGrad(arg_0_arg_1, vec4(0.0f, 0.0f, 0.0f, float(1u)), vec3(0.0f), vec3(0.0f));
+}
+
+void fragment_main() {
+  textureSampleGrad_bbb58f();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'samplerCubeArray' : Reserved word. 
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+uniform highp samplerCubeArray arg_0_arg_1;
+
+void textureSampleGrad_bbb58f() {
+  vec4 res = textureGrad(arg_0_arg_1, vec4(0.0f, 0.0f, 0.0f, float(1u)), vec3(0.0f), vec3(0.0f));
+}
+
+void compute_main() {
+  textureSampleGrad_bbb58f();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'samplerCubeArray' : Reserved word. 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/bbb58f.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleGrad/bbb58f.wgsl.expected.msl
new file mode 100644
index 0000000..2cf113e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleGrad/bbb58f.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureSampleGrad_bbb58f(texturecube_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+  float4 res = tint_symbol_1.sample(tint_symbol_2, float3(0.0f), 1u, gradientcube(float3(0.0f), float3(0.0f)));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texturecube_array<float, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+  textureSampleGrad_bbb58f(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texturecube_array<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texturecube_array<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+  textureSampleGrad_bbb58f(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texturecube_array<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+  textureSampleGrad_bbb58f(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/bbb58f.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleGrad/bbb58f.wgsl.expected.spvasm
new file mode 100644
index 0000000..35a94b9
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleGrad/bbb58f.wgsl.expected.spvasm
@@ -0,0 +1,88 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 47
+; Schema: 0
+               OpCapability Shader
+               OpCapability SampledCubeArray
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %arg_1 "arg_1"
+               OpName %textureSampleGrad_bbb58f "textureSampleGrad_bbb58f"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %arg_1 DescriptorSet 1
+               OpDecorate %arg_1 Binding 1
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float Cube 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+         %14 = OpTypeSampler
+%_ptr_UniformConstant_14 = OpTypePointer UniformConstant %14
+      %arg_1 = OpVariable %_ptr_UniformConstant_14 UniformConstant
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+         %22 = OpTypeSampledImage %11
+    %float_0 = OpConstant %float 0
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+    %v3float = OpTypeVector %float 3
+         %30 = OpConstantNull %v3float
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+         %33 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureSampleGrad_bbb58f = OpFunction %void None %15
+         %18 = OpLabel
+        %res = OpVariable %_ptr_Function_v4float Function %5
+         %20 = OpLoad %14 %arg_1
+         %21 = OpLoad %11 %arg_0
+         %23 = OpSampledImage %22 %21 %20
+         %25 = OpConvertUToF %float %uint_1
+         %28 = OpCompositeConstruct %v4float %float_0 %float_0 %float_0 %25
+         %19 = OpImageSampleExplicitLod %v4float %23 %28 Grad %30 %30
+               OpStore %res %19
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %33
+         %35 = OpLabel
+         %36 = OpFunctionCall %void %textureSampleGrad_bbb58f
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %38 = OpLabel
+         %39 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %39
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %42 = OpLabel
+         %43 = OpFunctionCall %void %textureSampleGrad_bbb58f
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %45 = OpLabel
+         %46 = OpFunctionCall %void %textureSampleGrad_bbb58f
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/bbb58f.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleGrad/bbb58f.wgsl.expected.wgsl
new file mode 100644
index 0000000..b766ec2
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleGrad/bbb58f.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(0) var arg_0 : texture_cube_array<f32>;
+
+@group(1) @binding(1) var arg_1 : sampler;
+
+fn textureSampleGrad_bbb58f() {
+  var res : vec4<f32> = textureSampleGrad(arg_0, arg_1, vec3<f32>(), 1u, vec3<f32>(), vec3<f32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureSampleGrad_bbb58f();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureSampleGrad_bbb58f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureSampleGrad_bbb58f();
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/265cc7.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/265cc7.wgsl
new file mode 100644
index 0000000..2330cfb
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/265cc7.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_2d_array<f32>;
+@group(1) @binding(1) var arg_1: sampler;
+
+// fn textureSampleLevel(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: u32, level: f32) -> vec4<f32>
+fn textureSampleLevel_265cc7() {
+  var res: vec4<f32> = textureSampleLevel(arg_0, arg_1, vec2<f32>(), 1u, 1.f);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureSampleLevel_265cc7();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureSampleLevel_265cc7();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureSampleLevel_265cc7();
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/265cc7.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleLevel/265cc7.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..bb13673
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/265cc7.wgsl.expected.dxc.hlsl
@@ -0,0 +1,33 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSampleLevel_265cc7() {
+  float4 res = arg_0.SampleLevel(arg_1, float3(0.0f, 0.0f, float(1u)), 1.0f);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureSampleLevel_265cc7();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureSampleLevel_265cc7();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureSampleLevel_265cc7();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/265cc7.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleLevel/265cc7.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..bb13673
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/265cc7.wgsl.expected.fxc.hlsl
@@ -0,0 +1,33 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSampleLevel_265cc7() {
+  float4 res = arg_0.SampleLevel(arg_1, float3(0.0f, 0.0f, float(1u)), 1.0f);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureSampleLevel_265cc7();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureSampleLevel_265cc7();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureSampleLevel_265cc7();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/265cc7.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSampleLevel/265cc7.wgsl.expected.glsl
new file mode 100644
index 0000000..454d56b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/265cc7.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+
+uniform highp sampler2DArray arg_0_arg_1;
+
+void textureSampleLevel_265cc7() {
+  vec4 res = textureLod(arg_0_arg_1, vec3(0.0f, 0.0f, float(1u)), 1.0f);
+}
+
+vec4 vertex_main() {
+  textureSampleLevel_265cc7();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2DArray arg_0_arg_1;
+
+void textureSampleLevel_265cc7() {
+  vec4 res = textureLod(arg_0_arg_1, vec3(0.0f, 0.0f, float(1u)), 1.0f);
+}
+
+void fragment_main() {
+  textureSampleLevel_265cc7();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp sampler2DArray arg_0_arg_1;
+
+void textureSampleLevel_265cc7() {
+  vec4 res = textureLod(arg_0_arg_1, vec3(0.0f, 0.0f, float(1u)), 1.0f);
+}
+
+void compute_main() {
+  textureSampleLevel_265cc7();
+}
+
+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/textureSampleLevel/265cc7.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleLevel/265cc7.wgsl.expected.msl
new file mode 100644
index 0000000..c512ee7
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/265cc7.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureSampleLevel_265cc7(texture2d_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+  float4 res = tint_symbol_1.sample(tint_symbol_2, float2(0.0f), 1u, level(1.0f));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<float, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+  textureSampleLevel_265cc7(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+  textureSampleLevel_265cc7(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+  textureSampleLevel_265cc7(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/265cc7.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleLevel/265cc7.wgsl.expected.spvasm
new file mode 100644
index 0000000..1d5cd88
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/265cc7.wgsl.expected.spvasm
@@ -0,0 +1,86 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 46
+; 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 %arg_1 "arg_1"
+               OpName %textureSampleLevel_265cc7 "textureSampleLevel_265cc7"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %arg_1 DescriptorSet 1
+               OpDecorate %arg_1 Binding 1
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+         %14 = OpTypeSampler
+%_ptr_UniformConstant_14 = OpTypePointer UniformConstant %14
+      %arg_1 = OpVariable %_ptr_UniformConstant_14 UniformConstant
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+         %22 = OpTypeSampledImage %11
+    %v3float = OpTypeVector %float 3
+    %float_0 = OpConstant %float 0
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+    %float_1 = OpConstant %float 1
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+         %33 = OpTypeFunction %v4float
+%textureSampleLevel_265cc7 = OpFunction %void None %15
+         %18 = OpLabel
+        %res = OpVariable %_ptr_Function_v4float Function %5
+         %20 = OpLoad %14 %arg_1
+         %21 = OpLoad %11 %arg_0
+         %23 = OpSampledImage %22 %21 %20
+         %26 = OpConvertUToF %float %uint_1
+         %29 = OpCompositeConstruct %v3float %float_0 %float_0 %26
+         %19 = OpImageSampleExplicitLod %v4float %23 %29 Lod %float_1
+               OpStore %res %19
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %33
+         %35 = OpLabel
+         %36 = OpFunctionCall %void %textureSampleLevel_265cc7
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %38 = OpLabel
+         %39 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %39
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %41 = OpLabel
+         %42 = OpFunctionCall %void %textureSampleLevel_265cc7
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %44 = OpLabel
+         %45 = OpFunctionCall %void %textureSampleLevel_265cc7
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/265cc7.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/265cc7.wgsl.expected.wgsl
new file mode 100644
index 0000000..00932fa
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/265cc7.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(0) var arg_0 : texture_2d_array<f32>;
+
+@group(1) @binding(1) var arg_1 : sampler;
+
+fn textureSampleLevel_265cc7() {
+  var res : vec4<f32> = textureSampleLevel(arg_0, arg_1, vec2<f32>(), 1u, 1.0f);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureSampleLevel_265cc7();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureSampleLevel_265cc7();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureSampleLevel_265cc7();
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/615583.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/615583.wgsl
new file mode 100644
index 0000000..6552683
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/615583.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_depth_2d_array;
+@group(1) @binding(1) var arg_1: sampler;
+
+// fn textureSampleLevel(texture: texture_depth_2d_array, sampler: sampler, coords: vec2<f32>, array_index: u32, level: u32) -> f32
+fn textureSampleLevel_615583() {
+  var res: f32 = textureSampleLevel(arg_0, arg_1, vec2<f32>(), 1u, 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureSampleLevel_615583();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureSampleLevel_615583();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureSampleLevel_615583();
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/615583.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleLevel/615583.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..634fa95
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/615583.wgsl.expected.dxc.hlsl
@@ -0,0 +1,33 @@
+Texture2DArray arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSampleLevel_615583() {
+  float res = arg_0.SampleLevel(arg_1, float3(0.0f, 0.0f, float(1u)), 1u).x;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureSampleLevel_615583();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureSampleLevel_615583();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureSampleLevel_615583();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/615583.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleLevel/615583.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..634fa95
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/615583.wgsl.expected.fxc.hlsl
@@ -0,0 +1,33 @@
+Texture2DArray arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSampleLevel_615583() {
+  float res = arg_0.SampleLevel(arg_1, float3(0.0f, 0.0f, float(1u)), 1u).x;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureSampleLevel_615583();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureSampleLevel_615583();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureSampleLevel_615583();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/615583.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSampleLevel/615583.wgsl.expected.glsl
new file mode 100644
index 0000000..8eff1cb
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/615583.wgsl.expected.glsl
@@ -0,0 +1,78 @@
+SKIP: FAILED
+
+#version 310 es
+
+uniform highp sampler2DArrayShadow arg_0_arg_1;
+
+void textureSampleLevel_615583() {
+  float res = textureLod(arg_0_arg_1, vec4(0.0f, 0.0f, float(1u), 0.0f), float(1u));
+}
+
+vec4 vertex_main() {
+  textureSampleLevel_615583();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:6: 'textureLod' : no matching overloaded function found 
+ERROR: 0:6: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2DArrayShadow arg_0_arg_1;
+
+void textureSampleLevel_615583() {
+  float res = textureLod(arg_0_arg_1, vec4(0.0f, 0.0f, float(1u), 0.0f), float(1u));
+}
+
+void fragment_main() {
+  textureSampleLevel_615583();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:7: 'textureLod' : no matching overloaded function found 
+ERROR: 0:7: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+uniform highp sampler2DArrayShadow arg_0_arg_1;
+
+void textureSampleLevel_615583() {
+  float res = textureLod(arg_0_arg_1, vec4(0.0f, 0.0f, float(1u), 0.0f), float(1u));
+}
+
+void compute_main() {
+  textureSampleLevel_615583();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:6: 'textureLod' : no matching overloaded function found 
+ERROR: 0:6: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/615583.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleLevel/615583.wgsl.expected.msl
new file mode 100644
index 0000000..8647ff8
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/615583.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureSampleLevel_615583(depth2d_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+  float res = tint_symbol_1.sample(tint_symbol_2, float2(0.0f), 1u, level(1u));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(depth2d_array<float, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+  textureSampleLevel_615583(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(depth2d_array<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(depth2d_array<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+  textureSampleLevel_615583(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(depth2d_array<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+  textureSampleLevel_615583(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/615583.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleLevel/615583.wgsl.expected.spvasm
new file mode 100644
index 0000000..999d156
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/615583.wgsl.expected.spvasm
@@ -0,0 +1,88 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 48
+; 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 %arg_1 "arg_1"
+               OpName %textureSampleLevel_615583 "textureSampleLevel_615583"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %arg_1 DescriptorSet 1
+               OpDecorate %arg_1 Binding 1
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+         %14 = OpTypeSampler
+%_ptr_UniformConstant_14 = OpTypePointer UniformConstant %14
+      %arg_1 = OpVariable %_ptr_UniformConstant_14 UniformConstant
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+         %23 = OpTypeSampledImage %11
+    %v3float = OpTypeVector %float 3
+    %float_0 = OpConstant %float 0
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_float = OpTypePointer Function %float
+         %34 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureSampleLevel_615583 = OpFunction %void None %15
+         %18 = OpLabel
+        %res = OpVariable %_ptr_Function_float Function %8
+         %21 = OpLoad %14 %arg_1
+         %22 = OpLoad %11 %arg_0
+         %24 = OpSampledImage %23 %22 %21
+         %27 = OpConvertUToF %float %uint_1
+         %30 = OpCompositeConstruct %v3float %float_0 %float_0 %27
+         %31 = OpConvertSToF %float %uint_1
+         %20 = OpImageSampleExplicitLod %v4float %24 %30 Lod %31
+         %19 = OpCompositeExtract %float %20 0
+               OpStore %res %19
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %34
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %textureSampleLevel_615583
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %39 = OpLabel
+         %40 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %40
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %43 = OpLabel
+         %44 = OpFunctionCall %void %textureSampleLevel_615583
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %46 = OpLabel
+         %47 = OpFunctionCall %void %textureSampleLevel_615583
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/615583.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/615583.wgsl.expected.wgsl
new file mode 100644
index 0000000..149d95c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/615583.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(0) var arg_0 : texture_depth_2d_array;
+
+@group(1) @binding(1) var arg_1 : sampler;
+
+fn textureSampleLevel_615583() {
+  var res : f32 = textureSampleLevel(arg_0, arg_1, vec2<f32>(), 1u, 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureSampleLevel_615583();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureSampleLevel_615583();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureSampleLevel_615583();
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/73e892.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/73e892.wgsl
new file mode 100644
index 0000000..4bf7198
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/73e892.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_depth_2d;
+@group(1) @binding(1) var arg_1: sampler;
+
+// fn textureSampleLevel(texture: texture_depth_2d, sampler: sampler, coords: vec2<f32>, level: u32) -> f32
+fn textureSampleLevel_73e892() {
+  var res: f32 = textureSampleLevel(arg_0, arg_1, vec2<f32>(), 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureSampleLevel_73e892();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureSampleLevel_73e892();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureSampleLevel_73e892();
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/73e892.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleLevel/73e892.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..96a9806
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/73e892.wgsl.expected.dxc.hlsl
@@ -0,0 +1,33 @@
+Texture2D arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSampleLevel_73e892() {
+  float res = arg_0.SampleLevel(arg_1, (0.0f).xx, 1u).x;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureSampleLevel_73e892();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureSampleLevel_73e892();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureSampleLevel_73e892();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/73e892.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleLevel/73e892.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..96a9806
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/73e892.wgsl.expected.fxc.hlsl
@@ -0,0 +1,33 @@
+Texture2D arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSampleLevel_73e892() {
+  float res = arg_0.SampleLevel(arg_1, (0.0f).xx, 1u).x;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureSampleLevel_73e892();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureSampleLevel_73e892();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureSampleLevel_73e892();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/73e892.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSampleLevel/73e892.wgsl.expected.glsl
new file mode 100644
index 0000000..9713397
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/73e892.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+
+uniform highp sampler2DShadow arg_0_arg_1;
+
+void textureSampleLevel_73e892() {
+  float res = textureLod(arg_0_arg_1, vec3(0.0f, 0.0f, 0.0f), float(1u));
+}
+
+vec4 vertex_main() {
+  textureSampleLevel_73e892();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2DShadow arg_0_arg_1;
+
+void textureSampleLevel_73e892() {
+  float res = textureLod(arg_0_arg_1, vec3(0.0f, 0.0f, 0.0f), float(1u));
+}
+
+void fragment_main() {
+  textureSampleLevel_73e892();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp sampler2DShadow arg_0_arg_1;
+
+void textureSampleLevel_73e892() {
+  float res = textureLod(arg_0_arg_1, vec3(0.0f, 0.0f, 0.0f), float(1u));
+}
+
+void compute_main() {
+  textureSampleLevel_73e892();
+}
+
+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/textureSampleLevel/73e892.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleLevel/73e892.wgsl.expected.msl
new file mode 100644
index 0000000..4ab087d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/73e892.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureSampleLevel_73e892(depth2d<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+  float res = tint_symbol_1.sample(tint_symbol_2, float2(0.0f), level(1u));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(depth2d<float, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+  textureSampleLevel_73e892(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(depth2d<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(depth2d<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+  textureSampleLevel_73e892(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(depth2d<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+  textureSampleLevel_73e892(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/73e892.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleLevel/73e892.wgsl.expected.spvasm
new file mode 100644
index 0000000..821a1ce
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/73e892.wgsl.expected.spvasm
@@ -0,0 +1,86 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 46
+; 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 %arg_1 "arg_1"
+               OpName %textureSampleLevel_73e892 "textureSampleLevel_73e892"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %arg_1 DescriptorSet 1
+               OpDecorate %arg_1 Binding 1
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+         %14 = OpTypeSampler
+%_ptr_UniformConstant_14 = OpTypePointer UniformConstant %14
+      %arg_1 = OpVariable %_ptr_UniformConstant_14 UniformConstant
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+         %23 = OpTypeSampledImage %11
+    %v2float = OpTypeVector %float 2
+         %26 = OpConstantNull %v2float
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_float = OpTypePointer Function %float
+         %32 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureSampleLevel_73e892 = OpFunction %void None %15
+         %18 = OpLabel
+        %res = OpVariable %_ptr_Function_float Function %8
+         %21 = OpLoad %14 %arg_1
+         %22 = OpLoad %11 %arg_0
+         %24 = OpSampledImage %23 %22 %21
+         %27 = OpConvertSToF %float %uint_1
+         %20 = OpImageSampleExplicitLod %v4float %24 %26 Lod %27
+         %19 = OpCompositeExtract %float %20 0
+               OpStore %res %19
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %32
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %textureSampleLevel_73e892
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %37 = OpLabel
+         %38 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %38
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %41 = OpLabel
+         %42 = OpFunctionCall %void %textureSampleLevel_73e892
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %44 = OpLabel
+         %45 = OpFunctionCall %void %textureSampleLevel_73e892
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/73e892.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/73e892.wgsl.expected.wgsl
new file mode 100644
index 0000000..9c08bdd
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/73e892.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(0) var arg_0 : texture_depth_2d;
+
+@group(1) @binding(1) var arg_1 : sampler;
+
+fn textureSampleLevel_73e892() {
+  var res : f32 = textureSampleLevel(arg_0, arg_1, vec2<f32>(), 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureSampleLevel_73e892();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureSampleLevel_73e892();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureSampleLevel_73e892();
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/941a53.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/941a53.wgsl
new file mode 100644
index 0000000..808785e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/941a53.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_depth_cube_array;
+@group(1) @binding(1) var arg_1: sampler;
+
+// fn textureSampleLevel(texture: texture_depth_cube_array, sampler: sampler, coords: vec3<f32>, array_index: u32, level: u32) -> f32
+fn textureSampleLevel_941a53() {
+  var res: f32 = textureSampleLevel(arg_0, arg_1, vec3<f32>(), 1u, 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureSampleLevel_941a53();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureSampleLevel_941a53();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureSampleLevel_941a53();
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/941a53.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleLevel/941a53.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..45085b5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/941a53.wgsl.expected.dxc.hlsl
@@ -0,0 +1,33 @@
+TextureCubeArray arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSampleLevel_941a53() {
+  float res = arg_0.SampleLevel(arg_1, float4(0.0f, 0.0f, 0.0f, float(1u)), 1u).x;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureSampleLevel_941a53();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureSampleLevel_941a53();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureSampleLevel_941a53();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/941a53.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleLevel/941a53.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..45085b5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/941a53.wgsl.expected.fxc.hlsl
@@ -0,0 +1,33 @@
+TextureCubeArray arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSampleLevel_941a53() {
+  float res = arg_0.SampleLevel(arg_1, float4(0.0f, 0.0f, 0.0f, float(1u)), 1u).x;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureSampleLevel_941a53();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureSampleLevel_941a53();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureSampleLevel_941a53();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/941a53.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSampleLevel/941a53.wgsl.expected.glsl
new file mode 100644
index 0000000..774f102
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/941a53.wgsl.expected.glsl
@@ -0,0 +1,78 @@
+SKIP: FAILED
+
+#version 310 es
+
+uniform highp samplerCubeArrayShadow arg_0_arg_1;
+
+void textureSampleLevel_941a53() {
+  float res = textureLod(arg_0_arg_1, vec4(0.0f, 0.0f, 0.0f, float(1u)), float(1u));
+}
+
+vec4 vertex_main() {
+  textureSampleLevel_941a53();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  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: 'samplerCubeArrayShadow' : Reserved word. 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+uniform highp samplerCubeArrayShadow arg_0_arg_1;
+
+void textureSampleLevel_941a53() {
+  float res = textureLod(arg_0_arg_1, vec4(0.0f, 0.0f, 0.0f, float(1u)), float(1u));
+}
+
+void fragment_main() {
+  textureSampleLevel_941a53();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'samplerCubeArrayShadow' : Reserved word. 
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+uniform highp samplerCubeArrayShadow arg_0_arg_1;
+
+void textureSampleLevel_941a53() {
+  float res = textureLod(arg_0_arg_1, vec4(0.0f, 0.0f, 0.0f, float(1u)), float(1u));
+}
+
+void compute_main() {
+  textureSampleLevel_941a53();
+}
+
+layout(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: 'samplerCubeArrayShadow' : Reserved word. 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/941a53.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleLevel/941a53.wgsl.expected.msl
new file mode 100644
index 0000000..148a594
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/941a53.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureSampleLevel_941a53(depthcube_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+  float res = tint_symbol_1.sample(tint_symbol_2, float3(0.0f), 1u, level(1u));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(depthcube_array<float, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+  textureSampleLevel_941a53(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(depthcube_array<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(depthcube_array<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+  textureSampleLevel_941a53(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(depthcube_array<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+  textureSampleLevel_941a53(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/941a53.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleLevel/941a53.wgsl.expected.spvasm
new file mode 100644
index 0000000..5bc015b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/941a53.wgsl.expected.spvasm
@@ -0,0 +1,88 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 47
+; Schema: 0
+               OpCapability Shader
+               OpCapability SampledCubeArray
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %arg_1 "arg_1"
+               OpName %textureSampleLevel_941a53 "textureSampleLevel_941a53"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %arg_1 DescriptorSet 1
+               OpDecorate %arg_1 Binding 1
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float Cube 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+         %14 = OpTypeSampler
+%_ptr_UniformConstant_14 = OpTypePointer UniformConstant %14
+      %arg_1 = OpVariable %_ptr_UniformConstant_14 UniformConstant
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+         %23 = OpTypeSampledImage %11
+    %float_0 = OpConstant %float 0
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_float = OpTypePointer Function %float
+         %33 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureSampleLevel_941a53 = OpFunction %void None %15
+         %18 = OpLabel
+        %res = OpVariable %_ptr_Function_float Function %8
+         %21 = OpLoad %14 %arg_1
+         %22 = OpLoad %11 %arg_0
+         %24 = OpSampledImage %23 %22 %21
+         %26 = OpConvertUToF %float %uint_1
+         %29 = OpCompositeConstruct %v4float %float_0 %float_0 %float_0 %26
+         %30 = OpConvertSToF %float %uint_1
+         %20 = OpImageSampleExplicitLod %v4float %24 %29 Lod %30
+         %19 = OpCompositeExtract %float %20 0
+               OpStore %res %19
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %33
+         %35 = OpLabel
+         %36 = OpFunctionCall %void %textureSampleLevel_941a53
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %38 = OpLabel
+         %39 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %39
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %42 = OpLabel
+         %43 = OpFunctionCall %void %textureSampleLevel_941a53
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %45 = OpLabel
+         %46 = OpFunctionCall %void %textureSampleLevel_941a53
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/941a53.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/941a53.wgsl.expected.wgsl
new file mode 100644
index 0000000..66ad48b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/941a53.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(0) var arg_0 : texture_depth_cube_array;
+
+@group(1) @binding(1) var arg_1 : sampler;
+
+fn textureSampleLevel_941a53() {
+  var res : f32 = textureSampleLevel(arg_0, arg_1, vec3<f32>(), 1u, 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureSampleLevel_941a53();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureSampleLevel_941a53();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureSampleLevel_941a53();
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/aab3b9.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/aab3b9.wgsl
new file mode 100644
index 0000000..47bc418
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/aab3b9.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_cube_array<f32>;
+@group(1) @binding(1) var arg_1: sampler;
+
+// fn textureSampleLevel(texture: texture_cube_array<f32>, sampler: sampler, coords: vec3<f32>, array_index: u32, level: f32) -> vec4<f32>
+fn textureSampleLevel_aab3b9() {
+  var res: vec4<f32> = textureSampleLevel(arg_0, arg_1, vec3<f32>(), 1u, 1.f);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureSampleLevel_aab3b9();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureSampleLevel_aab3b9();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureSampleLevel_aab3b9();
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/aab3b9.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleLevel/aab3b9.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..3ff9d7d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/aab3b9.wgsl.expected.dxc.hlsl
@@ -0,0 +1,33 @@
+TextureCubeArray<float4> arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSampleLevel_aab3b9() {
+  float4 res = arg_0.SampleLevel(arg_1, float4(0.0f, 0.0f, 0.0f, float(1u)), 1.0f);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureSampleLevel_aab3b9();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureSampleLevel_aab3b9();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureSampleLevel_aab3b9();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/aab3b9.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleLevel/aab3b9.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..3ff9d7d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/aab3b9.wgsl.expected.fxc.hlsl
@@ -0,0 +1,33 @@
+TextureCubeArray<float4> arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSampleLevel_aab3b9() {
+  float4 res = arg_0.SampleLevel(arg_1, float4(0.0f, 0.0f, 0.0f, float(1u)), 1.0f);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureSampleLevel_aab3b9();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureSampleLevel_aab3b9();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureSampleLevel_aab3b9();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/aab3b9.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSampleLevel/aab3b9.wgsl.expected.glsl
new file mode 100644
index 0000000..71141d5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/aab3b9.wgsl.expected.glsl
@@ -0,0 +1,78 @@
+SKIP: FAILED
+
+#version 310 es
+
+uniform highp samplerCubeArray arg_0_arg_1;
+
+void textureSampleLevel_aab3b9() {
+  vec4 res = textureLod(arg_0_arg_1, vec4(0.0f, 0.0f, 0.0f, float(1u)), 1.0f);
+}
+
+vec4 vertex_main() {
+  textureSampleLevel_aab3b9();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'samplerCubeArray' : Reserved word. 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+uniform highp samplerCubeArray arg_0_arg_1;
+
+void textureSampleLevel_aab3b9() {
+  vec4 res = textureLod(arg_0_arg_1, vec4(0.0f, 0.0f, 0.0f, float(1u)), 1.0f);
+}
+
+void fragment_main() {
+  textureSampleLevel_aab3b9();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'samplerCubeArray' : Reserved word. 
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+uniform highp samplerCubeArray arg_0_arg_1;
+
+void textureSampleLevel_aab3b9() {
+  vec4 res = textureLod(arg_0_arg_1, vec4(0.0f, 0.0f, 0.0f, float(1u)), 1.0f);
+}
+
+void compute_main() {
+  textureSampleLevel_aab3b9();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'samplerCubeArray' : Reserved word. 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/aab3b9.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleLevel/aab3b9.wgsl.expected.msl
new file mode 100644
index 0000000..e1f41e0
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/aab3b9.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureSampleLevel_aab3b9(texturecube_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+  float4 res = tint_symbol_1.sample(tint_symbol_2, float3(0.0f), 1u, level(1.0f));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texturecube_array<float, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+  textureSampleLevel_aab3b9(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texturecube_array<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texturecube_array<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+  textureSampleLevel_aab3b9(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texturecube_array<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+  textureSampleLevel_aab3b9(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/aab3b9.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleLevel/aab3b9.wgsl.expected.spvasm
new file mode 100644
index 0000000..272d846
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/aab3b9.wgsl.expected.spvasm
@@ -0,0 +1,86 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 45
+; Schema: 0
+               OpCapability Shader
+               OpCapability SampledCubeArray
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %arg_1 "arg_1"
+               OpName %textureSampleLevel_aab3b9 "textureSampleLevel_aab3b9"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %arg_1 DescriptorSet 1
+               OpDecorate %arg_1 Binding 1
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float Cube 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+         %14 = OpTypeSampler
+%_ptr_UniformConstant_14 = OpTypePointer UniformConstant %14
+      %arg_1 = OpVariable %_ptr_UniformConstant_14 UniformConstant
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+         %22 = OpTypeSampledImage %11
+    %float_0 = OpConstant %float 0
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+    %float_1 = OpConstant %float 1
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+         %32 = OpTypeFunction %v4float
+%textureSampleLevel_aab3b9 = OpFunction %void None %15
+         %18 = OpLabel
+        %res = OpVariable %_ptr_Function_v4float Function %5
+         %20 = OpLoad %14 %arg_1
+         %21 = OpLoad %11 %arg_0
+         %23 = OpSampledImage %22 %21 %20
+         %25 = OpConvertUToF %float %uint_1
+         %28 = OpCompositeConstruct %v4float %float_0 %float_0 %float_0 %25
+         %19 = OpImageSampleExplicitLod %v4float %23 %28 Lod %float_1
+               OpStore %res %19
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %32
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %textureSampleLevel_aab3b9
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %37 = OpLabel
+         %38 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %38
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %textureSampleLevel_aab3b9
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %43 = OpLabel
+         %44 = OpFunctionCall %void %textureSampleLevel_aab3b9
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/aab3b9.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/aab3b9.wgsl.expected.wgsl
new file mode 100644
index 0000000..237662c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/aab3b9.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(0) var arg_0 : texture_cube_array<f32>;
+
+@group(1) @binding(1) var arg_1 : sampler;
+
+fn textureSampleLevel_aab3b9() {
+  var res : vec4<f32> = textureSampleLevel(arg_0, arg_1, vec3<f32>(), 1u, 1.0f);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureSampleLevel_aab3b9();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureSampleLevel_aab3b9();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureSampleLevel_aab3b9();
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/ae92a2.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/ae92a2.wgsl
new file mode 100644
index 0000000..c352dee
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/ae92a2.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_depth_cube;
+@group(1) @binding(1) var arg_1: sampler;
+
+// fn textureSampleLevel(texture: texture_depth_cube, sampler: sampler, coords: vec3<f32>, level: u32) -> f32
+fn textureSampleLevel_ae92a2() {
+  var res: f32 = textureSampleLevel(arg_0, arg_1, vec3<f32>(), 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureSampleLevel_ae92a2();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureSampleLevel_ae92a2();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureSampleLevel_ae92a2();
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/ae92a2.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleLevel/ae92a2.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..f0daf77
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/ae92a2.wgsl.expected.dxc.hlsl
@@ -0,0 +1,33 @@
+TextureCube arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSampleLevel_ae92a2() {
+  float res = arg_0.SampleLevel(arg_1, (0.0f).xxx, 1u).x;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureSampleLevel_ae92a2();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureSampleLevel_ae92a2();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureSampleLevel_ae92a2();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/ae92a2.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleLevel/ae92a2.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..f0daf77
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/ae92a2.wgsl.expected.fxc.hlsl
@@ -0,0 +1,33 @@
+TextureCube arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSampleLevel_ae92a2() {
+  float res = arg_0.SampleLevel(arg_1, (0.0f).xxx, 1u).x;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureSampleLevel_ae92a2();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureSampleLevel_ae92a2();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureSampleLevel_ae92a2();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/ae92a2.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSampleLevel/ae92a2.wgsl.expected.glsl
new file mode 100644
index 0000000..2e11ac2
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/ae92a2.wgsl.expected.glsl
@@ -0,0 +1,78 @@
+SKIP: FAILED
+
+#version 310 es
+
+uniform highp samplerCubeShadow arg_0_arg_1;
+
+void textureSampleLevel_ae92a2() {
+  float res = textureLod(arg_0_arg_1, vec4(0.0f, 0.0f, 0.0f, 0.0f), float(1u));
+}
+
+vec4 vertex_main() {
+  textureSampleLevel_ae92a2();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:6: 'textureLod' : no matching overloaded function found 
+ERROR: 0:6: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+uniform highp samplerCubeShadow arg_0_arg_1;
+
+void textureSampleLevel_ae92a2() {
+  float res = textureLod(arg_0_arg_1, vec4(0.0f, 0.0f, 0.0f, 0.0f), float(1u));
+}
+
+void fragment_main() {
+  textureSampleLevel_ae92a2();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:7: 'textureLod' : no matching overloaded function found 
+ERROR: 0:7: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+uniform highp samplerCubeShadow arg_0_arg_1;
+
+void textureSampleLevel_ae92a2() {
+  float res = textureLod(arg_0_arg_1, vec4(0.0f, 0.0f, 0.0f, 0.0f), float(1u));
+}
+
+void compute_main() {
+  textureSampleLevel_ae92a2();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:6: 'textureLod' : no matching overloaded function found 
+ERROR: 0:6: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/ae92a2.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleLevel/ae92a2.wgsl.expected.msl
new file mode 100644
index 0000000..fe37bb0
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/ae92a2.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureSampleLevel_ae92a2(depthcube<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+  float res = tint_symbol_1.sample(tint_symbol_2, float3(0.0f), level(1u));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(depthcube<float, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+  textureSampleLevel_ae92a2(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(depthcube<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(depthcube<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+  textureSampleLevel_ae92a2(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(depthcube<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+  textureSampleLevel_ae92a2(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/ae92a2.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleLevel/ae92a2.wgsl.expected.spvasm
new file mode 100644
index 0000000..0f6a549
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/ae92a2.wgsl.expected.spvasm
@@ -0,0 +1,86 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 46
+; 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 %arg_1 "arg_1"
+               OpName %textureSampleLevel_ae92a2 "textureSampleLevel_ae92a2"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %arg_1 DescriptorSet 1
+               OpDecorate %arg_1 Binding 1
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float Cube 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+         %14 = OpTypeSampler
+%_ptr_UniformConstant_14 = OpTypePointer UniformConstant %14
+      %arg_1 = OpVariable %_ptr_UniformConstant_14 UniformConstant
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+         %23 = OpTypeSampledImage %11
+    %v3float = OpTypeVector %float 3
+         %26 = OpConstantNull %v3float
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_float = OpTypePointer Function %float
+         %32 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureSampleLevel_ae92a2 = OpFunction %void None %15
+         %18 = OpLabel
+        %res = OpVariable %_ptr_Function_float Function %8
+         %21 = OpLoad %14 %arg_1
+         %22 = OpLoad %11 %arg_0
+         %24 = OpSampledImage %23 %22 %21
+         %27 = OpConvertSToF %float %uint_1
+         %20 = OpImageSampleExplicitLod %v4float %24 %26 Lod %27
+         %19 = OpCompositeExtract %float %20 0
+               OpStore %res %19
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %32
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %textureSampleLevel_ae92a2
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %37 = OpLabel
+         %38 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %38
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %41 = OpLabel
+         %42 = OpFunctionCall %void %textureSampleLevel_ae92a2
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %44 = OpLabel
+         %45 = OpFunctionCall %void %textureSampleLevel_ae92a2
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/ae92a2.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/ae92a2.wgsl.expected.wgsl
new file mode 100644
index 0000000..c485be4
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/ae92a2.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(0) var arg_0 : texture_depth_cube;
+
+@group(1) @binding(1) var arg_1 : sampler;
+
+fn textureSampleLevel_ae92a2() {
+  var res : f32 = textureSampleLevel(arg_0, arg_1, vec3<f32>(), 1u);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureSampleLevel_ae92a2();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureSampleLevel_ae92a2();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureSampleLevel_ae92a2();
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/cdfe0f.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/cdfe0f.wgsl
new file mode 100644
index 0000000..5f1ee66
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/cdfe0f.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_depth_2d_array;
+@group(1) @binding(1) var arg_1: sampler;
+
+// fn textureSampleLevel(texture: texture_depth_2d_array, sampler: sampler, coords: vec2<f32>, array_index: u32, level: u32, @const offset: vec2<i32>) -> f32
+fn textureSampleLevel_cdfe0f() {
+  var res: f32 = textureSampleLevel(arg_0, arg_1, vec2<f32>(), 1u, 1u, vec2<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureSampleLevel_cdfe0f();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureSampleLevel_cdfe0f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureSampleLevel_cdfe0f();
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/cdfe0f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleLevel/cdfe0f.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..749bfc8
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/cdfe0f.wgsl.expected.dxc.hlsl
@@ -0,0 +1,33 @@
+Texture2DArray arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSampleLevel_cdfe0f() {
+  float res = arg_0.SampleLevel(arg_1, float3(0.0f, 0.0f, float(1u)), 1u, (0).xx).x;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureSampleLevel_cdfe0f();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureSampleLevel_cdfe0f();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureSampleLevel_cdfe0f();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/cdfe0f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleLevel/cdfe0f.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..749bfc8
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/cdfe0f.wgsl.expected.fxc.hlsl
@@ -0,0 +1,33 @@
+Texture2DArray arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSampleLevel_cdfe0f() {
+  float res = arg_0.SampleLevel(arg_1, float3(0.0f, 0.0f, float(1u)), 1u, (0).xx).x;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureSampleLevel_cdfe0f();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureSampleLevel_cdfe0f();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureSampleLevel_cdfe0f();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/cdfe0f.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSampleLevel/cdfe0f.wgsl.expected.glsl
new file mode 100644
index 0000000..db5abed
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/cdfe0f.wgsl.expected.glsl
@@ -0,0 +1,78 @@
+SKIP: FAILED
+
+#version 310 es
+
+uniform highp sampler2DArrayShadow arg_0_arg_1;
+
+void textureSampleLevel_cdfe0f() {
+  float res = textureLodOffset(arg_0_arg_1, vec4(0.0f, 0.0f, float(1u), 0.0f), float(1u), ivec2(0));
+}
+
+vec4 vertex_main() {
+  textureSampleLevel_cdfe0f();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:6: 'textureLodOffset' : no matching overloaded function found 
+ERROR: 0:6: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2DArrayShadow arg_0_arg_1;
+
+void textureSampleLevel_cdfe0f() {
+  float res = textureLodOffset(arg_0_arg_1, vec4(0.0f, 0.0f, float(1u), 0.0f), float(1u), ivec2(0));
+}
+
+void fragment_main() {
+  textureSampleLevel_cdfe0f();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:7: 'textureLodOffset' : no matching overloaded function found 
+ERROR: 0:7: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+uniform highp sampler2DArrayShadow arg_0_arg_1;
+
+void textureSampleLevel_cdfe0f() {
+  float res = textureLodOffset(arg_0_arg_1, vec4(0.0f, 0.0f, float(1u), 0.0f), float(1u), ivec2(0));
+}
+
+void compute_main() {
+  textureSampleLevel_cdfe0f();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:6: 'textureLodOffset' : no matching overloaded function found 
+ERROR: 0:6: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/cdfe0f.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleLevel/cdfe0f.wgsl.expected.msl
new file mode 100644
index 0000000..693c3f3
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/cdfe0f.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureSampleLevel_cdfe0f(depth2d_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+  float res = tint_symbol_1.sample(tint_symbol_2, float2(0.0f), 1u, level(1u), int2(0));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(depth2d_array<float, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+  textureSampleLevel_cdfe0f(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(depth2d_array<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(depth2d_array<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+  textureSampleLevel_cdfe0f(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(depth2d_array<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+  textureSampleLevel_cdfe0f(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/cdfe0f.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleLevel/cdfe0f.wgsl.expected.spvasm
new file mode 100644
index 0000000..62f94db
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/cdfe0f.wgsl.expected.spvasm
@@ -0,0 +1,91 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 51
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %arg_1 "arg_1"
+               OpName %textureSampleLevel_cdfe0f "textureSampleLevel_cdfe0f"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %arg_1 DescriptorSet 1
+               OpDecorate %arg_1 Binding 1
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+         %14 = OpTypeSampler
+%_ptr_UniformConstant_14 = OpTypePointer UniformConstant %14
+      %arg_1 = OpVariable %_ptr_UniformConstant_14 UniformConstant
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+         %23 = OpTypeSampledImage %11
+    %v3float = OpTypeVector %float 3
+    %float_0 = OpConstant %float 0
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+        %int = OpTypeInt 32 1
+      %v2int = OpTypeVector %int 2
+         %34 = OpConstantNull %v2int
+%_ptr_Function_float = OpTypePointer Function %float
+         %37 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureSampleLevel_cdfe0f = OpFunction %void None %15
+         %18 = OpLabel
+        %res = OpVariable %_ptr_Function_float Function %8
+         %21 = OpLoad %14 %arg_1
+         %22 = OpLoad %11 %arg_0
+         %24 = OpSampledImage %23 %22 %21
+         %27 = OpConvertUToF %float %uint_1
+         %30 = OpCompositeConstruct %v3float %float_0 %float_0 %27
+         %31 = OpConvertSToF %float %uint_1
+         %20 = OpImageSampleExplicitLod %v4float %24 %30 Lod|ConstOffset %31 %34
+         %19 = OpCompositeExtract %float %20 0
+               OpStore %res %19
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %37
+         %39 = OpLabel
+         %40 = OpFunctionCall %void %textureSampleLevel_cdfe0f
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %42 = OpLabel
+         %43 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %43
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %46 = OpLabel
+         %47 = OpFunctionCall %void %textureSampleLevel_cdfe0f
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %49 = OpLabel
+         %50 = OpFunctionCall %void %textureSampleLevel_cdfe0f
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/cdfe0f.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/cdfe0f.wgsl.expected.wgsl
new file mode 100644
index 0000000..fa05fe7
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/cdfe0f.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(0) var arg_0 : texture_depth_2d_array;
+
+@group(1) @binding(1) var arg_1 : sampler;
+
+fn textureSampleLevel_cdfe0f() {
+  var res : f32 = textureSampleLevel(arg_0, arg_1, vec2<f32>(), 1u, 1u, vec2<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureSampleLevel_cdfe0f();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureSampleLevel_cdfe0f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureSampleLevel_cdfe0f();
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/f3b2c8.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/f3b2c8.wgsl
new file mode 100644
index 0000000..0ce14c6
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/f3b2c8.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_depth_2d;
+@group(1) @binding(1) var arg_1: sampler;
+
+// fn textureSampleLevel(texture: texture_depth_2d, sampler: sampler, coords: vec2<f32>, level: u32, @const offset: vec2<i32>) -> f32
+fn textureSampleLevel_f3b2c8() {
+  var res: f32 = textureSampleLevel(arg_0, arg_1, vec2<f32>(), 1u, vec2<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureSampleLevel_f3b2c8();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureSampleLevel_f3b2c8();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureSampleLevel_f3b2c8();
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/f3b2c8.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleLevel/f3b2c8.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..81096d4
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/f3b2c8.wgsl.expected.dxc.hlsl
@@ -0,0 +1,33 @@
+Texture2D arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSampleLevel_f3b2c8() {
+  float res = arg_0.SampleLevel(arg_1, (0.0f).xx, 1u, (0).xx).x;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureSampleLevel_f3b2c8();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureSampleLevel_f3b2c8();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureSampleLevel_f3b2c8();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/f3b2c8.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleLevel/f3b2c8.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..81096d4
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/f3b2c8.wgsl.expected.fxc.hlsl
@@ -0,0 +1,33 @@
+Texture2D arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSampleLevel_f3b2c8() {
+  float res = arg_0.SampleLevel(arg_1, (0.0f).xx, 1u, (0).xx).x;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureSampleLevel_f3b2c8();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureSampleLevel_f3b2c8();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureSampleLevel_f3b2c8();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/f3b2c8.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSampleLevel/f3b2c8.wgsl.expected.glsl
new file mode 100644
index 0000000..503a1bc
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/f3b2c8.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+
+uniform highp sampler2DShadow arg_0_arg_1;
+
+void textureSampleLevel_f3b2c8() {
+  float res = textureLodOffset(arg_0_arg_1, vec3(0.0f, 0.0f, 0.0f), float(1u), ivec2(0));
+}
+
+vec4 vertex_main() {
+  textureSampleLevel_f3b2c8();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2DShadow arg_0_arg_1;
+
+void textureSampleLevel_f3b2c8() {
+  float res = textureLodOffset(arg_0_arg_1, vec3(0.0f, 0.0f, 0.0f), float(1u), ivec2(0));
+}
+
+void fragment_main() {
+  textureSampleLevel_f3b2c8();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp sampler2DShadow arg_0_arg_1;
+
+void textureSampleLevel_f3b2c8() {
+  float res = textureLodOffset(arg_0_arg_1, vec3(0.0f, 0.0f, 0.0f), float(1u), ivec2(0));
+}
+
+void compute_main() {
+  textureSampleLevel_f3b2c8();
+}
+
+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/textureSampleLevel/f3b2c8.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleLevel/f3b2c8.wgsl.expected.msl
new file mode 100644
index 0000000..1d3faea
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/f3b2c8.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureSampleLevel_f3b2c8(depth2d<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+  float res = tint_symbol_1.sample(tint_symbol_2, float2(0.0f), level(1u), int2(0));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(depth2d<float, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+  textureSampleLevel_f3b2c8(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(depth2d<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(depth2d<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+  textureSampleLevel_f3b2c8(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(depth2d<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+  textureSampleLevel_f3b2c8(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/f3b2c8.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleLevel/f3b2c8.wgsl.expected.spvasm
new file mode 100644
index 0000000..d98a8b7
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/f3b2c8.wgsl.expected.spvasm
@@ -0,0 +1,89 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 49
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %arg_1 "arg_1"
+               OpName %textureSampleLevel_f3b2c8 "textureSampleLevel_f3b2c8"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %arg_1 DescriptorSet 1
+               OpDecorate %arg_1 Binding 1
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+         %14 = OpTypeSampler
+%_ptr_UniformConstant_14 = OpTypePointer UniformConstant %14
+      %arg_1 = OpVariable %_ptr_UniformConstant_14 UniformConstant
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+         %23 = OpTypeSampledImage %11
+    %v2float = OpTypeVector %float 2
+         %26 = OpConstantNull %v2float
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+        %int = OpTypeInt 32 1
+      %v2int = OpTypeVector %int 2
+         %32 = OpConstantNull %v2int
+%_ptr_Function_float = OpTypePointer Function %float
+         %35 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureSampleLevel_f3b2c8 = OpFunction %void None %15
+         %18 = OpLabel
+        %res = OpVariable %_ptr_Function_float Function %8
+         %21 = OpLoad %14 %arg_1
+         %22 = OpLoad %11 %arg_0
+         %24 = OpSampledImage %23 %22 %21
+         %27 = OpConvertSToF %float %uint_1
+         %20 = OpImageSampleExplicitLod %v4float %24 %26 Lod|ConstOffset %27 %32
+         %19 = OpCompositeExtract %float %20 0
+               OpStore %res %19
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %35
+         %37 = OpLabel
+         %38 = OpFunctionCall %void %textureSampleLevel_f3b2c8
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %40 = OpLabel
+         %41 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %41
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %44 = OpLabel
+         %45 = OpFunctionCall %void %textureSampleLevel_f3b2c8
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %47 = OpLabel
+         %48 = OpFunctionCall %void %textureSampleLevel_f3b2c8
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/f3b2c8.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/f3b2c8.wgsl.expected.wgsl
new file mode 100644
index 0000000..8ffb28c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/f3b2c8.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(0) var arg_0 : texture_depth_2d;
+
+@group(1) @binding(1) var arg_1 : sampler;
+
+fn textureSampleLevel_f3b2c8() {
+  var res : f32 = textureSampleLevel(arg_0, arg_1, vec2<f32>(), 1u, vec2<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureSampleLevel_f3b2c8();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureSampleLevel_f3b2c8();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureSampleLevel_f3b2c8();
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/faa6d7.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/faa6d7.wgsl
new file mode 100644
index 0000000..d9217fb
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/faa6d7.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_2d_array<f32>;
+@group(1) @binding(1) var arg_1: sampler;
+
+// fn textureSampleLevel(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: u32, level: f32, @const offset: vec2<i32>) -> vec4<f32>
+fn textureSampleLevel_faa6d7() {
+  var res: vec4<f32> = textureSampleLevel(arg_0, arg_1, vec2<f32>(), 1u, 1.f, vec2<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureSampleLevel_faa6d7();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureSampleLevel_faa6d7();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureSampleLevel_faa6d7();
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/faa6d7.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleLevel/faa6d7.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..5646cef
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/faa6d7.wgsl.expected.dxc.hlsl
@@ -0,0 +1,33 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSampleLevel_faa6d7() {
+  float4 res = arg_0.SampleLevel(arg_1, float3(0.0f, 0.0f, float(1u)), 1.0f, (0).xx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureSampleLevel_faa6d7();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureSampleLevel_faa6d7();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureSampleLevel_faa6d7();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/faa6d7.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleLevel/faa6d7.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..5646cef
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/faa6d7.wgsl.expected.fxc.hlsl
@@ -0,0 +1,33 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSampleLevel_faa6d7() {
+  float4 res = arg_0.SampleLevel(arg_1, float3(0.0f, 0.0f, float(1u)), 1.0f, (0).xx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureSampleLevel_faa6d7();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureSampleLevel_faa6d7();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureSampleLevel_faa6d7();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/faa6d7.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSampleLevel/faa6d7.wgsl.expected.glsl
new file mode 100644
index 0000000..9c1734c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/faa6d7.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+
+uniform highp sampler2DArray arg_0_arg_1;
+
+void textureSampleLevel_faa6d7() {
+  vec4 res = textureLodOffset(arg_0_arg_1, vec3(0.0f, 0.0f, float(1u)), 1.0f, ivec2(0));
+}
+
+vec4 vertex_main() {
+  textureSampleLevel_faa6d7();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2DArray arg_0_arg_1;
+
+void textureSampleLevel_faa6d7() {
+  vec4 res = textureLodOffset(arg_0_arg_1, vec3(0.0f, 0.0f, float(1u)), 1.0f, ivec2(0));
+}
+
+void fragment_main() {
+  textureSampleLevel_faa6d7();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp sampler2DArray arg_0_arg_1;
+
+void textureSampleLevel_faa6d7() {
+  vec4 res = textureLodOffset(arg_0_arg_1, vec3(0.0f, 0.0f, float(1u)), 1.0f, ivec2(0));
+}
+
+void compute_main() {
+  textureSampleLevel_faa6d7();
+}
+
+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/textureSampleLevel/faa6d7.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleLevel/faa6d7.wgsl.expected.msl
new file mode 100644
index 0000000..a0039f0
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/faa6d7.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureSampleLevel_faa6d7(texture2d_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+  float4 res = tint_symbol_1.sample(tint_symbol_2, float2(0.0f), 1u, level(1.0f), int2(0));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<float, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+  textureSampleLevel_faa6d7(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+  textureSampleLevel_faa6d7(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+  textureSampleLevel_faa6d7(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/faa6d7.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleLevel/faa6d7.wgsl.expected.spvasm
new file mode 100644
index 0000000..74736ef
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/faa6d7.wgsl.expected.spvasm
@@ -0,0 +1,89 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 49
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %arg_1 "arg_1"
+               OpName %textureSampleLevel_faa6d7 "textureSampleLevel_faa6d7"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %arg_1 DescriptorSet 1
+               OpDecorate %arg_1 Binding 1
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+         %14 = OpTypeSampler
+%_ptr_UniformConstant_14 = OpTypePointer UniformConstant %14
+      %arg_1 = OpVariable %_ptr_UniformConstant_14 UniformConstant
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+         %22 = OpTypeSampledImage %11
+    %v3float = OpTypeVector %float 3
+    %float_0 = OpConstant %float 0
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+    %float_1 = OpConstant %float 1
+        %int = OpTypeInt 32 1
+      %v2int = OpTypeVector %int 2
+         %33 = OpConstantNull %v2int
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+         %36 = OpTypeFunction %v4float
+%textureSampleLevel_faa6d7 = OpFunction %void None %15
+         %18 = OpLabel
+        %res = OpVariable %_ptr_Function_v4float Function %5
+         %20 = OpLoad %14 %arg_1
+         %21 = OpLoad %11 %arg_0
+         %23 = OpSampledImage %22 %21 %20
+         %26 = OpConvertUToF %float %uint_1
+         %29 = OpCompositeConstruct %v3float %float_0 %float_0 %26
+         %19 = OpImageSampleExplicitLod %v4float %23 %29 Lod|ConstOffset %float_1 %33
+               OpStore %res %19
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %36
+         %38 = OpLabel
+         %39 = OpFunctionCall %void %textureSampleLevel_faa6d7
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %41 = OpLabel
+         %42 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %42
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %44 = OpLabel
+         %45 = OpFunctionCall %void %textureSampleLevel_faa6d7
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %47 = OpLabel
+         %48 = OpFunctionCall %void %textureSampleLevel_faa6d7
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/faa6d7.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/faa6d7.wgsl.expected.wgsl
new file mode 100644
index 0000000..14a47e4
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/faa6d7.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(0) var arg_0 : texture_2d_array<f32>;
+
+@group(1) @binding(1) var arg_1 : sampler;
+
+fn textureSampleLevel_faa6d7() {
+  var res : vec4<f32> = textureSampleLevel(arg_0, arg_1, vec2<f32>(), 1u, 1.0f, vec2<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureSampleLevel_faa6d7();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureSampleLevel_faa6d7();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureSampleLevel_faa6d7();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/07548b.wgsl b/test/tint/builtins/gen/literal/textureStore/07548b.wgsl
new file mode 100644
index 0000000..6cc3fc7
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/07548b.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_3d<rgba16sint, write>;
+
+// fn textureStore(texture: texture_storage_3d<rgba16sint, write>, coords: vec3<u32>, value: vec4<i32>)
+fn textureStore_07548b() {
+  textureStore(arg_0, vec3<u32>(), vec4<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_07548b();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_07548b();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_07548b();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/07548b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/07548b.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..7b7e09f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/07548b.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture3D<int4> arg_0 : register(u0, space1);
+
+void textureStore_07548b() {
+  arg_0[(0u).xxx] = (0).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_07548b();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_07548b();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_07548b();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/07548b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/07548b.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..7b7e09f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/07548b.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture3D<int4> arg_0 : register(u0, space1);
+
+void textureStore_07548b() {
+  arg_0[(0u).xxx] = (0).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_07548b();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_07548b();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_07548b();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/07548b.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/07548b.wgsl.expected.glsl
new file mode 100644
index 0000000..94e408b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/07548b.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+layout(rgba16i) uniform highp writeonly iimage3D arg_0;
+void textureStore_07548b() {
+  imageStore(arg_0, ivec3(uvec3(0u)), ivec4(0));
+}
+
+vec4 vertex_main() {
+  textureStore_07548b();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+layout(rgba16i) uniform highp writeonly iimage3D arg_0;
+void textureStore_07548b() {
+  imageStore(arg_0, ivec3(uvec3(0u)), ivec4(0));
+}
+
+void fragment_main() {
+  textureStore_07548b();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+layout(rgba16i) uniform highp writeonly iimage3D arg_0;
+void textureStore_07548b() {
+  imageStore(arg_0, ivec3(uvec3(0u)), ivec4(0));
+}
+
+void compute_main() {
+  textureStore_07548b();
+}
+
+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/07548b.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/07548b.wgsl.expected.msl
new file mode 100644
index 0000000..a943c9d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/07548b.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_07548b(texture3d<int, access::write> tint_symbol_1) {
+  tint_symbol_1.write(int4(0), uint3(uint3(0u)));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<int, access::write> tint_symbol_2) {
+  textureStore_07548b(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<int, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture3d<int, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureStore_07548b(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture3d<int, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureStore_07548b(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureStore/07548b.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/07548b.wgsl.expected.spvasm
new file mode 100644
index 0000000..81c6715
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/07548b.wgsl.expected.spvasm
@@ -0,0 +1,74 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 38
+; 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_07548b "textureStore_07548b"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 3D 0 0 0 2 Rgba16i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v3uint = OpTypeVector %uint 3
+         %21 = OpConstantNull %v3uint
+      %v4int = OpTypeVector %int 4
+         %23 = OpConstantNull %v4int
+         %24 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureStore_07548b = OpFunction %void None %13
+         %16 = OpLabel
+         %18 = OpLoad %11 %arg_0
+               OpImageWrite %18 %21 %23
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %24
+         %26 = OpLabel
+         %27 = OpFunctionCall %void %textureStore_07548b
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %29 = OpLabel
+         %30 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %30
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %textureStore_07548b
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %textureStore_07548b
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/07548b.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/07548b.wgsl.expected.wgsl
new file mode 100644
index 0000000..ddcfd78
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/07548b.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_3d<rgba16sint, write>;
+
+fn textureStore_07548b() {
+  textureStore(arg_0, vec3<u32>(), vec4<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_07548b();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_07548b();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_07548b();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/158cf0.wgsl b/test/tint/builtins/gen/literal/textureStore/158cf0.wgsl
new file mode 100644
index 0000000..439e2b7
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/158cf0.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: u32, value: vec4<u32>)
+fn textureStore_158cf0() {
+  textureStore(arg_0, vec2<u32>(), 1u, vec4<u32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_158cf0();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_158cf0();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_158cf0();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/158cf0.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/158cf0.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..b9bb3f4
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/158cf0.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2DArray<uint4> arg_0 : register(u0, space1);
+
+void textureStore_158cf0() {
+  arg_0[uint3(0u, 0u, 1u)] = (0u).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_158cf0();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_158cf0();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_158cf0();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/158cf0.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/158cf0.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..b9bb3f4
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/158cf0.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2DArray<uint4> arg_0 : register(u0, space1);
+
+void textureStore_158cf0() {
+  arg_0[uint3(0u, 0u, 1u)] = (0u).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_158cf0();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_158cf0();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_158cf0();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/158cf0.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/158cf0.wgsl.expected.glsl
new file mode 100644
index 0000000..f8eb6ee
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/158cf0.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+layout(r32ui) uniform highp writeonly uimage2DArray arg_0;
+void textureStore_158cf0() {
+  imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), uvec4(0u));
+}
+
+vec4 vertex_main() {
+  textureStore_158cf0();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = 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_158cf0() {
+  imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), uvec4(0u));
+}
+
+void fragment_main() {
+  textureStore_158cf0();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+layout(r32ui) uniform highp writeonly uimage2DArray arg_0;
+void textureStore_158cf0() {
+  imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), uvec4(0u));
+}
+
+void compute_main() {
+  textureStore_158cf0();
+}
+
+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/158cf0.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/158cf0.wgsl.expected.msl
new file mode 100644
index 0000000..8b86324
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/158cf0.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_158cf0(texture2d_array<uint, access::write> tint_symbol_1) {
+  tint_symbol_1.write(uint4(0u), uint2(uint2(0u)), 1u);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<uint, access::write> tint_symbol_2) {
+  textureStore_158cf0(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_158cf0(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d_array<uint, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureStore_158cf0(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureStore/158cf0.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/158cf0.wgsl.expected.spvasm
new file mode 100644
index 0000000..57856cd
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/158cf0.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_158cf0 "textureStore_158cf0"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_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
+     %uint_1 = OpConstant %uint 1
+         %22 = OpConstantComposite %v3uint %uint_0 %uint_0 %uint_1
+     %v4uint = OpTypeVector %uint 4
+         %24 = OpConstantNull %v4uint
+         %25 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureStore_158cf0 = OpFunction %void None %13
+         %16 = OpLabel
+         %18 = OpLoad %11 %arg_0
+               OpImageWrite %18 %22 %24
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %25
+         %27 = OpLabel
+         %28 = OpFunctionCall %void %textureStore_158cf0
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %30 = OpLabel
+         %31 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %31
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %textureStore_158cf0
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %37 = OpLabel
+         %38 = OpFunctionCall %void %textureStore_158cf0
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/158cf0.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/158cf0.wgsl.expected.wgsl
new file mode 100644
index 0000000..0a13e2f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/158cf0.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<r32uint, write>;
+
+fn textureStore_158cf0() {
+  textureStore(arg_0, vec2<u32>(), 1u, vec4<u32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_158cf0();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_158cf0();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_158cf0();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/1839f2.wgsl b/test/tint/builtins/gen/literal/textureStore/1839f2.wgsl
new file mode 100644
index 0000000..9d5ba32
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/1839f2.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d<rgba8sint, write>;
+
+// fn textureStore(texture: texture_storage_2d<rgba8sint, write>, coords: vec2<u32>, value: vec4<i32>)
+fn textureStore_1839f2() {
+  textureStore(arg_0, vec2<u32>(), vec4<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_1839f2();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_1839f2();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_1839f2();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/1839f2.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/1839f2.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..d27947f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/1839f2.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2D<int4> arg_0 : register(u0, space1);
+
+void textureStore_1839f2() {
+  arg_0[(0u).xx] = (0).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_1839f2();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_1839f2();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_1839f2();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/1839f2.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/1839f2.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..d27947f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/1839f2.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2D<int4> arg_0 : register(u0, space1);
+
+void textureStore_1839f2() {
+  arg_0[(0u).xx] = (0).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_1839f2();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_1839f2();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_1839f2();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/1839f2.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/1839f2.wgsl.expected.glsl
new file mode 100644
index 0000000..3d314fa
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/1839f2.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+layout(rgba8i) uniform highp writeonly iimage2D arg_0;
+void textureStore_1839f2() {
+  imageStore(arg_0, ivec2(uvec2(0u)), ivec4(0));
+}
+
+vec4 vertex_main() {
+  textureStore_1839f2();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+layout(rgba8i) uniform highp writeonly iimage2D arg_0;
+void textureStore_1839f2() {
+  imageStore(arg_0, ivec2(uvec2(0u)), ivec4(0));
+}
+
+void fragment_main() {
+  textureStore_1839f2();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+layout(rgba8i) uniform highp writeonly iimage2D arg_0;
+void textureStore_1839f2() {
+  imageStore(arg_0, ivec2(uvec2(0u)), ivec4(0));
+}
+
+void compute_main() {
+  textureStore_1839f2();
+}
+
+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/1839f2.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/1839f2.wgsl.expected.msl
new file mode 100644
index 0000000..f0251ba
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/1839f2.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_1839f2(texture2d<int, access::write> tint_symbol_1) {
+  tint_symbol_1.write(int4(0), uint2(uint2(0u)));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<int, access::write> tint_symbol_2) {
+  textureStore_1839f2(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<int, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<int, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureStore_1839f2(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d<int, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureStore_1839f2(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureStore/1839f2.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/1839f2.wgsl.expected.spvasm
new file mode 100644
index 0000000..c1f7242
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/1839f2.wgsl.expected.spvasm
@@ -0,0 +1,74 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 38
+; 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_1839f2 "textureStore_1839f2"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 2D 0 0 0 2 Rgba8i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+         %21 = OpConstantNull %v2uint
+      %v4int = OpTypeVector %int 4
+         %23 = OpConstantNull %v4int
+         %24 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureStore_1839f2 = OpFunction %void None %13
+         %16 = OpLabel
+         %18 = OpLoad %11 %arg_0
+               OpImageWrite %18 %21 %23
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %24
+         %26 = OpLabel
+         %27 = OpFunctionCall %void %textureStore_1839f2
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %29 = OpLabel
+         %30 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %30
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %textureStore_1839f2
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %textureStore_1839f2
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/1839f2.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/1839f2.wgsl.expected.wgsl
new file mode 100644
index 0000000..7da29d2
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/1839f2.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d<rgba8sint, write>;
+
+fn textureStore_1839f2() {
+  textureStore(arg_0, vec2<u32>(), vec4<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_1839f2();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_1839f2();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_1839f2();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/1a7d35.wgsl b/test/tint/builtins/gen/literal/textureStore/1a7d35.wgsl
new file mode 100644
index 0000000..3ee0b86
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/1a7d35.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: u32, value: vec4<i32>)
+fn textureStore_1a7d35() {
+  textureStore(arg_0, vec2<u32>(), 1u, vec4<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_1a7d35();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_1a7d35();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_1a7d35();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/1a7d35.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/1a7d35.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..1c3f667
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/1a7d35.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2DArray<int4> arg_0 : register(u0, space1);
+
+void textureStore_1a7d35() {
+  arg_0[uint3(0u, 0u, 1u)] = (0).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_1a7d35();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_1a7d35();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_1a7d35();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/1a7d35.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/1a7d35.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..1c3f667
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/1a7d35.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2DArray<int4> arg_0 : register(u0, space1);
+
+void textureStore_1a7d35() {
+  arg_0[uint3(0u, 0u, 1u)] = (0).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_1a7d35();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_1a7d35();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_1a7d35();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/1a7d35.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/1a7d35.wgsl.expected.glsl
new file mode 100644
index 0000000..ca69181
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/1a7d35.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+layout(r32i) uniform highp writeonly iimage2DArray arg_0;
+void textureStore_1a7d35() {
+  imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), ivec4(0));
+}
+
+vec4 vertex_main() {
+  textureStore_1a7d35();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = 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_1a7d35() {
+  imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), ivec4(0));
+}
+
+void fragment_main() {
+  textureStore_1a7d35();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+layout(r32i) uniform highp writeonly iimage2DArray arg_0;
+void textureStore_1a7d35() {
+  imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), ivec4(0));
+}
+
+void compute_main() {
+  textureStore_1a7d35();
+}
+
+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/1a7d35.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/1a7d35.wgsl.expected.msl
new file mode 100644
index 0000000..c857308
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/1a7d35.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_1a7d35(texture2d_array<int, access::write> tint_symbol_1) {
+  tint_symbol_1.write(int4(0), uint2(uint2(0u)), 1u);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<int, access::write> tint_symbol_2) {
+  textureStore_1a7d35(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_1a7d35(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d_array<int, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureStore_1a7d35(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureStore/1a7d35.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/1a7d35.wgsl.expected.spvasm
new file mode 100644
index 0000000..cac9cad
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/1a7d35.wgsl.expected.spvasm
@@ -0,0 +1,76 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 40
+; 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_1a7d35 "textureStore_1a7d35"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_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
+     %uint_1 = OpConstant %uint 1
+         %23 = OpConstantComposite %v3uint %uint_0 %uint_0 %uint_1
+      %v4int = OpTypeVector %int 4
+         %25 = OpConstantNull %v4int
+         %26 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureStore_1a7d35 = OpFunction %void None %13
+         %16 = OpLabel
+         %18 = OpLoad %11 %arg_0
+               OpImageWrite %18 %23 %25
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %26
+         %28 = OpLabel
+         %29 = OpFunctionCall %void %textureStore_1a7d35
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %31 = OpLabel
+         %32 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %32
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %35 = OpLabel
+         %36 = OpFunctionCall %void %textureStore_1a7d35
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %38 = OpLabel
+         %39 = OpFunctionCall %void %textureStore_1a7d35
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/1a7d35.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/1a7d35.wgsl.expected.wgsl
new file mode 100644
index 0000000..83b8de3
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/1a7d35.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<r32sint, write>;
+
+fn textureStore_1a7d35() {
+  textureStore(arg_0, vec2<u32>(), 1u, vec4<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_1a7d35();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_1a7d35();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_1a7d35();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/1dc954.wgsl b/test/tint/builtins/gen/literal/textureStore/1dc954.wgsl
new file mode 100644
index 0000000..5f1165a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/1dc954.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_1d<rgba32sint, write>;
+
+// fn textureStore(texture: texture_storage_1d<rgba32sint, write>, coords: u32, value: vec4<i32>)
+fn textureStore_1dc954() {
+  textureStore(arg_0, 1u, vec4<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_1dc954();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_1dc954();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_1dc954();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/1dc954.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/1dc954.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..aa78a7d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/1dc954.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture1D<int4> arg_0 : register(u0, space1);
+
+void textureStore_1dc954() {
+  arg_0[1u] = (0).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_1dc954();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_1dc954();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_1dc954();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/1dc954.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/1dc954.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..aa78a7d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/1dc954.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture1D<int4> arg_0 : register(u0, space1);
+
+void textureStore_1dc954() {
+  arg_0[1u] = (0).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_1dc954();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_1dc954();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_1dc954();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/1dc954.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/1dc954.wgsl.expected.glsl
new file mode 100644
index 0000000..9023bec
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/1dc954.wgsl.expected.glsl
@@ -0,0 +1,78 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba32i) uniform highp writeonly iimage1D arg_0;
+void textureStore_1dc954() {
+  imageStore(arg_0, int(1u), ivec4(0));
+}
+
+vec4 vertex_main() {
+  textureStore_1dc954();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'iimage1D' : Reserved word. 
+WARNING: 0:3: 'layout' : useless application of layout qualifier 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+layout(rgba32i) uniform highp writeonly iimage1D arg_0;
+void textureStore_1dc954() {
+  imageStore(arg_0, int(1u), ivec4(0));
+}
+
+void fragment_main() {
+  textureStore_1dc954();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'iimage1D' : Reserved word. 
+WARNING: 0:4: 'layout' : useless application of layout qualifier 
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba32i) uniform highp writeonly iimage1D arg_0;
+void textureStore_1dc954() {
+  imageStore(arg_0, int(1u), ivec4(0));
+}
+
+void compute_main() {
+  textureStore_1dc954();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'iimage1D' : Reserved word. 
+WARNING: 0:3: 'layout' : useless application of layout qualifier 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureStore/1dc954.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/1dc954.wgsl.expected.msl
new file mode 100644
index 0000000..94daa3b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/1dc954.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_1dc954(texture1d<int, access::write> tint_symbol_1) {
+  tint_symbol_1.write(int4(0), uint(1u));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<int, access::write> tint_symbol_2) {
+  textureStore_1dc954(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<int, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<int, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureStore_1dc954(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture1d<int, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureStore_1dc954(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureStore/1dc954.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/1dc954.wgsl.expected.spvasm
new file mode 100644
index 0000000..399c07d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/1dc954.wgsl.expected.spvasm
@@ -0,0 +1,74 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 37
+; Schema: 0
+               OpCapability Shader
+               OpCapability Image1D
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureStore_1dc954 "textureStore_1dc954"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 1D 0 0 0 2 Rgba32i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+      %v4int = OpTypeVector %int 4
+         %22 = OpConstantNull %v4int
+         %23 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureStore_1dc954 = OpFunction %void None %13
+         %16 = OpLabel
+         %18 = OpLoad %11 %arg_0
+               OpImageWrite %18 %uint_1 %22
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %23
+         %25 = OpLabel
+         %26 = OpFunctionCall %void %textureStore_1dc954
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %28 = OpLabel
+         %29 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %29
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %textureStore_1dc954
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %35 = OpLabel
+         %36 = OpFunctionCall %void %textureStore_1dc954
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/1dc954.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/1dc954.wgsl.expected.wgsl
new file mode 100644
index 0000000..6ea1f64
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/1dc954.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_1d<rgba32sint, write>;
+
+fn textureStore_1dc954() {
+  textureStore(arg_0, 1u, vec4<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_1dc954();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_1dc954();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_1dc954();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/1e20f2.wgsl b/test/tint/builtins/gen/literal/textureStore/1e20f2.wgsl
new file mode 100644
index 0000000..ac0ac7b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/1e20f2.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d<r32float, write>;
+
+// fn textureStore(texture: texture_storage_2d<r32float, write>, coords: vec2<u32>, value: vec4<f32>)
+fn textureStore_1e20f2() {
+  textureStore(arg_0, vec2<u32>(), vec4<f32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_1e20f2();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_1e20f2();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_1e20f2();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/1e20f2.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/1e20f2.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..1c1d0a9
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/1e20f2.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2D<float4> arg_0 : register(u0, space1);
+
+void textureStore_1e20f2() {
+  arg_0[(0u).xx] = (0.0f).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_1e20f2();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_1e20f2();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_1e20f2();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/1e20f2.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/1e20f2.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..1c1d0a9
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/1e20f2.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2D<float4> arg_0 : register(u0, space1);
+
+void textureStore_1e20f2() {
+  arg_0[(0u).xx] = (0.0f).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_1e20f2();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_1e20f2();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_1e20f2();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/1e20f2.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/1e20f2.wgsl.expected.glsl
new file mode 100644
index 0000000..45ecb44
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/1e20f2.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+layout(r32f) uniform highp writeonly image2D arg_0;
+void textureStore_1e20f2() {
+  imageStore(arg_0, ivec2(uvec2(0u)), vec4(0.0f));
+}
+
+vec4 vertex_main() {
+  textureStore_1e20f2();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+layout(r32f) uniform highp writeonly image2D arg_0;
+void textureStore_1e20f2() {
+  imageStore(arg_0, ivec2(uvec2(0u)), vec4(0.0f));
+}
+
+void fragment_main() {
+  textureStore_1e20f2();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+layout(r32f) uniform highp writeonly image2D arg_0;
+void textureStore_1e20f2() {
+  imageStore(arg_0, ivec2(uvec2(0u)), vec4(0.0f));
+}
+
+void compute_main() {
+  textureStore_1e20f2();
+}
+
+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/1e20f2.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/1e20f2.wgsl.expected.msl
new file mode 100644
index 0000000..85e7418
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/1e20f2.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_1e20f2(texture2d<float, access::write> tint_symbol_1) {
+  tint_symbol_1.write(float4(0.0f), uint2(uint2(0u)));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<float, access::write> tint_symbol_2) {
+  textureStore_1e20f2(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<float, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<float, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureStore_1e20f2(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d<float, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureStore_1e20f2(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureStore/1e20f2.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/1e20f2.wgsl.expected.spvasm
new file mode 100644
index 0000000..446cf04
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/1e20f2.wgsl.expected.spvasm
@@ -0,0 +1,71 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 35
+; 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_1e20f2 "textureStore_1e20f2"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 0 0 2 R32f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %12 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+         %20 = OpConstantNull %v2uint
+         %21 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureStore_1e20f2 = OpFunction %void None %12
+         %15 = OpLabel
+         %17 = OpLoad %11 %arg_0
+               OpImageWrite %17 %20 %5
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %21
+         %23 = OpLabel
+         %24 = OpFunctionCall %void %textureStore_1e20f2
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+         %26 = OpLabel
+         %27 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %27
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+         %30 = OpLabel
+         %31 = OpFunctionCall %void %textureStore_1e20f2
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %12
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %textureStore_1e20f2
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/1e20f2.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/1e20f2.wgsl.expected.wgsl
new file mode 100644
index 0000000..8762625
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/1e20f2.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d<r32float, write>;
+
+fn textureStore_1e20f2() {
+  textureStore(arg_0, vec2<u32>(), vec4<f32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_1e20f2();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_1e20f2();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_1e20f2();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/207fdd.wgsl b/test/tint/builtins/gen/literal/textureStore/207fdd.wgsl
new file mode 100644
index 0000000..11c0772
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/207fdd.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_3d<rgba8snorm, write>;
+
+// fn textureStore(texture: texture_storage_3d<rgba8snorm, write>, coords: vec3<u32>, value: vec4<f32>)
+fn textureStore_207fdd() {
+  textureStore(arg_0, vec3<u32>(), vec4<f32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_207fdd();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_207fdd();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_207fdd();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/207fdd.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/207fdd.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..4078bc2
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/207fdd.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture3D<float4> arg_0 : register(u0, space1);
+
+void textureStore_207fdd() {
+  arg_0[(0u).xxx] = (0.0f).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_207fdd();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_207fdd();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_207fdd();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/207fdd.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/207fdd.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..4078bc2
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/207fdd.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture3D<float4> arg_0 : register(u0, space1);
+
+void textureStore_207fdd() {
+  arg_0[(0u).xxx] = (0.0f).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_207fdd();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_207fdd();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_207fdd();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/207fdd.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/207fdd.wgsl.expected.glsl
new file mode 100644
index 0000000..b780a95
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/207fdd.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+layout(rgba8_snorm) uniform highp writeonly image3D arg_0;
+void textureStore_207fdd() {
+  imageStore(arg_0, ivec3(uvec3(0u)), vec4(0.0f));
+}
+
+vec4 vertex_main() {
+  textureStore_207fdd();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+layout(rgba8_snorm) uniform highp writeonly image3D arg_0;
+void textureStore_207fdd() {
+  imageStore(arg_0, ivec3(uvec3(0u)), vec4(0.0f));
+}
+
+void fragment_main() {
+  textureStore_207fdd();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+layout(rgba8_snorm) uniform highp writeonly image3D arg_0;
+void textureStore_207fdd() {
+  imageStore(arg_0, ivec3(uvec3(0u)), vec4(0.0f));
+}
+
+void compute_main() {
+  textureStore_207fdd();
+}
+
+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/207fdd.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/207fdd.wgsl.expected.msl
new file mode 100644
index 0000000..9e3c0e8
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/207fdd.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_207fdd(texture3d<float, access::write> tint_symbol_1) {
+  tint_symbol_1.write(float4(0.0f), uint3(uint3(0u)));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<float, access::write> tint_symbol_2) {
+  textureStore_207fdd(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<float, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture3d<float, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureStore_207fdd(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture3d<float, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureStore_207fdd(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureStore/207fdd.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/207fdd.wgsl.expected.spvasm
new file mode 100644
index 0000000..4c90dfc
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/207fdd.wgsl.expected.spvasm
@@ -0,0 +1,71 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 35
+; 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_207fdd "textureStore_207fdd"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 3D 0 0 0 2 Rgba8Snorm
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %12 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v3uint = OpTypeVector %uint 3
+         %20 = OpConstantNull %v3uint
+         %21 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureStore_207fdd = OpFunction %void None %12
+         %15 = OpLabel
+         %17 = OpLoad %11 %arg_0
+               OpImageWrite %17 %20 %5
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %21
+         %23 = OpLabel
+         %24 = OpFunctionCall %void %textureStore_207fdd
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+         %26 = OpLabel
+         %27 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %27
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+         %30 = OpLabel
+         %31 = OpFunctionCall %void %textureStore_207fdd
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %12
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %textureStore_207fdd
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/207fdd.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/207fdd.wgsl.expected.wgsl
new file mode 100644
index 0000000..50d6dc5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/207fdd.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_3d<rgba8snorm, write>;
+
+fn textureStore_207fdd() {
+  textureStore(arg_0, vec3<u32>(), vec4<f32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_207fdd();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_207fdd();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_207fdd();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/285218.wgsl b/test/tint/builtins/gen/literal/textureStore/285218.wgsl
new file mode 100644
index 0000000..d8da3e5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/285218.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_1d<rgba32float, write>;
+
+// fn textureStore(texture: texture_storage_1d<rgba32float, write>, coords: u32, value: vec4<f32>)
+fn textureStore_285218() {
+  textureStore(arg_0, 1u, vec4<f32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_285218();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_285218();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_285218();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/285218.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/285218.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..bdd814e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/285218.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture1D<float4> arg_0 : register(u0, space1);
+
+void textureStore_285218() {
+  arg_0[1u] = (0.0f).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_285218();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_285218();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_285218();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/285218.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/285218.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..bdd814e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/285218.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture1D<float4> arg_0 : register(u0, space1);
+
+void textureStore_285218() {
+  arg_0[1u] = (0.0f).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_285218();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_285218();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_285218();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/285218.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/285218.wgsl.expected.glsl
new file mode 100644
index 0000000..2aea958
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/285218.wgsl.expected.glsl
@@ -0,0 +1,78 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba32f) uniform highp writeonly image1D arg_0;
+void textureStore_285218() {
+  imageStore(arg_0, int(1u), vec4(0.0f));
+}
+
+vec4 vertex_main() {
+  textureStore_285218();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image1D' : Reserved word. 
+WARNING: 0:3: 'layout' : useless application of layout qualifier 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+layout(rgba32f) uniform highp writeonly image1D arg_0;
+void textureStore_285218() {
+  imageStore(arg_0, int(1u), vec4(0.0f));
+}
+
+void fragment_main() {
+  textureStore_285218();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'image1D' : Reserved word. 
+WARNING: 0:4: 'layout' : useless application of layout qualifier 
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba32f) uniform highp writeonly image1D arg_0;
+void textureStore_285218() {
+  imageStore(arg_0, int(1u), vec4(0.0f));
+}
+
+void compute_main() {
+  textureStore_285218();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image1D' : Reserved word. 
+WARNING: 0:3: 'layout' : useless application of layout qualifier 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureStore/285218.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/285218.wgsl.expected.msl
new file mode 100644
index 0000000..f55cc01
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/285218.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_285218(texture1d<float, access::write> tint_symbol_1) {
+  tint_symbol_1.write(float4(0.0f), uint(1u));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<float, access::write> tint_symbol_2) {
+  textureStore_285218(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<float, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<float, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureStore_285218(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture1d<float, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureStore_285218(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureStore/285218.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/285218.wgsl.expected.spvasm
new file mode 100644
index 0000000..72dc9e7
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/285218.wgsl.expected.spvasm
@@ -0,0 +1,71 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 34
+; Schema: 0
+               OpCapability Shader
+               OpCapability Image1D
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureStore_285218 "textureStore_285218"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 1D 0 0 0 2 Rgba32f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %12 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+         %20 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureStore_285218 = OpFunction %void None %12
+         %15 = OpLabel
+         %17 = OpLoad %11 %arg_0
+               OpImageWrite %17 %uint_1 %5
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %20
+         %22 = OpLabel
+         %23 = OpFunctionCall %void %textureStore_285218
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+         %25 = OpLabel
+         %26 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %26
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %textureStore_285218
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %12
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %textureStore_285218
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/285218.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/285218.wgsl.expected.wgsl
new file mode 100644
index 0000000..b479a5b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/285218.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_1d<rgba32float, write>;
+
+fn textureStore_285218() {
+  textureStore(arg_0, 1u, vec4<f32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_285218();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_285218();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_285218();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/2d2835.wgsl b/test/tint/builtins/gen/literal/textureStore/2d2835.wgsl
new file mode 100644
index 0000000..3c0db21
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/2d2835.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: u32, value: vec4<f32>)
+fn textureStore_2d2835() {
+  textureStore(arg_0, vec2<u32>(), 1u, vec4<f32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_2d2835();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_2d2835();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_2d2835();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/2d2835.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/2d2835.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..ffe3cb5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/2d2835.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2DArray<float4> arg_0 : register(u0, space1);
+
+void textureStore_2d2835() {
+  arg_0[uint3(0u, 0u, 1u)] = (0.0f).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_2d2835();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_2d2835();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_2d2835();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/2d2835.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/2d2835.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..ffe3cb5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/2d2835.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2DArray<float4> arg_0 : register(u0, space1);
+
+void textureStore_2d2835() {
+  arg_0[uint3(0u, 0u, 1u)] = (0.0f).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_2d2835();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_2d2835();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_2d2835();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/2d2835.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/2d2835.wgsl.expected.glsl
new file mode 100644
index 0000000..b53dc33
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/2d2835.wgsl.expected.glsl
@@ -0,0 +1,75 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rg32f) uniform highp writeonly image2DArray arg_0;
+void textureStore_2d2835() {
+  imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), vec4(0.0f));
+}
+
+vec4 vertex_main() {
+  textureStore_2d2835();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  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_2d2835() {
+  imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), vec4(0.0f));
+}
+
+void fragment_main() {
+  textureStore_2d2835();
+}
+
+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_2d2835() {
+  imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), vec4(0.0f));
+}
+
+void compute_main() {
+  textureStore_2d2835();
+}
+
+layout(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/2d2835.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/2d2835.wgsl.expected.msl
new file mode 100644
index 0000000..958833b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/2d2835.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_2d2835(texture2d_array<float, access::write> tint_symbol_1) {
+  tint_symbol_1.write(float4(0.0f), uint2(uint2(0u)), 1u);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<float, access::write> tint_symbol_2) {
+  textureStore_2d2835(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_2d2835(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d_array<float, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureStore_2d2835(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureStore/2d2835.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/2d2835.wgsl.expected.spvasm
new file mode 100644
index 0000000..cf70248
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/2d2835.wgsl.expected.spvasm
@@ -0,0 +1,74 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 37
+; 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_2d2835 "textureStore_2d2835"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_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
+     %uint_1 = OpConstant %uint 1
+         %22 = OpConstantComposite %v3uint %uint_0 %uint_0 %uint_1
+         %23 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureStore_2d2835 = OpFunction %void None %12
+         %15 = OpLabel
+         %17 = OpLoad %11 %arg_0
+               OpImageWrite %17 %22 %5
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %23
+         %25 = OpLabel
+         %26 = OpFunctionCall %void %textureStore_2d2835
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+         %28 = OpLabel
+         %29 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %29
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %textureStore_2d2835
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %12
+         %35 = OpLabel
+         %36 = OpFunctionCall %void %textureStore_2d2835
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/2d2835.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/2d2835.wgsl.expected.wgsl
new file mode 100644
index 0000000..2506162
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/2d2835.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rg32float, write>;
+
+fn textureStore_2d2835() {
+  textureStore(arg_0, vec2<u32>(), 1u, vec4<f32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_2d2835();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_2d2835();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_2d2835();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/2e6102.wgsl b/test/tint/builtins/gen/literal/textureStore/2e6102.wgsl
new file mode 100644
index 0000000..3283fb9
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/2e6102.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d<rgba32float, write>;
+
+// fn textureStore(texture: texture_storage_2d<rgba32float, write>, coords: vec2<u32>, value: vec4<f32>)
+fn textureStore_2e6102() {
+  textureStore(arg_0, vec2<u32>(), vec4<f32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_2e6102();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_2e6102();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_2e6102();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/2e6102.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/2e6102.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..5f60ae7
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/2e6102.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2D<float4> arg_0 : register(u0, space1);
+
+void textureStore_2e6102() {
+  arg_0[(0u).xx] = (0.0f).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_2e6102();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_2e6102();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_2e6102();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/2e6102.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/2e6102.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..5f60ae7
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/2e6102.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2D<float4> arg_0 : register(u0, space1);
+
+void textureStore_2e6102() {
+  arg_0[(0u).xx] = (0.0f).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_2e6102();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_2e6102();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_2e6102();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/2e6102.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/2e6102.wgsl.expected.glsl
new file mode 100644
index 0000000..2767363
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/2e6102.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+layout(rgba32f) uniform highp writeonly image2D arg_0;
+void textureStore_2e6102() {
+  imageStore(arg_0, ivec2(uvec2(0u)), vec4(0.0f));
+}
+
+vec4 vertex_main() {
+  textureStore_2e6102();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+layout(rgba32f) uniform highp writeonly image2D arg_0;
+void textureStore_2e6102() {
+  imageStore(arg_0, ivec2(uvec2(0u)), vec4(0.0f));
+}
+
+void fragment_main() {
+  textureStore_2e6102();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+layout(rgba32f) uniform highp writeonly image2D arg_0;
+void textureStore_2e6102() {
+  imageStore(arg_0, ivec2(uvec2(0u)), vec4(0.0f));
+}
+
+void compute_main() {
+  textureStore_2e6102();
+}
+
+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/2e6102.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/2e6102.wgsl.expected.msl
new file mode 100644
index 0000000..9bcd5aa
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/2e6102.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_2e6102(texture2d<float, access::write> tint_symbol_1) {
+  tint_symbol_1.write(float4(0.0f), uint2(uint2(0u)));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<float, access::write> tint_symbol_2) {
+  textureStore_2e6102(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<float, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<float, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureStore_2e6102(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d<float, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureStore_2e6102(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureStore/2e6102.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/2e6102.wgsl.expected.spvasm
new file mode 100644
index 0000000..57c1ad1
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/2e6102.wgsl.expected.spvasm
@@ -0,0 +1,71 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 35
+; 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_2e6102 "textureStore_2e6102"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 0 0 2 Rgba32f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %12 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+         %20 = OpConstantNull %v2uint
+         %21 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureStore_2e6102 = OpFunction %void None %12
+         %15 = OpLabel
+         %17 = OpLoad %11 %arg_0
+               OpImageWrite %17 %20 %5
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %21
+         %23 = OpLabel
+         %24 = OpFunctionCall %void %textureStore_2e6102
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+         %26 = OpLabel
+         %27 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %27
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+         %30 = OpLabel
+         %31 = OpFunctionCall %void %textureStore_2e6102
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %12
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %textureStore_2e6102
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/2e6102.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/2e6102.wgsl.expected.wgsl
new file mode 100644
index 0000000..7c3458e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/2e6102.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d<rgba32float, write>;
+
+fn textureStore_2e6102() {
+  textureStore(arg_0, vec2<u32>(), vec4<f32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_2e6102();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_2e6102();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_2e6102();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/330b7c.wgsl b/test/tint/builtins/gen/literal/textureStore/330b7c.wgsl
new file mode 100644
index 0000000..fe8f3e7
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/330b7c.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: u32, value: vec4<f32>)
+fn textureStore_330b7c() {
+  textureStore(arg_0, vec2<u32>(), 1u, vec4<f32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_330b7c();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_330b7c();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_330b7c();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/330b7c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/330b7c.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..8cf1f94
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/330b7c.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2DArray<float4> arg_0 : register(u0, space1);
+
+void textureStore_330b7c() {
+  arg_0[uint3(0u, 0u, 1u)] = (0.0f).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_330b7c();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_330b7c();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_330b7c();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/330b7c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/330b7c.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..8cf1f94
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/330b7c.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2DArray<float4> arg_0 : register(u0, space1);
+
+void textureStore_330b7c() {
+  arg_0[uint3(0u, 0u, 1u)] = (0.0f).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_330b7c();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_330b7c();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_330b7c();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/330b7c.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/330b7c.wgsl.expected.glsl
new file mode 100644
index 0000000..1a37be2
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/330b7c.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+layout(rgba8) uniform highp writeonly image2DArray arg_0;
+void textureStore_330b7c() {
+  imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), vec4(0.0f));
+}
+
+vec4 vertex_main() {
+  textureStore_330b7c();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = 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_330b7c() {
+  imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), vec4(0.0f));
+}
+
+void fragment_main() {
+  textureStore_330b7c();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+layout(rgba8) uniform highp writeonly image2DArray arg_0;
+void textureStore_330b7c() {
+  imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), vec4(0.0f));
+}
+
+void compute_main() {
+  textureStore_330b7c();
+}
+
+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/330b7c.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/330b7c.wgsl.expected.msl
new file mode 100644
index 0000000..e08e7b1
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/330b7c.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_330b7c(texture2d_array<float, access::write> tint_symbol_1) {
+  tint_symbol_1.write(float4(0.0f), uint2(uint2(0u)), 1u);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<float, access::write> tint_symbol_2) {
+  textureStore_330b7c(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_330b7c(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d_array<float, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureStore_330b7c(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureStore/330b7c.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/330b7c.wgsl.expected.spvasm
new file mode 100644
index 0000000..8142b42
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/330b7c.wgsl.expected.spvasm
@@ -0,0 +1,73 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 37
+; 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_330b7c "textureStore_330b7c"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_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
+     %uint_1 = OpConstant %uint 1
+         %22 = OpConstantComposite %v3uint %uint_0 %uint_0 %uint_1
+         %23 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureStore_330b7c = OpFunction %void None %12
+         %15 = OpLabel
+         %17 = OpLoad %11 %arg_0
+               OpImageWrite %17 %22 %5
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %23
+         %25 = OpLabel
+         %26 = OpFunctionCall %void %textureStore_330b7c
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+         %28 = OpLabel
+         %29 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %29
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %textureStore_330b7c
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %12
+         %35 = OpLabel
+         %36 = OpFunctionCall %void %textureStore_330b7c
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/330b7c.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/330b7c.wgsl.expected.wgsl
new file mode 100644
index 0000000..e93891f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/330b7c.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba8unorm, write>;
+
+fn textureStore_330b7c() {
+  textureStore(arg_0, vec2<u32>(), 1u, vec4<f32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_330b7c();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_330b7c();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_330b7c();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/3c1937.wgsl b/test/tint/builtins/gen/literal/textureStore/3c1937.wgsl
new file mode 100644
index 0000000..599a5aa
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/3c1937.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_1d<rgba8uint, write>;
+
+// fn textureStore(texture: texture_storage_1d<rgba8uint, write>, coords: u32, value: vec4<u32>)
+fn textureStore_3c1937() {
+  textureStore(arg_0, 1u, vec4<u32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_3c1937();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_3c1937();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_3c1937();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/3c1937.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/3c1937.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..3c35d23
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/3c1937.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture1D<uint4> arg_0 : register(u0, space1);
+
+void textureStore_3c1937() {
+  arg_0[1u] = (0u).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_3c1937();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_3c1937();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_3c1937();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/3c1937.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/3c1937.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..3c35d23
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/3c1937.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture1D<uint4> arg_0 : register(u0, space1);
+
+void textureStore_3c1937() {
+  arg_0[1u] = (0u).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_3c1937();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_3c1937();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_3c1937();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/3c1937.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/3c1937.wgsl.expected.glsl
new file mode 100644
index 0000000..2f70fdd
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/3c1937.wgsl.expected.glsl
@@ -0,0 +1,78 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba8ui) uniform highp writeonly uimage1D arg_0;
+void textureStore_3c1937() {
+  imageStore(arg_0, int(1u), uvec4(0u));
+}
+
+vec4 vertex_main() {
+  textureStore_3c1937();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'uimage1D' : Reserved word. 
+WARNING: 0:3: 'layout' : useless application of layout qualifier 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+layout(rgba8ui) uniform highp writeonly uimage1D arg_0;
+void textureStore_3c1937() {
+  imageStore(arg_0, int(1u), uvec4(0u));
+}
+
+void fragment_main() {
+  textureStore_3c1937();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'uimage1D' : Reserved word. 
+WARNING: 0:4: 'layout' : useless application of layout qualifier 
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba8ui) uniform highp writeonly uimage1D arg_0;
+void textureStore_3c1937() {
+  imageStore(arg_0, int(1u), uvec4(0u));
+}
+
+void compute_main() {
+  textureStore_3c1937();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'uimage1D' : Reserved word. 
+WARNING: 0:3: 'layout' : useless application of layout qualifier 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureStore/3c1937.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/3c1937.wgsl.expected.msl
new file mode 100644
index 0000000..66c76cc
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/3c1937.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_3c1937(texture1d<uint, access::write> tint_symbol_1) {
+  tint_symbol_1.write(uint4(0u), uint(1u));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<uint, access::write> tint_symbol_2) {
+  textureStore_3c1937(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<uint, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<uint, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureStore_3c1937(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture1d<uint, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureStore_3c1937(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureStore/3c1937.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/3c1937.wgsl.expected.spvasm
new file mode 100644
index 0000000..ceae29a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/3c1937.wgsl.expected.spvasm
@@ -0,0 +1,73 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 36
+; Schema: 0
+               OpCapability Shader
+               OpCapability Image1D
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureStore_3c1937 "textureStore_3c1937"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 1D 0 0 0 2 Rgba8ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+     %uint_1 = OpConstant %uint 1
+     %v4uint = OpTypeVector %uint 4
+         %21 = OpConstantNull %v4uint
+         %22 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureStore_3c1937 = OpFunction %void None %13
+         %16 = OpLabel
+         %18 = OpLoad %11 %arg_0
+               OpImageWrite %18 %uint_1 %21
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %22
+         %24 = OpLabel
+         %25 = OpFunctionCall %void %textureStore_3c1937
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %27 = OpLabel
+         %28 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %28
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %31 = OpLabel
+         %32 = OpFunctionCall %void %textureStore_3c1937
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %textureStore_3c1937
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/3c1937.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/3c1937.wgsl.expected.wgsl
new file mode 100644
index 0000000..b26afa2
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/3c1937.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_1d<rgba8uint, write>;
+
+fn textureStore_3c1937() {
+  textureStore(arg_0, 1u, vec4<u32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_3c1937();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_3c1937();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_3c1937();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/3d6f01.wgsl b/test/tint/builtins/gen/literal/textureStore/3d6f01.wgsl
new file mode 100644
index 0000000..9bddb8a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/3d6f01.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_1d<rg32sint, write>;
+
+// fn textureStore(texture: texture_storage_1d<rg32sint, write>, coords: u32, value: vec4<i32>)
+fn textureStore_3d6f01() {
+  textureStore(arg_0, 1u, vec4<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_3d6f01();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_3d6f01();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_3d6f01();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/3d6f01.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/3d6f01.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..24d481d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/3d6f01.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture1D<int4> arg_0 : register(u0, space1);
+
+void textureStore_3d6f01() {
+  arg_0[1u] = (0).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_3d6f01();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_3d6f01();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_3d6f01();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/3d6f01.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/3d6f01.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..24d481d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/3d6f01.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture1D<int4> arg_0 : register(u0, space1);
+
+void textureStore_3d6f01() {
+  arg_0[1u] = (0).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_3d6f01();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_3d6f01();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_3d6f01();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/3d6f01.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/3d6f01.wgsl.expected.glsl
new file mode 100644
index 0000000..1e279f2
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/3d6f01.wgsl.expected.glsl
@@ -0,0 +1,75 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rg32i) uniform highp writeonly iimage1D arg_0;
+void textureStore_3d6f01() {
+  imageStore(arg_0, int(1u), ivec4(0));
+}
+
+vec4 vertex_main() {
+  textureStore_3d6f01();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+layout(rg32i) uniform highp writeonly iimage1D arg_0;
+void textureStore_3d6f01() {
+  imageStore(arg_0, int(1u), ivec4(0));
+}
+
+void fragment_main() {
+  textureStore_3d6f01();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'image load-store format' : not supported with this profile: es
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rg32i) uniform highp writeonly iimage1D arg_0;
+void textureStore_3d6f01() {
+  imageStore(arg_0, int(1u), ivec4(0));
+}
+
+void compute_main() {
+  textureStore_3d6f01();
+}
+
+layout(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/3d6f01.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/3d6f01.wgsl.expected.msl
new file mode 100644
index 0000000..04287c4
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/3d6f01.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_3d6f01(texture1d<int, access::write> tint_symbol_1) {
+  tint_symbol_1.write(int4(0), uint(1u));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<int, access::write> tint_symbol_2) {
+  textureStore_3d6f01(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<int, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<int, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureStore_3d6f01(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture1d<int, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureStore_3d6f01(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureStore/3d6f01.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/3d6f01.wgsl.expected.spvasm
new file mode 100644
index 0000000..658ccf1
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/3d6f01.wgsl.expected.spvasm
@@ -0,0 +1,75 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 37
+; Schema: 0
+               OpCapability Shader
+               OpCapability Image1D
+               OpCapability StorageImageExtendedFormats
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureStore_3d6f01 "textureStore_3d6f01"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 1D 0 0 0 2 Rg32i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+      %v4int = OpTypeVector %int 4
+         %22 = OpConstantNull %v4int
+         %23 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureStore_3d6f01 = OpFunction %void None %13
+         %16 = OpLabel
+         %18 = OpLoad %11 %arg_0
+               OpImageWrite %18 %uint_1 %22
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %23
+         %25 = OpLabel
+         %26 = OpFunctionCall %void %textureStore_3d6f01
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %28 = OpLabel
+         %29 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %29
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %textureStore_3d6f01
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %35 = OpLabel
+         %36 = OpFunctionCall %void %textureStore_3d6f01
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/3d6f01.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/3d6f01.wgsl.expected.wgsl
new file mode 100644
index 0000000..ec89f38
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/3d6f01.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_1d<rg32sint, write>;
+
+fn textureStore_3d6f01() {
+  textureStore(arg_0, 1u, vec4<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_3d6f01();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_3d6f01();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_3d6f01();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/40c455.wgsl b/test/tint/builtins/gen/literal/textureStore/40c455.wgsl
new file mode 100644
index 0000000..8383481
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/40c455.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d<rgba8snorm, write>;
+
+// fn textureStore(texture: texture_storage_2d<rgba8snorm, write>, coords: vec2<u32>, value: vec4<f32>)
+fn textureStore_40c455() {
+  textureStore(arg_0, vec2<u32>(), vec4<f32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_40c455();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_40c455();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_40c455();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/40c455.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/40c455.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..a34c109
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/40c455.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2D<float4> arg_0 : register(u0, space1);
+
+void textureStore_40c455() {
+  arg_0[(0u).xx] = (0.0f).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_40c455();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_40c455();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_40c455();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/40c455.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/40c455.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..a34c109
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/40c455.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2D<float4> arg_0 : register(u0, space1);
+
+void textureStore_40c455() {
+  arg_0[(0u).xx] = (0.0f).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_40c455();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_40c455();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_40c455();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/40c455.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/40c455.wgsl.expected.glsl
new file mode 100644
index 0000000..cf38074
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/40c455.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+layout(rgba8_snorm) uniform highp writeonly image2D arg_0;
+void textureStore_40c455() {
+  imageStore(arg_0, ivec2(uvec2(0u)), vec4(0.0f));
+}
+
+vec4 vertex_main() {
+  textureStore_40c455();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+layout(rgba8_snorm) uniform highp writeonly image2D arg_0;
+void textureStore_40c455() {
+  imageStore(arg_0, ivec2(uvec2(0u)), vec4(0.0f));
+}
+
+void fragment_main() {
+  textureStore_40c455();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+layout(rgba8_snorm) uniform highp writeonly image2D arg_0;
+void textureStore_40c455() {
+  imageStore(arg_0, ivec2(uvec2(0u)), vec4(0.0f));
+}
+
+void compute_main() {
+  textureStore_40c455();
+}
+
+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/40c455.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/40c455.wgsl.expected.msl
new file mode 100644
index 0000000..aca14e6
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/40c455.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_40c455(texture2d<float, access::write> tint_symbol_1) {
+  tint_symbol_1.write(float4(0.0f), uint2(uint2(0u)));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<float, access::write> tint_symbol_2) {
+  textureStore_40c455(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<float, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<float, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureStore_40c455(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d<float, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureStore_40c455(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureStore/40c455.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/40c455.wgsl.expected.spvasm
new file mode 100644
index 0000000..d6742e1
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/40c455.wgsl.expected.spvasm
@@ -0,0 +1,71 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 35
+; 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_40c455 "textureStore_40c455"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 0 0 2 Rgba8Snorm
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %12 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+         %20 = OpConstantNull %v2uint
+         %21 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureStore_40c455 = OpFunction %void None %12
+         %15 = OpLabel
+         %17 = OpLoad %11 %arg_0
+               OpImageWrite %17 %20 %5
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %21
+         %23 = OpLabel
+         %24 = OpFunctionCall %void %textureStore_40c455
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+         %26 = OpLabel
+         %27 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %27
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+         %30 = OpLabel
+         %31 = OpFunctionCall %void %textureStore_40c455
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %12
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %textureStore_40c455
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/40c455.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/40c455.wgsl.expected.wgsl
new file mode 100644
index 0000000..17ec04a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/40c455.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d<rgba8snorm, write>;
+
+fn textureStore_40c455() {
+  textureStore(arg_0, vec2<u32>(), vec4<f32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_40c455();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_40c455();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_40c455();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/4288fc.wgsl b/test/tint/builtins/gen/literal/textureStore/4288fc.wgsl
new file mode 100644
index 0000000..086f268
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/4288fc.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_3d<r32float, write>;
+
+// fn textureStore(texture: texture_storage_3d<r32float, write>, coords: vec3<u32>, value: vec4<f32>)
+fn textureStore_4288fc() {
+  textureStore(arg_0, vec3<u32>(), vec4<f32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_4288fc();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_4288fc();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_4288fc();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/4288fc.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/4288fc.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..53c3ae0
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/4288fc.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture3D<float4> arg_0 : register(u0, space1);
+
+void textureStore_4288fc() {
+  arg_0[(0u).xxx] = (0.0f).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_4288fc();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_4288fc();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_4288fc();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/4288fc.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/4288fc.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..53c3ae0
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/4288fc.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture3D<float4> arg_0 : register(u0, space1);
+
+void textureStore_4288fc() {
+  arg_0[(0u).xxx] = (0.0f).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_4288fc();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_4288fc();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_4288fc();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/4288fc.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/4288fc.wgsl.expected.glsl
new file mode 100644
index 0000000..0d55884
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/4288fc.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+layout(r32f) uniform highp writeonly image3D arg_0;
+void textureStore_4288fc() {
+  imageStore(arg_0, ivec3(uvec3(0u)), vec4(0.0f));
+}
+
+vec4 vertex_main() {
+  textureStore_4288fc();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+layout(r32f) uniform highp writeonly image3D arg_0;
+void textureStore_4288fc() {
+  imageStore(arg_0, ivec3(uvec3(0u)), vec4(0.0f));
+}
+
+void fragment_main() {
+  textureStore_4288fc();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+layout(r32f) uniform highp writeonly image3D arg_0;
+void textureStore_4288fc() {
+  imageStore(arg_0, ivec3(uvec3(0u)), vec4(0.0f));
+}
+
+void compute_main() {
+  textureStore_4288fc();
+}
+
+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/4288fc.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/4288fc.wgsl.expected.msl
new file mode 100644
index 0000000..e865bdc
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/4288fc.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_4288fc(texture3d<float, access::write> tint_symbol_1) {
+  tint_symbol_1.write(float4(0.0f), uint3(uint3(0u)));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<float, access::write> tint_symbol_2) {
+  textureStore_4288fc(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<float, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture3d<float, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureStore_4288fc(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture3d<float, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureStore_4288fc(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureStore/4288fc.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/4288fc.wgsl.expected.spvasm
new file mode 100644
index 0000000..0251157
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/4288fc.wgsl.expected.spvasm
@@ -0,0 +1,71 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 35
+; 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_4288fc "textureStore_4288fc"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 3D 0 0 0 2 R32f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %12 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v3uint = OpTypeVector %uint 3
+         %20 = OpConstantNull %v3uint
+         %21 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureStore_4288fc = OpFunction %void None %12
+         %15 = OpLabel
+         %17 = OpLoad %11 %arg_0
+               OpImageWrite %17 %20 %5
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %21
+         %23 = OpLabel
+         %24 = OpFunctionCall %void %textureStore_4288fc
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+         %26 = OpLabel
+         %27 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %27
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+         %30 = OpLabel
+         %31 = OpFunctionCall %void %textureStore_4288fc
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %12
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %textureStore_4288fc
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/4288fc.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/4288fc.wgsl.expected.wgsl
new file mode 100644
index 0000000..5a88ca4
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/4288fc.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_3d<r32float, write>;
+
+fn textureStore_4288fc() {
+  textureStore(arg_0, vec3<u32>(), vec4<f32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_4288fc();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_4288fc();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_4288fc();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/486500.wgsl b/test/tint/builtins/gen/literal/textureStore/486500.wgsl
new file mode 100644
index 0000000..e05a98c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/486500.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_3d<rgba32sint, write>;
+
+// fn textureStore(texture: texture_storage_3d<rgba32sint, write>, coords: vec3<u32>, value: vec4<i32>)
+fn textureStore_486500() {
+  textureStore(arg_0, vec3<u32>(), vec4<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_486500();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_486500();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_486500();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/486500.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/486500.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..5eb3313
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/486500.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture3D<int4> arg_0 : register(u0, space1);
+
+void textureStore_486500() {
+  arg_0[(0u).xxx] = (0).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_486500();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_486500();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_486500();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/486500.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/486500.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..5eb3313
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/486500.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture3D<int4> arg_0 : register(u0, space1);
+
+void textureStore_486500() {
+  arg_0[(0u).xxx] = (0).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_486500();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_486500();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_486500();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/486500.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/486500.wgsl.expected.glsl
new file mode 100644
index 0000000..88ef8d3
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/486500.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+layout(rgba32i) uniform highp writeonly iimage3D arg_0;
+void textureStore_486500() {
+  imageStore(arg_0, ivec3(uvec3(0u)), ivec4(0));
+}
+
+vec4 vertex_main() {
+  textureStore_486500();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+layout(rgba32i) uniform highp writeonly iimage3D arg_0;
+void textureStore_486500() {
+  imageStore(arg_0, ivec3(uvec3(0u)), ivec4(0));
+}
+
+void fragment_main() {
+  textureStore_486500();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+layout(rgba32i) uniform highp writeonly iimage3D arg_0;
+void textureStore_486500() {
+  imageStore(arg_0, ivec3(uvec3(0u)), ivec4(0));
+}
+
+void compute_main() {
+  textureStore_486500();
+}
+
+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/486500.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/486500.wgsl.expected.msl
new file mode 100644
index 0000000..9007838
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/486500.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_486500(texture3d<int, access::write> tint_symbol_1) {
+  tint_symbol_1.write(int4(0), uint3(uint3(0u)));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<int, access::write> tint_symbol_2) {
+  textureStore_486500(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<int, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture3d<int, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureStore_486500(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture3d<int, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureStore_486500(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureStore/486500.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/486500.wgsl.expected.spvasm
new file mode 100644
index 0000000..da34216
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/486500.wgsl.expected.spvasm
@@ -0,0 +1,74 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 38
+; 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_486500 "textureStore_486500"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 3D 0 0 0 2 Rgba32i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v3uint = OpTypeVector %uint 3
+         %21 = OpConstantNull %v3uint
+      %v4int = OpTypeVector %int 4
+         %23 = OpConstantNull %v4int
+         %24 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureStore_486500 = OpFunction %void None %13
+         %16 = OpLabel
+         %18 = OpLoad %11 %arg_0
+               OpImageWrite %18 %21 %23
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %24
+         %26 = OpLabel
+         %27 = OpFunctionCall %void %textureStore_486500
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %29 = OpLabel
+         %30 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %30
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %textureStore_486500
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %textureStore_486500
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/486500.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/486500.wgsl.expected.wgsl
new file mode 100644
index 0000000..bbb5e94
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/486500.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_3d<rgba32sint, write>;
+
+fn textureStore_486500() {
+  textureStore(arg_0, vec3<u32>(), vec4<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_486500();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_486500();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_486500();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/4c454f.wgsl b/test/tint/builtins/gen/literal/textureStore/4c454f.wgsl
new file mode 100644
index 0000000..bb7e882
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/4c454f.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: u32, value: vec4<i32>)
+fn textureStore_4c454f() {
+  textureStore(arg_0, vec2<u32>(), 1u, vec4<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_4c454f();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_4c454f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_4c454f();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/4c454f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/4c454f.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..4ab4c39
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/4c454f.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2DArray<int4> arg_0 : register(u0, space1);
+
+void textureStore_4c454f() {
+  arg_0[uint3(0u, 0u, 1u)] = (0).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_4c454f();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_4c454f();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_4c454f();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/4c454f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/4c454f.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..4ab4c39
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/4c454f.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2DArray<int4> arg_0 : register(u0, space1);
+
+void textureStore_4c454f() {
+  arg_0[uint3(0u, 0u, 1u)] = (0).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_4c454f();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_4c454f();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_4c454f();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/4c454f.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/4c454f.wgsl.expected.glsl
new file mode 100644
index 0000000..6fe291b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/4c454f.wgsl.expected.glsl
@@ -0,0 +1,75 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rg32i) uniform highp writeonly iimage2DArray arg_0;
+void textureStore_4c454f() {
+  imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), ivec4(0));
+}
+
+vec4 vertex_main() {
+  textureStore_4c454f();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  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_4c454f() {
+  imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), ivec4(0));
+}
+
+void fragment_main() {
+  textureStore_4c454f();
+}
+
+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_4c454f() {
+  imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), ivec4(0));
+}
+
+void compute_main() {
+  textureStore_4c454f();
+}
+
+layout(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/4c454f.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/4c454f.wgsl.expected.msl
new file mode 100644
index 0000000..f608d9c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/4c454f.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_4c454f(texture2d_array<int, access::write> tint_symbol_1) {
+  tint_symbol_1.write(int4(0), uint2(uint2(0u)), 1u);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<int, access::write> tint_symbol_2) {
+  textureStore_4c454f(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_4c454f(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d_array<int, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureStore_4c454f(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureStore/4c454f.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/4c454f.wgsl.expected.spvasm
new file mode 100644
index 0000000..7d89bf6
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/4c454f.wgsl.expected.spvasm
@@ -0,0 +1,77 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 40
+; 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_4c454f "textureStore_4c454f"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_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
+     %uint_1 = OpConstant %uint 1
+         %23 = OpConstantComposite %v3uint %uint_0 %uint_0 %uint_1
+      %v4int = OpTypeVector %int 4
+         %25 = OpConstantNull %v4int
+         %26 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureStore_4c454f = OpFunction %void None %13
+         %16 = OpLabel
+         %18 = OpLoad %11 %arg_0
+               OpImageWrite %18 %23 %25
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %26
+         %28 = OpLabel
+         %29 = OpFunctionCall %void %textureStore_4c454f
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %31 = OpLabel
+         %32 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %32
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %35 = OpLabel
+         %36 = OpFunctionCall %void %textureStore_4c454f
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %38 = OpLabel
+         %39 = OpFunctionCall %void %textureStore_4c454f
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/4c454f.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/4c454f.wgsl.expected.wgsl
new file mode 100644
index 0000000..8b60830
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/4c454f.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rg32sint, write>;
+
+fn textureStore_4c454f() {
+  textureStore(arg_0, vec2<u32>(), 1u, vec4<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_4c454f();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_4c454f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_4c454f();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/506a71.wgsl b/test/tint/builtins/gen/literal/textureStore/506a71.wgsl
new file mode 100644
index 0000000..ffd82b2
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/506a71.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d<rg32uint, write>;
+
+// fn textureStore(texture: texture_storage_2d<rg32uint, write>, coords: vec2<u32>, value: vec4<u32>)
+fn textureStore_506a71() {
+  textureStore(arg_0, vec2<u32>(), vec4<u32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_506a71();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_506a71();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_506a71();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/506a71.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/506a71.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..4d77b11
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/506a71.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2D<uint4> arg_0 : register(u0, space1);
+
+void textureStore_506a71() {
+  arg_0[(0u).xx] = (0u).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_506a71();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_506a71();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_506a71();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/506a71.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/506a71.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..4d77b11
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/506a71.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2D<uint4> arg_0 : register(u0, space1);
+
+void textureStore_506a71() {
+  arg_0[(0u).xx] = (0u).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_506a71();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_506a71();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_506a71();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/506a71.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/506a71.wgsl.expected.glsl
new file mode 100644
index 0000000..d8e3510
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/506a71.wgsl.expected.glsl
@@ -0,0 +1,75 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rg32ui) uniform highp writeonly uimage2D arg_0;
+void textureStore_506a71() {
+  imageStore(arg_0, ivec2(uvec2(0u)), uvec4(0u));
+}
+
+vec4 vertex_main() {
+  textureStore_506a71();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+layout(rg32ui) uniform highp writeonly uimage2D arg_0;
+void textureStore_506a71() {
+  imageStore(arg_0, ivec2(uvec2(0u)), uvec4(0u));
+}
+
+void fragment_main() {
+  textureStore_506a71();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'image load-store format' : not supported with this profile: es
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rg32ui) uniform highp writeonly uimage2D arg_0;
+void textureStore_506a71() {
+  imageStore(arg_0, ivec2(uvec2(0u)), uvec4(0u));
+}
+
+void compute_main() {
+  textureStore_506a71();
+}
+
+layout(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/506a71.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/506a71.wgsl.expected.msl
new file mode 100644
index 0000000..f67d858
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/506a71.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_506a71(texture2d<uint, access::write> tint_symbol_1) {
+  tint_symbol_1.write(uint4(0u), uint2(uint2(0u)));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<uint, access::write> tint_symbol_2) {
+  textureStore_506a71(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<uint, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<uint, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureStore_506a71(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d<uint, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureStore_506a71(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureStore/506a71.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/506a71.wgsl.expected.spvasm
new file mode 100644
index 0000000..9315213
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/506a71.wgsl.expected.spvasm
@@ -0,0 +1,74 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 37
+; 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_506a71 "textureStore_506a71"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 2D 0 0 0 2 Rg32ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+     %v2uint = OpTypeVector %uint 2
+         %20 = OpConstantNull %v2uint
+     %v4uint = OpTypeVector %uint 4
+         %22 = OpConstantNull %v4uint
+         %23 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureStore_506a71 = OpFunction %void None %13
+         %16 = OpLabel
+         %18 = OpLoad %11 %arg_0
+               OpImageWrite %18 %20 %22
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %23
+         %25 = OpLabel
+         %26 = OpFunctionCall %void %textureStore_506a71
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %28 = OpLabel
+         %29 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %29
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %textureStore_506a71
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %35 = OpLabel
+         %36 = OpFunctionCall %void %textureStore_506a71
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/506a71.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/506a71.wgsl.expected.wgsl
new file mode 100644
index 0000000..a37a117
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/506a71.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d<rg32uint, write>;
+
+fn textureStore_506a71() {
+  textureStore(arg_0, vec2<u32>(), vec4<u32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_506a71();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_506a71();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_506a71();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/52f503.wgsl b/test/tint/builtins/gen/literal/textureStore/52f503.wgsl
new file mode 100644
index 0000000..e8a74d2
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/52f503.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d<rgba32sint, write>;
+
+// fn textureStore(texture: texture_storage_2d<rgba32sint, write>, coords: vec2<u32>, value: vec4<i32>)
+fn textureStore_52f503() {
+  textureStore(arg_0, vec2<u32>(), vec4<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_52f503();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_52f503();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_52f503();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/52f503.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/52f503.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..dc3e1b7
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/52f503.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2D<int4> arg_0 : register(u0, space1);
+
+void textureStore_52f503() {
+  arg_0[(0u).xx] = (0).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_52f503();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_52f503();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_52f503();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/52f503.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/52f503.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..dc3e1b7
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/52f503.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2D<int4> arg_0 : register(u0, space1);
+
+void textureStore_52f503() {
+  arg_0[(0u).xx] = (0).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_52f503();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_52f503();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_52f503();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/52f503.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/52f503.wgsl.expected.glsl
new file mode 100644
index 0000000..3b9248f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/52f503.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+layout(rgba32i) uniform highp writeonly iimage2D arg_0;
+void textureStore_52f503() {
+  imageStore(arg_0, ivec2(uvec2(0u)), ivec4(0));
+}
+
+vec4 vertex_main() {
+  textureStore_52f503();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+layout(rgba32i) uniform highp writeonly iimage2D arg_0;
+void textureStore_52f503() {
+  imageStore(arg_0, ivec2(uvec2(0u)), ivec4(0));
+}
+
+void fragment_main() {
+  textureStore_52f503();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+layout(rgba32i) uniform highp writeonly iimage2D arg_0;
+void textureStore_52f503() {
+  imageStore(arg_0, ivec2(uvec2(0u)), ivec4(0));
+}
+
+void compute_main() {
+  textureStore_52f503();
+}
+
+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/52f503.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/52f503.wgsl.expected.msl
new file mode 100644
index 0000000..0930d28
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/52f503.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_52f503(texture2d<int, access::write> tint_symbol_1) {
+  tint_symbol_1.write(int4(0), uint2(uint2(0u)));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<int, access::write> tint_symbol_2) {
+  textureStore_52f503(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<int, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<int, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureStore_52f503(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d<int, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureStore_52f503(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureStore/52f503.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/52f503.wgsl.expected.spvasm
new file mode 100644
index 0000000..cd373e8
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/52f503.wgsl.expected.spvasm
@@ -0,0 +1,74 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 38
+; 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_52f503 "textureStore_52f503"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 2D 0 0 0 2 Rgba32i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+         %21 = OpConstantNull %v2uint
+      %v4int = OpTypeVector %int 4
+         %23 = OpConstantNull %v4int
+         %24 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureStore_52f503 = OpFunction %void None %13
+         %16 = OpLabel
+         %18 = OpLoad %11 %arg_0
+               OpImageWrite %18 %21 %23
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %24
+         %26 = OpLabel
+         %27 = OpFunctionCall %void %textureStore_52f503
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %29 = OpLabel
+         %30 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %30
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %textureStore_52f503
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %textureStore_52f503
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/52f503.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/52f503.wgsl.expected.wgsl
new file mode 100644
index 0000000..61ad0ec
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/52f503.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d<rgba32sint, write>;
+
+fn textureStore_52f503() {
+  textureStore(arg_0, vec2<u32>(), vec4<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_52f503();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_52f503();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_52f503();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/5841f8.wgsl b/test/tint/builtins/gen/literal/textureStore/5841f8.wgsl
new file mode 100644
index 0000000..1a7d7ba
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/5841f8.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: u32, value: vec4<f32>)
+fn textureStore_5841f8() {
+  textureStore(arg_0, vec2<u32>(), 1u, vec4<f32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_5841f8();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_5841f8();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_5841f8();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/5841f8.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/5841f8.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..f8784c5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/5841f8.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2DArray<float4> arg_0 : register(u0, space1);
+
+void textureStore_5841f8() {
+  arg_0[uint3(0u, 0u, 1u)] = (0.0f).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_5841f8();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_5841f8();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_5841f8();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/5841f8.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/5841f8.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..f8784c5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/5841f8.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2DArray<float4> arg_0 : register(u0, space1);
+
+void textureStore_5841f8() {
+  arg_0[uint3(0u, 0u, 1u)] = (0.0f).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_5841f8();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_5841f8();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_5841f8();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/5841f8.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/5841f8.wgsl.expected.glsl
new file mode 100644
index 0000000..a1b2d3c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/5841f8.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+layout(rgba32f) uniform highp writeonly image2DArray arg_0;
+void textureStore_5841f8() {
+  imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), vec4(0.0f));
+}
+
+vec4 vertex_main() {
+  textureStore_5841f8();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = 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_5841f8() {
+  imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), vec4(0.0f));
+}
+
+void fragment_main() {
+  textureStore_5841f8();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+layout(rgba32f) uniform highp writeonly image2DArray arg_0;
+void textureStore_5841f8() {
+  imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), vec4(0.0f));
+}
+
+void compute_main() {
+  textureStore_5841f8();
+}
+
+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/5841f8.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/5841f8.wgsl.expected.msl
new file mode 100644
index 0000000..691fffc
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/5841f8.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_5841f8(texture2d_array<float, access::write> tint_symbol_1) {
+  tint_symbol_1.write(float4(0.0f), uint2(uint2(0u)), 1u);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<float, access::write> tint_symbol_2) {
+  textureStore_5841f8(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_5841f8(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d_array<float, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureStore_5841f8(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureStore/5841f8.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/5841f8.wgsl.expected.spvasm
new file mode 100644
index 0000000..27b2fce
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/5841f8.wgsl.expected.spvasm
@@ -0,0 +1,73 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 37
+; 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_5841f8 "textureStore_5841f8"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_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
+     %uint_1 = OpConstant %uint 1
+         %22 = OpConstantComposite %v3uint %uint_0 %uint_0 %uint_1
+         %23 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureStore_5841f8 = OpFunction %void None %12
+         %15 = OpLabel
+         %17 = OpLoad %11 %arg_0
+               OpImageWrite %17 %22 %5
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %23
+         %25 = OpLabel
+         %26 = OpFunctionCall %void %textureStore_5841f8
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+         %28 = OpLabel
+         %29 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %29
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %textureStore_5841f8
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %12
+         %35 = OpLabel
+         %36 = OpFunctionCall %void %textureStore_5841f8
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/5841f8.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/5841f8.wgsl.expected.wgsl
new file mode 100644
index 0000000..8881fcc
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/5841f8.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba32float, write>;
+
+fn textureStore_5841f8() {
+  textureStore(arg_0, vec2<u32>(), 1u, vec4<f32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_5841f8();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_5841f8();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_5841f8();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/5bc4f3.wgsl b/test/tint/builtins/gen/literal/textureStore/5bc4f3.wgsl
new file mode 100644
index 0000000..9b03422
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/5bc4f3.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: u32, value: vec4<u32>)
+fn textureStore_5bc4f3() {
+  textureStore(arg_0, vec2<u32>(), 1u, vec4<u32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_5bc4f3();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_5bc4f3();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_5bc4f3();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/5bc4f3.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/5bc4f3.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..729e6f7
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/5bc4f3.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2DArray<uint4> arg_0 : register(u0, space1);
+
+void textureStore_5bc4f3() {
+  arg_0[uint3(0u, 0u, 1u)] = (0u).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_5bc4f3();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_5bc4f3();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_5bc4f3();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/5bc4f3.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/5bc4f3.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..729e6f7
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/5bc4f3.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2DArray<uint4> arg_0 : register(u0, space1);
+
+void textureStore_5bc4f3() {
+  arg_0[uint3(0u, 0u, 1u)] = (0u).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_5bc4f3();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_5bc4f3();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_5bc4f3();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/5bc4f3.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/5bc4f3.wgsl.expected.glsl
new file mode 100644
index 0000000..161d80f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/5bc4f3.wgsl.expected.glsl
@@ -0,0 +1,75 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rg32ui) uniform highp writeonly uimage2DArray arg_0;
+void textureStore_5bc4f3() {
+  imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), uvec4(0u));
+}
+
+vec4 vertex_main() {
+  textureStore_5bc4f3();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  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_5bc4f3() {
+  imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), uvec4(0u));
+}
+
+void fragment_main() {
+  textureStore_5bc4f3();
+}
+
+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_5bc4f3() {
+  imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), uvec4(0u));
+}
+
+void compute_main() {
+  textureStore_5bc4f3();
+}
+
+layout(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/5bc4f3.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/5bc4f3.wgsl.expected.msl
new file mode 100644
index 0000000..9cb2ab3
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/5bc4f3.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_5bc4f3(texture2d_array<uint, access::write> tint_symbol_1) {
+  tint_symbol_1.write(uint4(0u), uint2(uint2(0u)), 1u);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<uint, access::write> tint_symbol_2) {
+  textureStore_5bc4f3(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_5bc4f3(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d_array<uint, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureStore_5bc4f3(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureStore/5bc4f3.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/5bc4f3.wgsl.expected.spvasm
new file mode 100644
index 0000000..297fd44
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/5bc4f3.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_5bc4f3 "textureStore_5bc4f3"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_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
+     %uint_1 = OpConstant %uint 1
+         %22 = OpConstantComposite %v3uint %uint_0 %uint_0 %uint_1
+     %v4uint = OpTypeVector %uint 4
+         %24 = OpConstantNull %v4uint
+         %25 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureStore_5bc4f3 = OpFunction %void None %13
+         %16 = OpLabel
+         %18 = OpLoad %11 %arg_0
+               OpImageWrite %18 %22 %24
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %25
+         %27 = OpLabel
+         %28 = OpFunctionCall %void %textureStore_5bc4f3
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %30 = OpLabel
+         %31 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %31
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %textureStore_5bc4f3
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %37 = OpLabel
+         %38 = OpFunctionCall %void %textureStore_5bc4f3
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/5bc4f3.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/5bc4f3.wgsl.expected.wgsl
new file mode 100644
index 0000000..840e0f3
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/5bc4f3.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rg32uint, write>;
+
+fn textureStore_5bc4f3() {
+  textureStore(arg_0, vec2<u32>(), 1u, vec4<u32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_5bc4f3();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_5bc4f3();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_5bc4f3();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/5f9a49.wgsl b/test/tint/builtins/gen/literal/textureStore/5f9a49.wgsl
new file mode 100644
index 0000000..cb02f5f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/5f9a49.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: u32, value: vec4<f32>)
+fn textureStore_5f9a49() {
+  textureStore(arg_0, vec2<u32>(), 1u, vec4<f32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_5f9a49();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_5f9a49();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_5f9a49();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/5f9a49.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/5f9a49.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..da08207
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/5f9a49.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2DArray<float4> arg_0 : register(u0, space1);
+
+void textureStore_5f9a49() {
+  arg_0[uint3(0u, 0u, 1u)] = (0.0f).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_5f9a49();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_5f9a49();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_5f9a49();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/5f9a49.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/5f9a49.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..da08207
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/5f9a49.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2DArray<float4> arg_0 : register(u0, space1);
+
+void textureStore_5f9a49() {
+  arg_0[uint3(0u, 0u, 1u)] = (0.0f).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_5f9a49();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_5f9a49();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_5f9a49();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/5f9a49.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/5f9a49.wgsl.expected.glsl
new file mode 100644
index 0000000..24392ad
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/5f9a49.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+layout(rgba8_snorm) uniform highp writeonly image2DArray arg_0;
+void textureStore_5f9a49() {
+  imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), vec4(0.0f));
+}
+
+vec4 vertex_main() {
+  textureStore_5f9a49();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = 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_5f9a49() {
+  imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), vec4(0.0f));
+}
+
+void fragment_main() {
+  textureStore_5f9a49();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+layout(rgba8_snorm) uniform highp writeonly image2DArray arg_0;
+void textureStore_5f9a49() {
+  imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), vec4(0.0f));
+}
+
+void compute_main() {
+  textureStore_5f9a49();
+}
+
+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/5f9a49.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/5f9a49.wgsl.expected.msl
new file mode 100644
index 0000000..f6b2d1b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/5f9a49.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_5f9a49(texture2d_array<float, access::write> tint_symbol_1) {
+  tint_symbol_1.write(float4(0.0f), uint2(uint2(0u)), 1u);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<float, access::write> tint_symbol_2) {
+  textureStore_5f9a49(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_5f9a49(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d_array<float, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureStore_5f9a49(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureStore/5f9a49.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/5f9a49.wgsl.expected.spvasm
new file mode 100644
index 0000000..7a64ab7
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/5f9a49.wgsl.expected.spvasm
@@ -0,0 +1,73 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 37
+; 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_5f9a49 "textureStore_5f9a49"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_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
+     %uint_1 = OpConstant %uint 1
+         %22 = OpConstantComposite %v3uint %uint_0 %uint_0 %uint_1
+         %23 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureStore_5f9a49 = OpFunction %void None %12
+         %15 = OpLabel
+         %17 = OpLoad %11 %arg_0
+               OpImageWrite %17 %22 %5
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %23
+         %25 = OpLabel
+         %26 = OpFunctionCall %void %textureStore_5f9a49
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+         %28 = OpLabel
+         %29 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %29
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %textureStore_5f9a49
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %12
+         %35 = OpLabel
+         %36 = OpFunctionCall %void %textureStore_5f9a49
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/5f9a49.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/5f9a49.wgsl.expected.wgsl
new file mode 100644
index 0000000..97187c8
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/5f9a49.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba8snorm, write>;
+
+fn textureStore_5f9a49() {
+  textureStore(arg_0, vec2<u32>(), 1u, vec4<f32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_5f9a49();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_5f9a49();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_5f9a49();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/602b5a.wgsl b/test/tint/builtins/gen/literal/textureStore/602b5a.wgsl
new file mode 100644
index 0000000..ba90890
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/602b5a.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_1d<rg32float, write>;
+
+// fn textureStore(texture: texture_storage_1d<rg32float, write>, coords: u32, value: vec4<f32>)
+fn textureStore_602b5a() {
+  textureStore(arg_0, 1u, vec4<f32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_602b5a();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_602b5a();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_602b5a();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/602b5a.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/602b5a.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..4f0db55
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/602b5a.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture1D<float4> arg_0 : register(u0, space1);
+
+void textureStore_602b5a() {
+  arg_0[1u] = (0.0f).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_602b5a();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_602b5a();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_602b5a();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/602b5a.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/602b5a.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..4f0db55
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/602b5a.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture1D<float4> arg_0 : register(u0, space1);
+
+void textureStore_602b5a() {
+  arg_0[1u] = (0.0f).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_602b5a();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_602b5a();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_602b5a();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/602b5a.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/602b5a.wgsl.expected.glsl
new file mode 100644
index 0000000..f342c66
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/602b5a.wgsl.expected.glsl
@@ -0,0 +1,75 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rg32f) uniform highp writeonly image1D arg_0;
+void textureStore_602b5a() {
+  imageStore(arg_0, int(1u), vec4(0.0f));
+}
+
+vec4 vertex_main() {
+  textureStore_602b5a();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+layout(rg32f) uniform highp writeonly image1D arg_0;
+void textureStore_602b5a() {
+  imageStore(arg_0, int(1u), vec4(0.0f));
+}
+
+void fragment_main() {
+  textureStore_602b5a();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'image load-store format' : not supported with this profile: es
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rg32f) uniform highp writeonly image1D arg_0;
+void textureStore_602b5a() {
+  imageStore(arg_0, int(1u), vec4(0.0f));
+}
+
+void compute_main() {
+  textureStore_602b5a();
+}
+
+layout(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/602b5a.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/602b5a.wgsl.expected.msl
new file mode 100644
index 0000000..c41e010
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/602b5a.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_602b5a(texture1d<float, access::write> tint_symbol_1) {
+  tint_symbol_1.write(float4(0.0f), uint(1u));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<float, access::write> tint_symbol_2) {
+  textureStore_602b5a(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<float, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<float, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureStore_602b5a(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture1d<float, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureStore_602b5a(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureStore/602b5a.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/602b5a.wgsl.expected.spvasm
new file mode 100644
index 0000000..93c189d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/602b5a.wgsl.expected.spvasm
@@ -0,0 +1,72 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 34
+; Schema: 0
+               OpCapability Shader
+               OpCapability Image1D
+               OpCapability StorageImageExtendedFormats
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureStore_602b5a "textureStore_602b5a"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 1D 0 0 0 2 Rg32f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %12 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+         %20 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureStore_602b5a = OpFunction %void None %12
+         %15 = OpLabel
+         %17 = OpLoad %11 %arg_0
+               OpImageWrite %17 %uint_1 %5
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %20
+         %22 = OpLabel
+         %23 = OpFunctionCall %void %textureStore_602b5a
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+         %25 = OpLabel
+         %26 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %26
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %textureStore_602b5a
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %12
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %textureStore_602b5a
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/602b5a.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/602b5a.wgsl.expected.wgsl
new file mode 100644
index 0000000..a7c2f31
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/602b5a.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_1d<rg32float, write>;
+
+fn textureStore_602b5a() {
+  textureStore(arg_0, 1u, vec4<f32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_602b5a();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_602b5a();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_602b5a();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/699a1b.wgsl b/test/tint/builtins/gen/literal/textureStore/699a1b.wgsl
new file mode 100644
index 0000000..0b39052
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/699a1b.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: u32, value: vec4<f32>)
+fn textureStore_699a1b() {
+  textureStore(arg_0, vec2<u32>(), 1u, vec4<f32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_699a1b();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_699a1b();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_699a1b();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/699a1b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/699a1b.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..f3d78c6
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/699a1b.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2DArray<float4> arg_0 : register(u0, space1);
+
+void textureStore_699a1b() {
+  arg_0[uint3(0u, 0u, 1u)] = (0.0f).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_699a1b();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_699a1b();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_699a1b();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/699a1b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/699a1b.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..f3d78c6
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/699a1b.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2DArray<float4> arg_0 : register(u0, space1);
+
+void textureStore_699a1b() {
+  arg_0[uint3(0u, 0u, 1u)] = (0.0f).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_699a1b();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_699a1b();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_699a1b();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/699a1b.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/699a1b.wgsl.expected.glsl
new file mode 100644
index 0000000..6b80b95
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/699a1b.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+layout(r32f) uniform highp writeonly image2DArray arg_0;
+void textureStore_699a1b() {
+  imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), vec4(0.0f));
+}
+
+vec4 vertex_main() {
+  textureStore_699a1b();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = 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_699a1b() {
+  imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), vec4(0.0f));
+}
+
+void fragment_main() {
+  textureStore_699a1b();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+layout(r32f) uniform highp writeonly image2DArray arg_0;
+void textureStore_699a1b() {
+  imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), vec4(0.0f));
+}
+
+void compute_main() {
+  textureStore_699a1b();
+}
+
+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/699a1b.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/699a1b.wgsl.expected.msl
new file mode 100644
index 0000000..4c739f8
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/699a1b.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_699a1b(texture2d_array<float, access::write> tint_symbol_1) {
+  tint_symbol_1.write(float4(0.0f), uint2(uint2(0u)), 1u);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<float, access::write> tint_symbol_2) {
+  textureStore_699a1b(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_699a1b(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d_array<float, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureStore_699a1b(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureStore/699a1b.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/699a1b.wgsl.expected.spvasm
new file mode 100644
index 0000000..b8f5015
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/699a1b.wgsl.expected.spvasm
@@ -0,0 +1,73 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 37
+; 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_699a1b "textureStore_699a1b"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_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
+     %uint_1 = OpConstant %uint 1
+         %22 = OpConstantComposite %v3uint %uint_0 %uint_0 %uint_1
+         %23 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureStore_699a1b = OpFunction %void None %12
+         %15 = OpLabel
+         %17 = OpLoad %11 %arg_0
+               OpImageWrite %17 %22 %5
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %23
+         %25 = OpLabel
+         %26 = OpFunctionCall %void %textureStore_699a1b
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+         %28 = OpLabel
+         %29 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %29
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %textureStore_699a1b
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %12
+         %35 = OpLabel
+         %36 = OpFunctionCall %void %textureStore_699a1b
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/699a1b.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/699a1b.wgsl.expected.wgsl
new file mode 100644
index 0000000..7585470
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/699a1b.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<r32float, write>;
+
+fn textureStore_699a1b() {
+  textureStore(arg_0, vec2<u32>(), 1u, vec4<f32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_699a1b();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_699a1b();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_699a1b();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/726472.wgsl b/test/tint/builtins/gen/literal/textureStore/726472.wgsl
new file mode 100644
index 0000000..ff91148
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/726472.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d<rg32float, write>;
+
+// fn textureStore(texture: texture_storage_2d<rg32float, write>, coords: vec2<u32>, value: vec4<f32>)
+fn textureStore_726472() {
+  textureStore(arg_0, vec2<u32>(), vec4<f32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_726472();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_726472();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_726472();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/726472.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/726472.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..9c62e84
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/726472.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2D<float4> arg_0 : register(u0, space1);
+
+void textureStore_726472() {
+  arg_0[(0u).xx] = (0.0f).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_726472();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_726472();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_726472();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/726472.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/726472.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..9c62e84
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/726472.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2D<float4> arg_0 : register(u0, space1);
+
+void textureStore_726472() {
+  arg_0[(0u).xx] = (0.0f).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_726472();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_726472();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_726472();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/726472.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/726472.wgsl.expected.glsl
new file mode 100644
index 0000000..812e349
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/726472.wgsl.expected.glsl
@@ -0,0 +1,75 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rg32f) uniform highp writeonly image2D arg_0;
+void textureStore_726472() {
+  imageStore(arg_0, ivec2(uvec2(0u)), vec4(0.0f));
+}
+
+vec4 vertex_main() {
+  textureStore_726472();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+layout(rg32f) uniform highp writeonly image2D arg_0;
+void textureStore_726472() {
+  imageStore(arg_0, ivec2(uvec2(0u)), vec4(0.0f));
+}
+
+void fragment_main() {
+  textureStore_726472();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'image load-store format' : not supported with this profile: es
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rg32f) uniform highp writeonly image2D arg_0;
+void textureStore_726472() {
+  imageStore(arg_0, ivec2(uvec2(0u)), vec4(0.0f));
+}
+
+void compute_main() {
+  textureStore_726472();
+}
+
+layout(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/726472.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/726472.wgsl.expected.msl
new file mode 100644
index 0000000..f2fa086
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/726472.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_726472(texture2d<float, access::write> tint_symbol_1) {
+  tint_symbol_1.write(float4(0.0f), uint2(uint2(0u)));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<float, access::write> tint_symbol_2) {
+  textureStore_726472(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<float, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<float, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureStore_726472(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d<float, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureStore_726472(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureStore/726472.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/726472.wgsl.expected.spvasm
new file mode 100644
index 0000000..ead0f58
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/726472.wgsl.expected.spvasm
@@ -0,0 +1,72 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 35
+; 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_726472 "textureStore_726472"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 0 0 2 Rg32f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %12 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+         %20 = OpConstantNull %v2uint
+         %21 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureStore_726472 = OpFunction %void None %12
+         %15 = OpLabel
+         %17 = OpLoad %11 %arg_0
+               OpImageWrite %17 %20 %5
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %21
+         %23 = OpLabel
+         %24 = OpFunctionCall %void %textureStore_726472
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+         %26 = OpLabel
+         %27 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %27
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+         %30 = OpLabel
+         %31 = OpFunctionCall %void %textureStore_726472
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %12
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %textureStore_726472
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/726472.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/726472.wgsl.expected.wgsl
new file mode 100644
index 0000000..87ae30c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/726472.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d<rg32float, write>;
+
+fn textureStore_726472() {
+  textureStore(arg_0, vec2<u32>(), vec4<f32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_726472();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_726472();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_726472();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/73bbbc.wgsl b/test/tint/builtins/gen/literal/textureStore/73bbbc.wgsl
new file mode 100644
index 0000000..5498680
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/73bbbc.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d<rgba8unorm, write>;
+
+// fn textureStore(texture: texture_storage_2d<rgba8unorm, write>, coords: vec2<u32>, value: vec4<f32>)
+fn textureStore_73bbbc() {
+  textureStore(arg_0, vec2<u32>(), vec4<f32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_73bbbc();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_73bbbc();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_73bbbc();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/73bbbc.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/73bbbc.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..c0e09e4
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/73bbbc.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2D<float4> arg_0 : register(u0, space1);
+
+void textureStore_73bbbc() {
+  arg_0[(0u).xx] = (0.0f).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_73bbbc();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_73bbbc();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_73bbbc();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/73bbbc.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/73bbbc.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..c0e09e4
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/73bbbc.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2D<float4> arg_0 : register(u0, space1);
+
+void textureStore_73bbbc() {
+  arg_0[(0u).xx] = (0.0f).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_73bbbc();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_73bbbc();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_73bbbc();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/73bbbc.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/73bbbc.wgsl.expected.glsl
new file mode 100644
index 0000000..ea855e6
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/73bbbc.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+layout(rgba8) uniform highp writeonly image2D arg_0;
+void textureStore_73bbbc() {
+  imageStore(arg_0, ivec2(uvec2(0u)), vec4(0.0f));
+}
+
+vec4 vertex_main() {
+  textureStore_73bbbc();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+layout(rgba8) uniform highp writeonly image2D arg_0;
+void textureStore_73bbbc() {
+  imageStore(arg_0, ivec2(uvec2(0u)), vec4(0.0f));
+}
+
+void fragment_main() {
+  textureStore_73bbbc();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+layout(rgba8) uniform highp writeonly image2D arg_0;
+void textureStore_73bbbc() {
+  imageStore(arg_0, ivec2(uvec2(0u)), vec4(0.0f));
+}
+
+void compute_main() {
+  textureStore_73bbbc();
+}
+
+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/73bbbc.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/73bbbc.wgsl.expected.msl
new file mode 100644
index 0000000..3c94e3d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/73bbbc.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_73bbbc(texture2d<float, access::write> tint_symbol_1) {
+  tint_symbol_1.write(float4(0.0f), uint2(uint2(0u)));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<float, access::write> tint_symbol_2) {
+  textureStore_73bbbc(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<float, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<float, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureStore_73bbbc(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d<float, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureStore_73bbbc(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureStore/73bbbc.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/73bbbc.wgsl.expected.spvasm
new file mode 100644
index 0000000..2f84672
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/73bbbc.wgsl.expected.spvasm
@@ -0,0 +1,71 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 35
+; 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_73bbbc "textureStore_73bbbc"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 0 0 2 Rgba8
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %12 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+         %20 = OpConstantNull %v2uint
+         %21 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureStore_73bbbc = OpFunction %void None %12
+         %15 = OpLabel
+         %17 = OpLoad %11 %arg_0
+               OpImageWrite %17 %20 %5
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %21
+         %23 = OpLabel
+         %24 = OpFunctionCall %void %textureStore_73bbbc
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+         %26 = OpLabel
+         %27 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %27
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+         %30 = OpLabel
+         %31 = OpFunctionCall %void %textureStore_73bbbc
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %12
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %textureStore_73bbbc
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/73bbbc.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/73bbbc.wgsl.expected.wgsl
new file mode 100644
index 0000000..9ad3038
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/73bbbc.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d<rgba8unorm, write>;
+
+fn textureStore_73bbbc() {
+  textureStore(arg_0, vec2<u32>(), vec4<f32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_73bbbc();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_73bbbc();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_73bbbc();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/779d14.wgsl b/test/tint/builtins/gen/literal/textureStore/779d14.wgsl
new file mode 100644
index 0000000..464bf9d3
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/779d14.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: u32, value: vec4<u32>)
+fn textureStore_779d14() {
+  textureStore(arg_0, vec2<u32>(), 1u, vec4<u32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_779d14();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_779d14();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_779d14();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/779d14.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/779d14.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..253eae2
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/779d14.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2DArray<uint4> arg_0 : register(u0, space1);
+
+void textureStore_779d14() {
+  arg_0[uint3(0u, 0u, 1u)] = (0u).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_779d14();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_779d14();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_779d14();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/779d14.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/779d14.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..253eae2
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/779d14.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2DArray<uint4> arg_0 : register(u0, space1);
+
+void textureStore_779d14() {
+  arg_0[uint3(0u, 0u, 1u)] = (0u).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_779d14();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_779d14();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_779d14();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/779d14.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/779d14.wgsl.expected.glsl
new file mode 100644
index 0000000..01199d0
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/779d14.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+layout(rgba16ui) uniform highp writeonly uimage2DArray arg_0;
+void textureStore_779d14() {
+  imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), uvec4(0u));
+}
+
+vec4 vertex_main() {
+  textureStore_779d14();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = 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_779d14() {
+  imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), uvec4(0u));
+}
+
+void fragment_main() {
+  textureStore_779d14();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+layout(rgba16ui) uniform highp writeonly uimage2DArray arg_0;
+void textureStore_779d14() {
+  imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), uvec4(0u));
+}
+
+void compute_main() {
+  textureStore_779d14();
+}
+
+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/779d14.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/779d14.wgsl.expected.msl
new file mode 100644
index 0000000..0593462
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/779d14.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_779d14(texture2d_array<uint, access::write> tint_symbol_1) {
+  tint_symbol_1.write(uint4(0u), uint2(uint2(0u)), 1u);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<uint, access::write> tint_symbol_2) {
+  textureStore_779d14(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_779d14(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d_array<uint, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureStore_779d14(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureStore/779d14.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/779d14.wgsl.expected.spvasm
new file mode 100644
index 0000000..affc5ee
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/779d14.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_779d14 "textureStore_779d14"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_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
+     %uint_1 = OpConstant %uint 1
+         %22 = OpConstantComposite %v3uint %uint_0 %uint_0 %uint_1
+     %v4uint = OpTypeVector %uint 4
+         %24 = OpConstantNull %v4uint
+         %25 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureStore_779d14 = OpFunction %void None %13
+         %16 = OpLabel
+         %18 = OpLoad %11 %arg_0
+               OpImageWrite %18 %22 %24
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %25
+         %27 = OpLabel
+         %28 = OpFunctionCall %void %textureStore_779d14
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %30 = OpLabel
+         %31 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %31
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %textureStore_779d14
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %37 = OpLabel
+         %38 = OpFunctionCall %void %textureStore_779d14
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/779d14.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/779d14.wgsl.expected.wgsl
new file mode 100644
index 0000000..baf07fd
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/779d14.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba16uint, write>;
+
+fn textureStore_779d14() {
+  textureStore(arg_0, vec2<u32>(), 1u, vec4<u32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_779d14();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_779d14();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_779d14();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/7cf6e7.wgsl b/test/tint/builtins/gen/literal/textureStore/7cf6e7.wgsl
new file mode 100644
index 0000000..72e6ebf
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/7cf6e7.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d<rgba16float, write>;
+
+// fn textureStore(texture: texture_storage_2d<rgba16float, write>, coords: vec2<u32>, value: vec4<f32>)
+fn textureStore_7cf6e7() {
+  textureStore(arg_0, vec2<u32>(), vec4<f32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_7cf6e7();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_7cf6e7();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_7cf6e7();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/7cf6e7.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/7cf6e7.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..59d0258
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/7cf6e7.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2D<float4> arg_0 : register(u0, space1);
+
+void textureStore_7cf6e7() {
+  arg_0[(0u).xx] = (0.0f).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_7cf6e7();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_7cf6e7();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_7cf6e7();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/7cf6e7.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/7cf6e7.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..59d0258
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/7cf6e7.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2D<float4> arg_0 : register(u0, space1);
+
+void textureStore_7cf6e7() {
+  arg_0[(0u).xx] = (0.0f).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_7cf6e7();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_7cf6e7();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_7cf6e7();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/7cf6e7.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/7cf6e7.wgsl.expected.glsl
new file mode 100644
index 0000000..cfd83a1
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/7cf6e7.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+layout(rgba16f) uniform highp writeonly image2D arg_0;
+void textureStore_7cf6e7() {
+  imageStore(arg_0, ivec2(uvec2(0u)), vec4(0.0f));
+}
+
+vec4 vertex_main() {
+  textureStore_7cf6e7();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+layout(rgba16f) uniform highp writeonly image2D arg_0;
+void textureStore_7cf6e7() {
+  imageStore(arg_0, ivec2(uvec2(0u)), vec4(0.0f));
+}
+
+void fragment_main() {
+  textureStore_7cf6e7();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+layout(rgba16f) uniform highp writeonly image2D arg_0;
+void textureStore_7cf6e7() {
+  imageStore(arg_0, ivec2(uvec2(0u)), vec4(0.0f));
+}
+
+void compute_main() {
+  textureStore_7cf6e7();
+}
+
+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/7cf6e7.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/7cf6e7.wgsl.expected.msl
new file mode 100644
index 0000000..9140107
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/7cf6e7.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_7cf6e7(texture2d<float, access::write> tint_symbol_1) {
+  tint_symbol_1.write(float4(0.0f), uint2(uint2(0u)));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<float, access::write> tint_symbol_2) {
+  textureStore_7cf6e7(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<float, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<float, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureStore_7cf6e7(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d<float, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureStore_7cf6e7(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureStore/7cf6e7.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/7cf6e7.wgsl.expected.spvasm
new file mode 100644
index 0000000..b2ba99c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/7cf6e7.wgsl.expected.spvasm
@@ -0,0 +1,71 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 35
+; 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_7cf6e7 "textureStore_7cf6e7"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 0 0 2 Rgba16f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %12 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+         %20 = OpConstantNull %v2uint
+         %21 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureStore_7cf6e7 = OpFunction %void None %12
+         %15 = OpLabel
+         %17 = OpLoad %11 %arg_0
+               OpImageWrite %17 %20 %5
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %21
+         %23 = OpLabel
+         %24 = OpFunctionCall %void %textureStore_7cf6e7
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+         %26 = OpLabel
+         %27 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %27
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+         %30 = OpLabel
+         %31 = OpFunctionCall %void %textureStore_7cf6e7
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %12
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %textureStore_7cf6e7
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/7cf6e7.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/7cf6e7.wgsl.expected.wgsl
new file mode 100644
index 0000000..8a201a5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/7cf6e7.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d<rgba16float, write>;
+
+fn textureStore_7cf6e7() {
+  textureStore(arg_0, vec2<u32>(), vec4<f32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_7cf6e7();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_7cf6e7();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_7cf6e7();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/8b9310.wgsl b/test/tint/builtins/gen/literal/textureStore/8b9310.wgsl
new file mode 100644
index 0000000..e60ce76
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/8b9310.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_3d<rgba16float, write>;
+
+// fn textureStore(texture: texture_storage_3d<rgba16float, write>, coords: vec3<u32>, value: vec4<f32>)
+fn textureStore_8b9310() {
+  textureStore(arg_0, vec3<u32>(), vec4<f32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_8b9310();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_8b9310();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_8b9310();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/8b9310.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/8b9310.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..1f1d30e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/8b9310.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture3D<float4> arg_0 : register(u0, space1);
+
+void textureStore_8b9310() {
+  arg_0[(0u).xxx] = (0.0f).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_8b9310();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_8b9310();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_8b9310();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/8b9310.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/8b9310.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..1f1d30e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/8b9310.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture3D<float4> arg_0 : register(u0, space1);
+
+void textureStore_8b9310() {
+  arg_0[(0u).xxx] = (0.0f).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_8b9310();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_8b9310();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_8b9310();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/8b9310.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/8b9310.wgsl.expected.glsl
new file mode 100644
index 0000000..59512b5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/8b9310.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+layout(rgba16f) uniform highp writeonly image3D arg_0;
+void textureStore_8b9310() {
+  imageStore(arg_0, ivec3(uvec3(0u)), vec4(0.0f));
+}
+
+vec4 vertex_main() {
+  textureStore_8b9310();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+layout(rgba16f) uniform highp writeonly image3D arg_0;
+void textureStore_8b9310() {
+  imageStore(arg_0, ivec3(uvec3(0u)), vec4(0.0f));
+}
+
+void fragment_main() {
+  textureStore_8b9310();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+layout(rgba16f) uniform highp writeonly image3D arg_0;
+void textureStore_8b9310() {
+  imageStore(arg_0, ivec3(uvec3(0u)), vec4(0.0f));
+}
+
+void compute_main() {
+  textureStore_8b9310();
+}
+
+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/8b9310.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/8b9310.wgsl.expected.msl
new file mode 100644
index 0000000..770d905
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/8b9310.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_8b9310(texture3d<float, access::write> tint_symbol_1) {
+  tint_symbol_1.write(float4(0.0f), uint3(uint3(0u)));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<float, access::write> tint_symbol_2) {
+  textureStore_8b9310(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<float, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture3d<float, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureStore_8b9310(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture3d<float, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureStore_8b9310(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureStore/8b9310.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/8b9310.wgsl.expected.spvasm
new file mode 100644
index 0000000..65de91fe
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/8b9310.wgsl.expected.spvasm
@@ -0,0 +1,71 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 35
+; 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_8b9310 "textureStore_8b9310"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 3D 0 0 0 2 Rgba16f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %12 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v3uint = OpTypeVector %uint 3
+         %20 = OpConstantNull %v3uint
+         %21 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureStore_8b9310 = OpFunction %void None %12
+         %15 = OpLabel
+         %17 = OpLoad %11 %arg_0
+               OpImageWrite %17 %20 %5
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %21
+         %23 = OpLabel
+         %24 = OpFunctionCall %void %textureStore_8b9310
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+         %26 = OpLabel
+         %27 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %27
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+         %30 = OpLabel
+         %31 = OpFunctionCall %void %textureStore_8b9310
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %12
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %textureStore_8b9310
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/8b9310.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/8b9310.wgsl.expected.wgsl
new file mode 100644
index 0000000..d0c0b53
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/8b9310.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_3d<rgba16float, write>;
+
+fn textureStore_8b9310() {
+  textureStore(arg_0, vec3<u32>(), vec4<f32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_8b9310();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_8b9310();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_8b9310();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/8bb287.wgsl b/test/tint/builtins/gen/literal/textureStore/8bb287.wgsl
new file mode 100644
index 0000000..d0da1e5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/8bb287.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: u32, value: vec4<i32>)
+fn textureStore_8bb287() {
+  textureStore(arg_0, vec2<u32>(), 1u, vec4<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_8bb287();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_8bb287();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_8bb287();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/8bb287.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/8bb287.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..418bf3d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/8bb287.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2DArray<int4> arg_0 : register(u0, space1);
+
+void textureStore_8bb287() {
+  arg_0[uint3(0u, 0u, 1u)] = (0).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_8bb287();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_8bb287();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_8bb287();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/8bb287.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/8bb287.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..418bf3d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/8bb287.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2DArray<int4> arg_0 : register(u0, space1);
+
+void textureStore_8bb287() {
+  arg_0[uint3(0u, 0u, 1u)] = (0).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_8bb287();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_8bb287();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_8bb287();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/8bb287.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/8bb287.wgsl.expected.glsl
new file mode 100644
index 0000000..da9c76e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/8bb287.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+layout(rgba32i) uniform highp writeonly iimage2DArray arg_0;
+void textureStore_8bb287() {
+  imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), ivec4(0));
+}
+
+vec4 vertex_main() {
+  textureStore_8bb287();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = 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_8bb287() {
+  imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), ivec4(0));
+}
+
+void fragment_main() {
+  textureStore_8bb287();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+layout(rgba32i) uniform highp writeonly iimage2DArray arg_0;
+void textureStore_8bb287() {
+  imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), ivec4(0));
+}
+
+void compute_main() {
+  textureStore_8bb287();
+}
+
+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/8bb287.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/8bb287.wgsl.expected.msl
new file mode 100644
index 0000000..4421d40
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/8bb287.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_8bb287(texture2d_array<int, access::write> tint_symbol_1) {
+  tint_symbol_1.write(int4(0), uint2(uint2(0u)), 1u);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<int, access::write> tint_symbol_2) {
+  textureStore_8bb287(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_8bb287(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d_array<int, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureStore_8bb287(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureStore/8bb287.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/8bb287.wgsl.expected.spvasm
new file mode 100644
index 0000000..e1b64d2
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/8bb287.wgsl.expected.spvasm
@@ -0,0 +1,76 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 40
+; 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_8bb287 "textureStore_8bb287"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_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
+     %uint_1 = OpConstant %uint 1
+         %23 = OpConstantComposite %v3uint %uint_0 %uint_0 %uint_1
+      %v4int = OpTypeVector %int 4
+         %25 = OpConstantNull %v4int
+         %26 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureStore_8bb287 = OpFunction %void None %13
+         %16 = OpLabel
+         %18 = OpLoad %11 %arg_0
+               OpImageWrite %18 %23 %25
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %26
+         %28 = OpLabel
+         %29 = OpFunctionCall %void %textureStore_8bb287
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %31 = OpLabel
+         %32 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %32
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %35 = OpLabel
+         %36 = OpFunctionCall %void %textureStore_8bb287
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %38 = OpLabel
+         %39 = OpFunctionCall %void %textureStore_8bb287
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/8bb287.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/8bb287.wgsl.expected.wgsl
new file mode 100644
index 0000000..7719279
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/8bb287.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba32sint, write>;
+
+fn textureStore_8bb287() {
+  textureStore(arg_0, vec2<u32>(), 1u, vec4<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_8bb287();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_8bb287();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_8bb287();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/8c76e9.wgsl b/test/tint/builtins/gen/literal/textureStore/8c76e9.wgsl
new file mode 100644
index 0000000..acabd4f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/8c76e9.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_1d<rgba16sint, write>;
+
+// fn textureStore(texture: texture_storage_1d<rgba16sint, write>, coords: u32, value: vec4<i32>)
+fn textureStore_8c76e9() {
+  textureStore(arg_0, 1u, vec4<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_8c76e9();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_8c76e9();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_8c76e9();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/8c76e9.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/8c76e9.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..26e5180
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/8c76e9.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture1D<int4> arg_0 : register(u0, space1);
+
+void textureStore_8c76e9() {
+  arg_0[1u] = (0).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_8c76e9();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_8c76e9();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_8c76e9();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/8c76e9.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/8c76e9.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..26e5180
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/8c76e9.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture1D<int4> arg_0 : register(u0, space1);
+
+void textureStore_8c76e9() {
+  arg_0[1u] = (0).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_8c76e9();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_8c76e9();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_8c76e9();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/8c76e9.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/8c76e9.wgsl.expected.glsl
new file mode 100644
index 0000000..2a19ced
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/8c76e9.wgsl.expected.glsl
@@ -0,0 +1,78 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba16i) uniform highp writeonly iimage1D arg_0;
+void textureStore_8c76e9() {
+  imageStore(arg_0, int(1u), ivec4(0));
+}
+
+vec4 vertex_main() {
+  textureStore_8c76e9();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'iimage1D' : Reserved word. 
+WARNING: 0:3: 'layout' : useless application of layout qualifier 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+layout(rgba16i) uniform highp writeonly iimage1D arg_0;
+void textureStore_8c76e9() {
+  imageStore(arg_0, int(1u), ivec4(0));
+}
+
+void fragment_main() {
+  textureStore_8c76e9();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'iimage1D' : Reserved word. 
+WARNING: 0:4: 'layout' : useless application of layout qualifier 
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba16i) uniform highp writeonly iimage1D arg_0;
+void textureStore_8c76e9() {
+  imageStore(arg_0, int(1u), ivec4(0));
+}
+
+void compute_main() {
+  textureStore_8c76e9();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'iimage1D' : Reserved word. 
+WARNING: 0:3: 'layout' : useless application of layout qualifier 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureStore/8c76e9.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/8c76e9.wgsl.expected.msl
new file mode 100644
index 0000000..9d8c1e2
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/8c76e9.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_8c76e9(texture1d<int, access::write> tint_symbol_1) {
+  tint_symbol_1.write(int4(0), uint(1u));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<int, access::write> tint_symbol_2) {
+  textureStore_8c76e9(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<int, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<int, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureStore_8c76e9(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture1d<int, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureStore_8c76e9(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureStore/8c76e9.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/8c76e9.wgsl.expected.spvasm
new file mode 100644
index 0000000..14e31d5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/8c76e9.wgsl.expected.spvasm
@@ -0,0 +1,74 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 37
+; Schema: 0
+               OpCapability Shader
+               OpCapability Image1D
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureStore_8c76e9 "textureStore_8c76e9"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 1D 0 0 0 2 Rgba16i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+      %v4int = OpTypeVector %int 4
+         %22 = OpConstantNull %v4int
+         %23 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureStore_8c76e9 = OpFunction %void None %13
+         %16 = OpLabel
+         %18 = OpLoad %11 %arg_0
+               OpImageWrite %18 %uint_1 %22
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %23
+         %25 = OpLabel
+         %26 = OpFunctionCall %void %textureStore_8c76e9
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %28 = OpLabel
+         %29 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %29
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %textureStore_8c76e9
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %35 = OpLabel
+         %36 = OpFunctionCall %void %textureStore_8c76e9
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/8c76e9.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/8c76e9.wgsl.expected.wgsl
new file mode 100644
index 0000000..ec93e21
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/8c76e9.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_1d<rgba16sint, write>;
+
+fn textureStore_8c76e9() {
+  textureStore(arg_0, 1u, vec4<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_8c76e9();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_8c76e9();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_8c76e9();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/8dc54f.wgsl b/test/tint/builtins/gen/literal/textureStore/8dc54f.wgsl
new file mode 100644
index 0000000..528d387
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/8dc54f.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d<rgba8uint, write>;
+
+// fn textureStore(texture: texture_storage_2d<rgba8uint, write>, coords: vec2<u32>, value: vec4<u32>)
+fn textureStore_8dc54f() {
+  textureStore(arg_0, vec2<u32>(), vec4<u32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_8dc54f();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_8dc54f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_8dc54f();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/8dc54f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/8dc54f.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..3ef51f2
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/8dc54f.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2D<uint4> arg_0 : register(u0, space1);
+
+void textureStore_8dc54f() {
+  arg_0[(0u).xx] = (0u).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_8dc54f();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_8dc54f();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_8dc54f();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/8dc54f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/8dc54f.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..3ef51f2
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/8dc54f.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2D<uint4> arg_0 : register(u0, space1);
+
+void textureStore_8dc54f() {
+  arg_0[(0u).xx] = (0u).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_8dc54f();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_8dc54f();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_8dc54f();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/8dc54f.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/8dc54f.wgsl.expected.glsl
new file mode 100644
index 0000000..5fbcbfd
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/8dc54f.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+layout(rgba8ui) uniform highp writeonly uimage2D arg_0;
+void textureStore_8dc54f() {
+  imageStore(arg_0, ivec2(uvec2(0u)), uvec4(0u));
+}
+
+vec4 vertex_main() {
+  textureStore_8dc54f();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+layout(rgba8ui) uniform highp writeonly uimage2D arg_0;
+void textureStore_8dc54f() {
+  imageStore(arg_0, ivec2(uvec2(0u)), uvec4(0u));
+}
+
+void fragment_main() {
+  textureStore_8dc54f();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+layout(rgba8ui) uniform highp writeonly uimage2D arg_0;
+void textureStore_8dc54f() {
+  imageStore(arg_0, ivec2(uvec2(0u)), uvec4(0u));
+}
+
+void compute_main() {
+  textureStore_8dc54f();
+}
+
+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/8dc54f.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/8dc54f.wgsl.expected.msl
new file mode 100644
index 0000000..0f2343a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/8dc54f.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_8dc54f(texture2d<uint, access::write> tint_symbol_1) {
+  tint_symbol_1.write(uint4(0u), uint2(uint2(0u)));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<uint, access::write> tint_symbol_2) {
+  textureStore_8dc54f(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<uint, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<uint, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureStore_8dc54f(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d<uint, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureStore_8dc54f(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureStore/8dc54f.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/8dc54f.wgsl.expected.spvasm
new file mode 100644
index 0000000..5431052
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/8dc54f.wgsl.expected.spvasm
@@ -0,0 +1,73 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 37
+; 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_8dc54f "textureStore_8dc54f"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 2D 0 0 0 2 Rgba8ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+     %v2uint = OpTypeVector %uint 2
+         %20 = OpConstantNull %v2uint
+     %v4uint = OpTypeVector %uint 4
+         %22 = OpConstantNull %v4uint
+         %23 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureStore_8dc54f = OpFunction %void None %13
+         %16 = OpLabel
+         %18 = OpLoad %11 %arg_0
+               OpImageWrite %18 %20 %22
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %23
+         %25 = OpLabel
+         %26 = OpFunctionCall %void %textureStore_8dc54f
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %28 = OpLabel
+         %29 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %29
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %textureStore_8dc54f
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %35 = OpLabel
+         %36 = OpFunctionCall %void %textureStore_8dc54f
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/8dc54f.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/8dc54f.wgsl.expected.wgsl
new file mode 100644
index 0000000..0c6ac87
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/8dc54f.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d<rgba8uint, write>;
+
+fn textureStore_8dc54f() {
+  textureStore(arg_0, vec2<u32>(), vec4<u32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_8dc54f();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_8dc54f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_8dc54f();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/8ed9f8.wgsl b/test/tint/builtins/gen/literal/textureStore/8ed9f8.wgsl
new file mode 100644
index 0000000..99f57b3
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/8ed9f8.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_3d<rgba8unorm, write>;
+
+// fn textureStore(texture: texture_storage_3d<rgba8unorm, write>, coords: vec3<u32>, value: vec4<f32>)
+fn textureStore_8ed9f8() {
+  textureStore(arg_0, vec3<u32>(), vec4<f32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_8ed9f8();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_8ed9f8();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_8ed9f8();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/8ed9f8.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/8ed9f8.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..bfb203d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/8ed9f8.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture3D<float4> arg_0 : register(u0, space1);
+
+void textureStore_8ed9f8() {
+  arg_0[(0u).xxx] = (0.0f).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_8ed9f8();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_8ed9f8();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_8ed9f8();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/8ed9f8.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/8ed9f8.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..bfb203d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/8ed9f8.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture3D<float4> arg_0 : register(u0, space1);
+
+void textureStore_8ed9f8() {
+  arg_0[(0u).xxx] = (0.0f).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_8ed9f8();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_8ed9f8();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_8ed9f8();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/8ed9f8.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/8ed9f8.wgsl.expected.glsl
new file mode 100644
index 0000000..5a1fd66
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/8ed9f8.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+layout(rgba8) uniform highp writeonly image3D arg_0;
+void textureStore_8ed9f8() {
+  imageStore(arg_0, ivec3(uvec3(0u)), vec4(0.0f));
+}
+
+vec4 vertex_main() {
+  textureStore_8ed9f8();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+layout(rgba8) uniform highp writeonly image3D arg_0;
+void textureStore_8ed9f8() {
+  imageStore(arg_0, ivec3(uvec3(0u)), vec4(0.0f));
+}
+
+void fragment_main() {
+  textureStore_8ed9f8();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+layout(rgba8) uniform highp writeonly image3D arg_0;
+void textureStore_8ed9f8() {
+  imageStore(arg_0, ivec3(uvec3(0u)), vec4(0.0f));
+}
+
+void compute_main() {
+  textureStore_8ed9f8();
+}
+
+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/8ed9f8.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/8ed9f8.wgsl.expected.msl
new file mode 100644
index 0000000..007a32d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/8ed9f8.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_8ed9f8(texture3d<float, access::write> tint_symbol_1) {
+  tint_symbol_1.write(float4(0.0f), uint3(uint3(0u)));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<float, access::write> tint_symbol_2) {
+  textureStore_8ed9f8(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<float, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture3d<float, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureStore_8ed9f8(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture3d<float, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureStore_8ed9f8(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureStore/8ed9f8.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/8ed9f8.wgsl.expected.spvasm
new file mode 100644
index 0000000..78944bf
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/8ed9f8.wgsl.expected.spvasm
@@ -0,0 +1,71 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 35
+; 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_8ed9f8 "textureStore_8ed9f8"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 3D 0 0 0 2 Rgba8
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %12 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v3uint = OpTypeVector %uint 3
+         %20 = OpConstantNull %v3uint
+         %21 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureStore_8ed9f8 = OpFunction %void None %12
+         %15 = OpLabel
+         %17 = OpLoad %11 %arg_0
+               OpImageWrite %17 %20 %5
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %21
+         %23 = OpLabel
+         %24 = OpFunctionCall %void %textureStore_8ed9f8
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+         %26 = OpLabel
+         %27 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %27
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+         %30 = OpLabel
+         %31 = OpFunctionCall %void %textureStore_8ed9f8
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %12
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %textureStore_8ed9f8
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/8ed9f8.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/8ed9f8.wgsl.expected.wgsl
new file mode 100644
index 0000000..8fed674
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/8ed9f8.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_3d<rgba8unorm, write>;
+
+fn textureStore_8ed9f8() {
+  textureStore(arg_0, vec3<u32>(), vec4<f32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_8ed9f8();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_8ed9f8();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_8ed9f8();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/958353.wgsl b/test/tint/builtins/gen/literal/textureStore/958353.wgsl
new file mode 100644
index 0000000..2867992
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/958353.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_1d<rgba8sint, write>;
+
+// fn textureStore(texture: texture_storage_1d<rgba8sint, write>, coords: u32, value: vec4<i32>)
+fn textureStore_958353() {
+  textureStore(arg_0, 1u, vec4<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_958353();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_958353();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_958353();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/958353.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/958353.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..8326837
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/958353.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture1D<int4> arg_0 : register(u0, space1);
+
+void textureStore_958353() {
+  arg_0[1u] = (0).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_958353();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_958353();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_958353();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/958353.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/958353.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..8326837
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/958353.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture1D<int4> arg_0 : register(u0, space1);
+
+void textureStore_958353() {
+  arg_0[1u] = (0).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_958353();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_958353();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_958353();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/958353.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/958353.wgsl.expected.glsl
new file mode 100644
index 0000000..2c0a360
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/958353.wgsl.expected.glsl
@@ -0,0 +1,78 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba8i) uniform highp writeonly iimage1D arg_0;
+void textureStore_958353() {
+  imageStore(arg_0, int(1u), ivec4(0));
+}
+
+vec4 vertex_main() {
+  textureStore_958353();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'iimage1D' : Reserved word. 
+WARNING: 0:3: 'layout' : useless application of layout qualifier 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+layout(rgba8i) uniform highp writeonly iimage1D arg_0;
+void textureStore_958353() {
+  imageStore(arg_0, int(1u), ivec4(0));
+}
+
+void fragment_main() {
+  textureStore_958353();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'iimage1D' : Reserved word. 
+WARNING: 0:4: 'layout' : useless application of layout qualifier 
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba8i) uniform highp writeonly iimage1D arg_0;
+void textureStore_958353() {
+  imageStore(arg_0, int(1u), ivec4(0));
+}
+
+void compute_main() {
+  textureStore_958353();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'iimage1D' : Reserved word. 
+WARNING: 0:3: 'layout' : useless application of layout qualifier 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureStore/958353.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/958353.wgsl.expected.msl
new file mode 100644
index 0000000..4116d9d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/958353.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_958353(texture1d<int, access::write> tint_symbol_1) {
+  tint_symbol_1.write(int4(0), uint(1u));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<int, access::write> tint_symbol_2) {
+  textureStore_958353(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<int, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<int, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureStore_958353(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture1d<int, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureStore_958353(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureStore/958353.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/958353.wgsl.expected.spvasm
new file mode 100644
index 0000000..a0fd2d7
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/958353.wgsl.expected.spvasm
@@ -0,0 +1,74 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 37
+; Schema: 0
+               OpCapability Shader
+               OpCapability Image1D
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureStore_958353 "textureStore_958353"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 1D 0 0 0 2 Rgba8i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+      %v4int = OpTypeVector %int 4
+         %22 = OpConstantNull %v4int
+         %23 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureStore_958353 = OpFunction %void None %13
+         %16 = OpLabel
+         %18 = OpLoad %11 %arg_0
+               OpImageWrite %18 %uint_1 %22
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %23
+         %25 = OpLabel
+         %26 = OpFunctionCall %void %textureStore_958353
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %28 = OpLabel
+         %29 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %29
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %textureStore_958353
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %35 = OpLabel
+         %36 = OpFunctionCall %void %textureStore_958353
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/958353.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/958353.wgsl.expected.wgsl
new file mode 100644
index 0000000..f945b20
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/958353.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_1d<rgba8sint, write>;
+
+fn textureStore_958353() {
+  textureStore(arg_0, 1u, vec4<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_958353();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_958353();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_958353();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/959d94.wgsl b/test/tint/builtins/gen/literal/textureStore/959d94.wgsl
new file mode 100644
index 0000000..27385b3
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/959d94.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_1d<rgba8snorm, write>;
+
+// fn textureStore(texture: texture_storage_1d<rgba8snorm, write>, coords: u32, value: vec4<f32>)
+fn textureStore_959d94() {
+  textureStore(arg_0, 1u, vec4<f32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_959d94();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_959d94();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_959d94();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/959d94.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/959d94.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..0053ebc
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/959d94.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture1D<float4> arg_0 : register(u0, space1);
+
+void textureStore_959d94() {
+  arg_0[1u] = (0.0f).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_959d94();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_959d94();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_959d94();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/959d94.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/959d94.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..0053ebc
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/959d94.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture1D<float4> arg_0 : register(u0, space1);
+
+void textureStore_959d94() {
+  arg_0[1u] = (0.0f).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_959d94();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_959d94();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_959d94();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/959d94.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/959d94.wgsl.expected.glsl
new file mode 100644
index 0000000..dd1193b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/959d94.wgsl.expected.glsl
@@ -0,0 +1,78 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba8_snorm) uniform highp writeonly image1D arg_0;
+void textureStore_959d94() {
+  imageStore(arg_0, int(1u), vec4(0.0f));
+}
+
+vec4 vertex_main() {
+  textureStore_959d94();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image1D' : Reserved word. 
+WARNING: 0:3: 'layout' : useless application of layout qualifier 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+layout(rgba8_snorm) uniform highp writeonly image1D arg_0;
+void textureStore_959d94() {
+  imageStore(arg_0, int(1u), vec4(0.0f));
+}
+
+void fragment_main() {
+  textureStore_959d94();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'image1D' : Reserved word. 
+WARNING: 0:4: 'layout' : useless application of layout qualifier 
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba8_snorm) uniform highp writeonly image1D arg_0;
+void textureStore_959d94() {
+  imageStore(arg_0, int(1u), vec4(0.0f));
+}
+
+void compute_main() {
+  textureStore_959d94();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image1D' : Reserved word. 
+WARNING: 0:3: 'layout' : useless application of layout qualifier 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureStore/959d94.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/959d94.wgsl.expected.msl
new file mode 100644
index 0000000..3d498b4
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/959d94.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_959d94(texture1d<float, access::write> tint_symbol_1) {
+  tint_symbol_1.write(float4(0.0f), uint(1u));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<float, access::write> tint_symbol_2) {
+  textureStore_959d94(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<float, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<float, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureStore_959d94(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture1d<float, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureStore_959d94(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureStore/959d94.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/959d94.wgsl.expected.spvasm
new file mode 100644
index 0000000..071ba77
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/959d94.wgsl.expected.spvasm
@@ -0,0 +1,71 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 34
+; Schema: 0
+               OpCapability Shader
+               OpCapability Image1D
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureStore_959d94 "textureStore_959d94"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 1D 0 0 0 2 Rgba8Snorm
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %12 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+         %20 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureStore_959d94 = OpFunction %void None %12
+         %15 = OpLabel
+         %17 = OpLoad %11 %arg_0
+               OpImageWrite %17 %uint_1 %5
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %20
+         %22 = OpLabel
+         %23 = OpFunctionCall %void %textureStore_959d94
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+         %25 = OpLabel
+         %26 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %26
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %textureStore_959d94
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %12
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %textureStore_959d94
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/959d94.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/959d94.wgsl.expected.wgsl
new file mode 100644
index 0000000..548a878
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/959d94.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_1d<rgba8snorm, write>;
+
+fn textureStore_959d94() {
+  textureStore(arg_0, 1u, vec4<f32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_959d94();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_959d94();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_959d94();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/95e452.wgsl b/test/tint/builtins/gen/literal/textureStore/95e452.wgsl
new file mode 100644
index 0000000..b98336c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/95e452.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d<r32sint, write>;
+
+// fn textureStore(texture: texture_storage_2d<r32sint, write>, coords: vec2<u32>, value: vec4<i32>)
+fn textureStore_95e452() {
+  textureStore(arg_0, vec2<u32>(), vec4<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_95e452();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_95e452();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_95e452();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/95e452.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/95e452.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..db2e297
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/95e452.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2D<int4> arg_0 : register(u0, space1);
+
+void textureStore_95e452() {
+  arg_0[(0u).xx] = (0).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_95e452();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_95e452();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_95e452();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/95e452.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/95e452.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..db2e297
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/95e452.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2D<int4> arg_0 : register(u0, space1);
+
+void textureStore_95e452() {
+  arg_0[(0u).xx] = (0).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_95e452();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_95e452();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_95e452();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/95e452.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/95e452.wgsl.expected.glsl
new file mode 100644
index 0000000..c17fdcb
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/95e452.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+layout(r32i) uniform highp writeonly iimage2D arg_0;
+void textureStore_95e452() {
+  imageStore(arg_0, ivec2(uvec2(0u)), ivec4(0));
+}
+
+vec4 vertex_main() {
+  textureStore_95e452();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+layout(r32i) uniform highp writeonly iimage2D arg_0;
+void textureStore_95e452() {
+  imageStore(arg_0, ivec2(uvec2(0u)), ivec4(0));
+}
+
+void fragment_main() {
+  textureStore_95e452();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+layout(r32i) uniform highp writeonly iimage2D arg_0;
+void textureStore_95e452() {
+  imageStore(arg_0, ivec2(uvec2(0u)), ivec4(0));
+}
+
+void compute_main() {
+  textureStore_95e452();
+}
+
+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/95e452.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/95e452.wgsl.expected.msl
new file mode 100644
index 0000000..327ad00
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/95e452.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_95e452(texture2d<int, access::write> tint_symbol_1) {
+  tint_symbol_1.write(int4(0), uint2(uint2(0u)));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<int, access::write> tint_symbol_2) {
+  textureStore_95e452(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<int, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<int, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureStore_95e452(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d<int, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureStore_95e452(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureStore/95e452.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/95e452.wgsl.expected.spvasm
new file mode 100644
index 0000000..391ed7c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/95e452.wgsl.expected.spvasm
@@ -0,0 +1,74 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 38
+; 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_95e452 "textureStore_95e452"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 2D 0 0 0 2 R32i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+         %21 = OpConstantNull %v2uint
+      %v4int = OpTypeVector %int 4
+         %23 = OpConstantNull %v4int
+         %24 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureStore_95e452 = OpFunction %void None %13
+         %16 = OpLabel
+         %18 = OpLoad %11 %arg_0
+               OpImageWrite %18 %21 %23
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %24
+         %26 = OpLabel
+         %27 = OpFunctionCall %void %textureStore_95e452
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %29 = OpLabel
+         %30 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %30
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %textureStore_95e452
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %textureStore_95e452
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/95e452.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/95e452.wgsl.expected.wgsl
new file mode 100644
index 0000000..2f18a92
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/95e452.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d<r32sint, write>;
+
+fn textureStore_95e452() {
+  textureStore(arg_0, vec2<u32>(), vec4<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_95e452();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_95e452();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_95e452();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/9f5318.wgsl b/test/tint/builtins/gen/literal/textureStore/9f5318.wgsl
new file mode 100644
index 0000000..57f9e41
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/9f5318.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d<rg32sint, write>;
+
+// fn textureStore(texture: texture_storage_2d<rg32sint, write>, coords: vec2<u32>, value: vec4<i32>)
+fn textureStore_9f5318() {
+  textureStore(arg_0, vec2<u32>(), vec4<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_9f5318();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_9f5318();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_9f5318();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/9f5318.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/9f5318.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..5f0a281
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/9f5318.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2D<int4> arg_0 : register(u0, space1);
+
+void textureStore_9f5318() {
+  arg_0[(0u).xx] = (0).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_9f5318();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_9f5318();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_9f5318();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/9f5318.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/9f5318.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..5f0a281
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/9f5318.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2D<int4> arg_0 : register(u0, space1);
+
+void textureStore_9f5318() {
+  arg_0[(0u).xx] = (0).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_9f5318();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_9f5318();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_9f5318();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/9f5318.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/9f5318.wgsl.expected.glsl
new file mode 100644
index 0000000..260128a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/9f5318.wgsl.expected.glsl
@@ -0,0 +1,75 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rg32i) uniform highp writeonly iimage2D arg_0;
+void textureStore_9f5318() {
+  imageStore(arg_0, ivec2(uvec2(0u)), ivec4(0));
+}
+
+vec4 vertex_main() {
+  textureStore_9f5318();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+layout(rg32i) uniform highp writeonly iimage2D arg_0;
+void textureStore_9f5318() {
+  imageStore(arg_0, ivec2(uvec2(0u)), ivec4(0));
+}
+
+void fragment_main() {
+  textureStore_9f5318();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'image load-store format' : not supported with this profile: es
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rg32i) uniform highp writeonly iimage2D arg_0;
+void textureStore_9f5318() {
+  imageStore(arg_0, ivec2(uvec2(0u)), ivec4(0));
+}
+
+void compute_main() {
+  textureStore_9f5318();
+}
+
+layout(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/9f5318.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/9f5318.wgsl.expected.msl
new file mode 100644
index 0000000..71eab29
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/9f5318.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_9f5318(texture2d<int, access::write> tint_symbol_1) {
+  tint_symbol_1.write(int4(0), uint2(uint2(0u)));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<int, access::write> tint_symbol_2) {
+  textureStore_9f5318(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<int, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<int, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureStore_9f5318(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d<int, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureStore_9f5318(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureStore/9f5318.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/9f5318.wgsl.expected.spvasm
new file mode 100644
index 0000000..e767dff
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/9f5318.wgsl.expected.spvasm
@@ -0,0 +1,75 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 38
+; 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_9f5318 "textureStore_9f5318"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 2D 0 0 0 2 Rg32i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+         %21 = OpConstantNull %v2uint
+      %v4int = OpTypeVector %int 4
+         %23 = OpConstantNull %v4int
+         %24 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureStore_9f5318 = OpFunction %void None %13
+         %16 = OpLabel
+         %18 = OpLoad %11 %arg_0
+               OpImageWrite %18 %21 %23
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %24
+         %26 = OpLabel
+         %27 = OpFunctionCall %void %textureStore_9f5318
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %29 = OpLabel
+         %30 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %30
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %textureStore_9f5318
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %textureStore_9f5318
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/9f5318.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/9f5318.wgsl.expected.wgsl
new file mode 100644
index 0000000..ba762db
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/9f5318.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d<rg32sint, write>;
+
+fn textureStore_9f5318() {
+  textureStore(arg_0, vec2<u32>(), vec4<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_9f5318();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_9f5318();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_9f5318();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/a0f96e.wgsl b/test/tint/builtins/gen/literal/textureStore/a0f96e.wgsl
new file mode 100644
index 0000000..8bc5822
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/a0f96e.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: u32, value: vec4<f32>)
+fn textureStore_a0f96e() {
+  textureStore(arg_0, vec2<u32>(), 1u, vec4<f32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_a0f96e();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_a0f96e();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_a0f96e();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/a0f96e.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/a0f96e.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..eac237c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/a0f96e.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2DArray<float4> arg_0 : register(u0, space1);
+
+void textureStore_a0f96e() {
+  arg_0[uint3(0u, 0u, 1u)] = (0.0f).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_a0f96e();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_a0f96e();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_a0f96e();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/a0f96e.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/a0f96e.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..eac237c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/a0f96e.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2DArray<float4> arg_0 : register(u0, space1);
+
+void textureStore_a0f96e() {
+  arg_0[uint3(0u, 0u, 1u)] = (0.0f).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_a0f96e();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_a0f96e();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_a0f96e();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/a0f96e.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/a0f96e.wgsl.expected.glsl
new file mode 100644
index 0000000..0d052c7
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/a0f96e.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+layout(rgba16f) uniform highp writeonly image2DArray arg_0;
+void textureStore_a0f96e() {
+  imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), vec4(0.0f));
+}
+
+vec4 vertex_main() {
+  textureStore_a0f96e();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = 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_a0f96e() {
+  imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), vec4(0.0f));
+}
+
+void fragment_main() {
+  textureStore_a0f96e();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+layout(rgba16f) uniform highp writeonly image2DArray arg_0;
+void textureStore_a0f96e() {
+  imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), vec4(0.0f));
+}
+
+void compute_main() {
+  textureStore_a0f96e();
+}
+
+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/a0f96e.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/a0f96e.wgsl.expected.msl
new file mode 100644
index 0000000..55416ec
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/a0f96e.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_a0f96e(texture2d_array<float, access::write> tint_symbol_1) {
+  tint_symbol_1.write(float4(0.0f), uint2(uint2(0u)), 1u);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<float, access::write> tint_symbol_2) {
+  textureStore_a0f96e(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_a0f96e(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d_array<float, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureStore_a0f96e(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureStore/a0f96e.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/a0f96e.wgsl.expected.spvasm
new file mode 100644
index 0000000..be0bd69
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/a0f96e.wgsl.expected.spvasm
@@ -0,0 +1,73 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 37
+; 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_a0f96e "textureStore_a0f96e"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_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
+     %uint_1 = OpConstant %uint 1
+         %22 = OpConstantComposite %v3uint %uint_0 %uint_0 %uint_1
+         %23 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureStore_a0f96e = OpFunction %void None %12
+         %15 = OpLabel
+         %17 = OpLoad %11 %arg_0
+               OpImageWrite %17 %22 %5
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %23
+         %25 = OpLabel
+         %26 = OpFunctionCall %void %textureStore_a0f96e
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+         %28 = OpLabel
+         %29 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %29
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %textureStore_a0f96e
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %12
+         %35 = OpLabel
+         %36 = OpFunctionCall %void %textureStore_a0f96e
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/a0f96e.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/a0f96e.wgsl.expected.wgsl
new file mode 100644
index 0000000..4903cd3
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/a0f96e.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba16float, write>;
+
+fn textureStore_a0f96e() {
+  textureStore(arg_0, vec2<u32>(), 1u, vec4<f32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_a0f96e();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_a0f96e();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_a0f96e();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/a1352c.wgsl b/test/tint/builtins/gen/literal/textureStore/a1352c.wgsl
new file mode 100644
index 0000000..1457ecf
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/a1352c.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: u32, value: vec4<i32>)
+fn textureStore_a1352c() {
+  textureStore(arg_0, vec2<u32>(), 1u, vec4<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_a1352c();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_a1352c();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_a1352c();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/a1352c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/a1352c.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..852989a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/a1352c.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2DArray<int4> arg_0 : register(u0, space1);
+
+void textureStore_a1352c() {
+  arg_0[uint3(0u, 0u, 1u)] = (0).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_a1352c();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_a1352c();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_a1352c();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/a1352c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/a1352c.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..852989a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/a1352c.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2DArray<int4> arg_0 : register(u0, space1);
+
+void textureStore_a1352c() {
+  arg_0[uint3(0u, 0u, 1u)] = (0).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_a1352c();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_a1352c();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_a1352c();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/a1352c.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/a1352c.wgsl.expected.glsl
new file mode 100644
index 0000000..69fba50
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/a1352c.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+layout(rgba8i) uniform highp writeonly iimage2DArray arg_0;
+void textureStore_a1352c() {
+  imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), ivec4(0));
+}
+
+vec4 vertex_main() {
+  textureStore_a1352c();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = 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_a1352c() {
+  imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), ivec4(0));
+}
+
+void fragment_main() {
+  textureStore_a1352c();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+layout(rgba8i) uniform highp writeonly iimage2DArray arg_0;
+void textureStore_a1352c() {
+  imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), ivec4(0));
+}
+
+void compute_main() {
+  textureStore_a1352c();
+}
+
+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/a1352c.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/a1352c.wgsl.expected.msl
new file mode 100644
index 0000000..e5aa80c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/a1352c.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_a1352c(texture2d_array<int, access::write> tint_symbol_1) {
+  tint_symbol_1.write(int4(0), uint2(uint2(0u)), 1u);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<int, access::write> tint_symbol_2) {
+  textureStore_a1352c(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_a1352c(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d_array<int, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureStore_a1352c(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureStore/a1352c.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/a1352c.wgsl.expected.spvasm
new file mode 100644
index 0000000..88ec228
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/a1352c.wgsl.expected.spvasm
@@ -0,0 +1,76 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 40
+; 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_a1352c "textureStore_a1352c"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_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
+     %uint_1 = OpConstant %uint 1
+         %23 = OpConstantComposite %v3uint %uint_0 %uint_0 %uint_1
+      %v4int = OpTypeVector %int 4
+         %25 = OpConstantNull %v4int
+         %26 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureStore_a1352c = OpFunction %void None %13
+         %16 = OpLabel
+         %18 = OpLoad %11 %arg_0
+               OpImageWrite %18 %23 %25
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %26
+         %28 = OpLabel
+         %29 = OpFunctionCall %void %textureStore_a1352c
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %31 = OpLabel
+         %32 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %32
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %35 = OpLabel
+         %36 = OpFunctionCall %void %textureStore_a1352c
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %38 = OpLabel
+         %39 = OpFunctionCall %void %textureStore_a1352c
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/a1352c.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/a1352c.wgsl.expected.wgsl
new file mode 100644
index 0000000..d4ae406
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/a1352c.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba8sint, write>;
+
+fn textureStore_a1352c() {
+  textureStore(arg_0, vec2<u32>(), 1u, vec4<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_a1352c();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_a1352c();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_a1352c();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/a4c338.wgsl b/test/tint/builtins/gen/literal/textureStore/a4c338.wgsl
new file mode 100644
index 0000000..90266ad
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/a4c338.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_1d<rgba16float, write>;
+
+// fn textureStore(texture: texture_storage_1d<rgba16float, write>, coords: u32, value: vec4<f32>)
+fn textureStore_a4c338() {
+  textureStore(arg_0, 1u, vec4<f32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_a4c338();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_a4c338();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_a4c338();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/a4c338.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/a4c338.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..887d1a0
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/a4c338.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture1D<float4> arg_0 : register(u0, space1);
+
+void textureStore_a4c338() {
+  arg_0[1u] = (0.0f).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_a4c338();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_a4c338();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_a4c338();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/a4c338.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/a4c338.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..887d1a0
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/a4c338.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture1D<float4> arg_0 : register(u0, space1);
+
+void textureStore_a4c338() {
+  arg_0[1u] = (0.0f).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_a4c338();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_a4c338();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_a4c338();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/a4c338.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/a4c338.wgsl.expected.glsl
new file mode 100644
index 0000000..d0953bc
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/a4c338.wgsl.expected.glsl
@@ -0,0 +1,78 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba16f) uniform highp writeonly image1D arg_0;
+void textureStore_a4c338() {
+  imageStore(arg_0, int(1u), vec4(0.0f));
+}
+
+vec4 vertex_main() {
+  textureStore_a4c338();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image1D' : Reserved word. 
+WARNING: 0:3: 'layout' : useless application of layout qualifier 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+layout(rgba16f) uniform highp writeonly image1D arg_0;
+void textureStore_a4c338() {
+  imageStore(arg_0, int(1u), vec4(0.0f));
+}
+
+void fragment_main() {
+  textureStore_a4c338();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'image1D' : Reserved word. 
+WARNING: 0:4: 'layout' : useless application of layout qualifier 
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba16f) uniform highp writeonly image1D arg_0;
+void textureStore_a4c338() {
+  imageStore(arg_0, int(1u), vec4(0.0f));
+}
+
+void compute_main() {
+  textureStore_a4c338();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image1D' : Reserved word. 
+WARNING: 0:3: 'layout' : useless application of layout qualifier 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureStore/a4c338.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/a4c338.wgsl.expected.msl
new file mode 100644
index 0000000..be778b9
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/a4c338.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_a4c338(texture1d<float, access::write> tint_symbol_1) {
+  tint_symbol_1.write(float4(0.0f), uint(1u));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<float, access::write> tint_symbol_2) {
+  textureStore_a4c338(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<float, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<float, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureStore_a4c338(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture1d<float, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureStore_a4c338(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureStore/a4c338.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/a4c338.wgsl.expected.spvasm
new file mode 100644
index 0000000..700238c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/a4c338.wgsl.expected.spvasm
@@ -0,0 +1,71 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 34
+; Schema: 0
+               OpCapability Shader
+               OpCapability Image1D
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureStore_a4c338 "textureStore_a4c338"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 1D 0 0 0 2 Rgba16f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %12 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+         %20 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureStore_a4c338 = OpFunction %void None %12
+         %15 = OpLabel
+         %17 = OpLoad %11 %arg_0
+               OpImageWrite %17 %uint_1 %5
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %20
+         %22 = OpLabel
+         %23 = OpFunctionCall %void %textureStore_a4c338
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+         %25 = OpLabel
+         %26 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %26
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %textureStore_a4c338
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %12
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %textureStore_a4c338
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/a4c338.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/a4c338.wgsl.expected.wgsl
new file mode 100644
index 0000000..16909fd
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/a4c338.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_1d<rgba16float, write>;
+
+fn textureStore_a4c338() {
+  textureStore(arg_0, 1u, vec4<f32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_a4c338();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_a4c338();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_a4c338();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/a5e80d.wgsl b/test/tint/builtins/gen/literal/textureStore/a5e80d.wgsl
new file mode 100644
index 0000000..d35de02
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/a5e80d.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_3d<rgba32float, write>;
+
+// fn textureStore(texture: texture_storage_3d<rgba32float, write>, coords: vec3<u32>, value: vec4<f32>)
+fn textureStore_a5e80d() {
+  textureStore(arg_0, vec3<u32>(), vec4<f32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_a5e80d();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_a5e80d();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_a5e80d();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/a5e80d.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/a5e80d.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..beae873
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/a5e80d.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture3D<float4> arg_0 : register(u0, space1);
+
+void textureStore_a5e80d() {
+  arg_0[(0u).xxx] = (0.0f).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_a5e80d();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_a5e80d();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_a5e80d();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/a5e80d.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/a5e80d.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..beae873
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/a5e80d.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture3D<float4> arg_0 : register(u0, space1);
+
+void textureStore_a5e80d() {
+  arg_0[(0u).xxx] = (0.0f).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_a5e80d();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_a5e80d();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_a5e80d();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/a5e80d.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/a5e80d.wgsl.expected.glsl
new file mode 100644
index 0000000..0a280ee
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/a5e80d.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+layout(rgba32f) uniform highp writeonly image3D arg_0;
+void textureStore_a5e80d() {
+  imageStore(arg_0, ivec3(uvec3(0u)), vec4(0.0f));
+}
+
+vec4 vertex_main() {
+  textureStore_a5e80d();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+layout(rgba32f) uniform highp writeonly image3D arg_0;
+void textureStore_a5e80d() {
+  imageStore(arg_0, ivec3(uvec3(0u)), vec4(0.0f));
+}
+
+void fragment_main() {
+  textureStore_a5e80d();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+layout(rgba32f) uniform highp writeonly image3D arg_0;
+void textureStore_a5e80d() {
+  imageStore(arg_0, ivec3(uvec3(0u)), vec4(0.0f));
+}
+
+void compute_main() {
+  textureStore_a5e80d();
+}
+
+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/a5e80d.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/a5e80d.wgsl.expected.msl
new file mode 100644
index 0000000..b44bcec
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/a5e80d.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_a5e80d(texture3d<float, access::write> tint_symbol_1) {
+  tint_symbol_1.write(float4(0.0f), uint3(uint3(0u)));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<float, access::write> tint_symbol_2) {
+  textureStore_a5e80d(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<float, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture3d<float, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureStore_a5e80d(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture3d<float, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureStore_a5e80d(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureStore/a5e80d.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/a5e80d.wgsl.expected.spvasm
new file mode 100644
index 0000000..6710bee
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/a5e80d.wgsl.expected.spvasm
@@ -0,0 +1,71 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 35
+; 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_a5e80d "textureStore_a5e80d"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 3D 0 0 0 2 Rgba32f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %12 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v3uint = OpTypeVector %uint 3
+         %20 = OpConstantNull %v3uint
+         %21 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureStore_a5e80d = OpFunction %void None %12
+         %15 = OpLabel
+         %17 = OpLoad %11 %arg_0
+               OpImageWrite %17 %20 %5
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %21
+         %23 = OpLabel
+         %24 = OpFunctionCall %void %textureStore_a5e80d
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+         %26 = OpLabel
+         %27 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %27
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+         %30 = OpLabel
+         %31 = OpFunctionCall %void %textureStore_a5e80d
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %12
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %textureStore_a5e80d
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/a5e80d.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/a5e80d.wgsl.expected.wgsl
new file mode 100644
index 0000000..523b068
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/a5e80d.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_3d<rgba32float, write>;
+
+fn textureStore_a5e80d() {
+  textureStore(arg_0, vec3<u32>(), vec4<f32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_a5e80d();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_a5e80d();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_a5e80d();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/a6e78f.wgsl b/test/tint/builtins/gen/literal/textureStore/a6e78f.wgsl
new file mode 100644
index 0000000..5ad97c0
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/a6e78f.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_1d<r32uint, write>;
+
+// fn textureStore(texture: texture_storage_1d<r32uint, write>, coords: u32, value: vec4<u32>)
+fn textureStore_a6e78f() {
+  textureStore(arg_0, 1u, vec4<u32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_a6e78f();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_a6e78f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_a6e78f();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/a6e78f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/a6e78f.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..5c32fa3
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/a6e78f.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture1D<uint4> arg_0 : register(u0, space1);
+
+void textureStore_a6e78f() {
+  arg_0[1u] = (0u).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_a6e78f();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_a6e78f();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_a6e78f();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/a6e78f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/a6e78f.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..5c32fa3
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/a6e78f.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture1D<uint4> arg_0 : register(u0, space1);
+
+void textureStore_a6e78f() {
+  arg_0[1u] = (0u).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_a6e78f();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_a6e78f();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_a6e78f();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/a6e78f.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/a6e78f.wgsl.expected.glsl
new file mode 100644
index 0000000..04b7a84
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/a6e78f.wgsl.expected.glsl
@@ -0,0 +1,78 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(r32ui) uniform highp writeonly uimage1D arg_0;
+void textureStore_a6e78f() {
+  imageStore(arg_0, int(1u), uvec4(0u));
+}
+
+vec4 vertex_main() {
+  textureStore_a6e78f();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'uimage1D' : Reserved word. 
+WARNING: 0:3: 'layout' : useless application of layout qualifier 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+layout(r32ui) uniform highp writeonly uimage1D arg_0;
+void textureStore_a6e78f() {
+  imageStore(arg_0, int(1u), uvec4(0u));
+}
+
+void fragment_main() {
+  textureStore_a6e78f();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'uimage1D' : Reserved word. 
+WARNING: 0:4: 'layout' : useless application of layout qualifier 
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(r32ui) uniform highp writeonly uimage1D arg_0;
+void textureStore_a6e78f() {
+  imageStore(arg_0, int(1u), uvec4(0u));
+}
+
+void compute_main() {
+  textureStore_a6e78f();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'uimage1D' : Reserved word. 
+WARNING: 0:3: 'layout' : useless application of layout qualifier 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureStore/a6e78f.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/a6e78f.wgsl.expected.msl
new file mode 100644
index 0000000..f45f6f8
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/a6e78f.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_a6e78f(texture1d<uint, access::write> tint_symbol_1) {
+  tint_symbol_1.write(uint4(0u), uint(1u));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<uint, access::write> tint_symbol_2) {
+  textureStore_a6e78f(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<uint, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<uint, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureStore_a6e78f(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture1d<uint, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureStore_a6e78f(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureStore/a6e78f.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/a6e78f.wgsl.expected.spvasm
new file mode 100644
index 0000000..d235078
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/a6e78f.wgsl.expected.spvasm
@@ -0,0 +1,73 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 36
+; Schema: 0
+               OpCapability Shader
+               OpCapability Image1D
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureStore_a6e78f "textureStore_a6e78f"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 1D 0 0 0 2 R32ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+     %uint_1 = OpConstant %uint 1
+     %v4uint = OpTypeVector %uint 4
+         %21 = OpConstantNull %v4uint
+         %22 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureStore_a6e78f = OpFunction %void None %13
+         %16 = OpLabel
+         %18 = OpLoad %11 %arg_0
+               OpImageWrite %18 %uint_1 %21
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %22
+         %24 = OpLabel
+         %25 = OpFunctionCall %void %textureStore_a6e78f
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %27 = OpLabel
+         %28 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %28
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %31 = OpLabel
+         %32 = OpFunctionCall %void %textureStore_a6e78f
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %textureStore_a6e78f
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/a6e78f.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/a6e78f.wgsl.expected.wgsl
new file mode 100644
index 0000000..38db884
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/a6e78f.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_1d<r32uint, write>;
+
+fn textureStore_a6e78f() {
+  textureStore(arg_0, 1u, vec4<u32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_a6e78f();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_a6e78f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_a6e78f();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/a9426c.wgsl b/test/tint/builtins/gen/literal/textureStore/a9426c.wgsl
new file mode 100644
index 0000000..45ac5b0
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/a9426c.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: u32, value: vec4<u32>)
+fn textureStore_a9426c() {
+  textureStore(arg_0, vec2<u32>(), 1u, vec4<u32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_a9426c();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_a9426c();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_a9426c();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/a9426c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/a9426c.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..8faa545
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/a9426c.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2DArray<uint4> arg_0 : register(u0, space1);
+
+void textureStore_a9426c() {
+  arg_0[uint3(0u, 0u, 1u)] = (0u).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_a9426c();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_a9426c();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_a9426c();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/a9426c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/a9426c.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..8faa545
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/a9426c.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2DArray<uint4> arg_0 : register(u0, space1);
+
+void textureStore_a9426c() {
+  arg_0[uint3(0u, 0u, 1u)] = (0u).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_a9426c();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_a9426c();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_a9426c();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/a9426c.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/a9426c.wgsl.expected.glsl
new file mode 100644
index 0000000..f7d65f9
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/a9426c.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+layout(rgba32ui) uniform highp writeonly uimage2DArray arg_0;
+void textureStore_a9426c() {
+  imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), uvec4(0u));
+}
+
+vec4 vertex_main() {
+  textureStore_a9426c();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = 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_a9426c() {
+  imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), uvec4(0u));
+}
+
+void fragment_main() {
+  textureStore_a9426c();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+layout(rgba32ui) uniform highp writeonly uimage2DArray arg_0;
+void textureStore_a9426c() {
+  imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), uvec4(0u));
+}
+
+void compute_main() {
+  textureStore_a9426c();
+}
+
+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/a9426c.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/a9426c.wgsl.expected.msl
new file mode 100644
index 0000000..f4bbdd4
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/a9426c.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_a9426c(texture2d_array<uint, access::write> tint_symbol_1) {
+  tint_symbol_1.write(uint4(0u), uint2(uint2(0u)), 1u);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<uint, access::write> tint_symbol_2) {
+  textureStore_a9426c(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_a9426c(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d_array<uint, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureStore_a9426c(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureStore/a9426c.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/a9426c.wgsl.expected.spvasm
new file mode 100644
index 0000000..9439679
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/a9426c.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_a9426c "textureStore_a9426c"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_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
+     %uint_1 = OpConstant %uint 1
+         %22 = OpConstantComposite %v3uint %uint_0 %uint_0 %uint_1
+     %v4uint = OpTypeVector %uint 4
+         %24 = OpConstantNull %v4uint
+         %25 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureStore_a9426c = OpFunction %void None %13
+         %16 = OpLabel
+         %18 = OpLoad %11 %arg_0
+               OpImageWrite %18 %22 %24
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %25
+         %27 = OpLabel
+         %28 = OpFunctionCall %void %textureStore_a9426c
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %30 = OpLabel
+         %31 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %31
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %textureStore_a9426c
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %37 = OpLabel
+         %38 = OpFunctionCall %void %textureStore_a9426c
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/a9426c.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/a9426c.wgsl.expected.wgsl
new file mode 100644
index 0000000..186d1fc
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/a9426c.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba32uint, write>;
+
+fn textureStore_a9426c() {
+  textureStore(arg_0, vec2<u32>(), 1u, vec4<u32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_a9426c();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_a9426c();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_a9426c();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/aeb38a.wgsl b/test/tint/builtins/gen/literal/textureStore/aeb38a.wgsl
new file mode 100644
index 0000000..3eb9078
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/aeb38a.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d<rgba32uint, write>;
+
+// fn textureStore(texture: texture_storage_2d<rgba32uint, write>, coords: vec2<u32>, value: vec4<u32>)
+fn textureStore_aeb38a() {
+  textureStore(arg_0, vec2<u32>(), vec4<u32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_aeb38a();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_aeb38a();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_aeb38a();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/aeb38a.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/aeb38a.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..207747f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/aeb38a.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2D<uint4> arg_0 : register(u0, space1);
+
+void textureStore_aeb38a() {
+  arg_0[(0u).xx] = (0u).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_aeb38a();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_aeb38a();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_aeb38a();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/aeb38a.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/aeb38a.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..207747f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/aeb38a.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2D<uint4> arg_0 : register(u0, space1);
+
+void textureStore_aeb38a() {
+  arg_0[(0u).xx] = (0u).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_aeb38a();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_aeb38a();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_aeb38a();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/aeb38a.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/aeb38a.wgsl.expected.glsl
new file mode 100644
index 0000000..64d71b7
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/aeb38a.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+layout(rgba32ui) uniform highp writeonly uimage2D arg_0;
+void textureStore_aeb38a() {
+  imageStore(arg_0, ivec2(uvec2(0u)), uvec4(0u));
+}
+
+vec4 vertex_main() {
+  textureStore_aeb38a();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+layout(rgba32ui) uniform highp writeonly uimage2D arg_0;
+void textureStore_aeb38a() {
+  imageStore(arg_0, ivec2(uvec2(0u)), uvec4(0u));
+}
+
+void fragment_main() {
+  textureStore_aeb38a();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+layout(rgba32ui) uniform highp writeonly uimage2D arg_0;
+void textureStore_aeb38a() {
+  imageStore(arg_0, ivec2(uvec2(0u)), uvec4(0u));
+}
+
+void compute_main() {
+  textureStore_aeb38a();
+}
+
+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/aeb38a.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/aeb38a.wgsl.expected.msl
new file mode 100644
index 0000000..816a29f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/aeb38a.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_aeb38a(texture2d<uint, access::write> tint_symbol_1) {
+  tint_symbol_1.write(uint4(0u), uint2(uint2(0u)));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<uint, access::write> tint_symbol_2) {
+  textureStore_aeb38a(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<uint, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<uint, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureStore_aeb38a(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d<uint, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureStore_aeb38a(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureStore/aeb38a.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/aeb38a.wgsl.expected.spvasm
new file mode 100644
index 0000000..9823237
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/aeb38a.wgsl.expected.spvasm
@@ -0,0 +1,73 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 37
+; 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_aeb38a "textureStore_aeb38a"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 2D 0 0 0 2 Rgba32ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+     %v2uint = OpTypeVector %uint 2
+         %20 = OpConstantNull %v2uint
+     %v4uint = OpTypeVector %uint 4
+         %22 = OpConstantNull %v4uint
+         %23 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureStore_aeb38a = OpFunction %void None %13
+         %16 = OpLabel
+         %18 = OpLoad %11 %arg_0
+               OpImageWrite %18 %20 %22
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %23
+         %25 = OpLabel
+         %26 = OpFunctionCall %void %textureStore_aeb38a
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %28 = OpLabel
+         %29 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %29
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %textureStore_aeb38a
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %35 = OpLabel
+         %36 = OpFunctionCall %void %textureStore_aeb38a
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/aeb38a.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/aeb38a.wgsl.expected.wgsl
new file mode 100644
index 0000000..9730895
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/aeb38a.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d<rgba32uint, write>;
+
+fn textureStore_aeb38a() {
+  textureStore(arg_0, vec2<u32>(), vec4<u32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_aeb38a();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_aeb38a();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_aeb38a();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/b42fd3.wgsl b/test/tint/builtins/gen/literal/textureStore/b42fd3.wgsl
new file mode 100644
index 0000000..8de25c8
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/b42fd3.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: u32, value: vec4<u32>)
+fn textureStore_b42fd3() {
+  textureStore(arg_0, vec2<u32>(), 1u, vec4<u32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_b42fd3();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_b42fd3();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_b42fd3();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/b42fd3.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/b42fd3.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..2f7eb46
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/b42fd3.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2DArray<uint4> arg_0 : register(u0, space1);
+
+void textureStore_b42fd3() {
+  arg_0[uint3(0u, 0u, 1u)] = (0u).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_b42fd3();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_b42fd3();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_b42fd3();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/b42fd3.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/b42fd3.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..2f7eb46
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/b42fd3.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2DArray<uint4> arg_0 : register(u0, space1);
+
+void textureStore_b42fd3() {
+  arg_0[uint3(0u, 0u, 1u)] = (0u).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_b42fd3();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_b42fd3();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_b42fd3();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/b42fd3.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/b42fd3.wgsl.expected.glsl
new file mode 100644
index 0000000..921ec9e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/b42fd3.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+layout(rgba8ui) uniform highp writeonly uimage2DArray arg_0;
+void textureStore_b42fd3() {
+  imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), uvec4(0u));
+}
+
+vec4 vertex_main() {
+  textureStore_b42fd3();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = 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_b42fd3() {
+  imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), uvec4(0u));
+}
+
+void fragment_main() {
+  textureStore_b42fd3();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+layout(rgba8ui) uniform highp writeonly uimage2DArray arg_0;
+void textureStore_b42fd3() {
+  imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), uvec4(0u));
+}
+
+void compute_main() {
+  textureStore_b42fd3();
+}
+
+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/b42fd3.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/b42fd3.wgsl.expected.msl
new file mode 100644
index 0000000..a888409
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/b42fd3.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_b42fd3(texture2d_array<uint, access::write> tint_symbol_1) {
+  tint_symbol_1.write(uint4(0u), uint2(uint2(0u)), 1u);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<uint, access::write> tint_symbol_2) {
+  textureStore_b42fd3(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_b42fd3(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d_array<uint, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureStore_b42fd3(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureStore/b42fd3.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/b42fd3.wgsl.expected.spvasm
new file mode 100644
index 0000000..e550c49
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/b42fd3.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_b42fd3 "textureStore_b42fd3"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_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
+     %uint_1 = OpConstant %uint 1
+         %22 = OpConstantComposite %v3uint %uint_0 %uint_0 %uint_1
+     %v4uint = OpTypeVector %uint 4
+         %24 = OpConstantNull %v4uint
+         %25 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureStore_b42fd3 = OpFunction %void None %13
+         %16 = OpLabel
+         %18 = OpLoad %11 %arg_0
+               OpImageWrite %18 %22 %24
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %25
+         %27 = OpLabel
+         %28 = OpFunctionCall %void %textureStore_b42fd3
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %30 = OpLabel
+         %31 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %31
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %textureStore_b42fd3
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %37 = OpLabel
+         %38 = OpFunctionCall %void %textureStore_b42fd3
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/b42fd3.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/b42fd3.wgsl.expected.wgsl
new file mode 100644
index 0000000..70f8fdc
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/b42fd3.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba8uint, write>;
+
+fn textureStore_b42fd3() {
+  textureStore(arg_0, vec2<u32>(), 1u, vec4<u32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_b42fd3();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_b42fd3();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_b42fd3();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/b70ded.wgsl b/test/tint/builtins/gen/literal/textureStore/b70ded.wgsl
new file mode 100644
index 0000000..c04799d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/b70ded.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_1d<rgba16uint, write>;
+
+// fn textureStore(texture: texture_storage_1d<rgba16uint, write>, coords: u32, value: vec4<u32>)
+fn textureStore_b70ded() {
+  textureStore(arg_0, 1u, vec4<u32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_b70ded();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_b70ded();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_b70ded();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/b70ded.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/b70ded.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..9fda40d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/b70ded.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture1D<uint4> arg_0 : register(u0, space1);
+
+void textureStore_b70ded() {
+  arg_0[1u] = (0u).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_b70ded();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_b70ded();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_b70ded();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/b70ded.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/b70ded.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..9fda40d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/b70ded.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture1D<uint4> arg_0 : register(u0, space1);
+
+void textureStore_b70ded() {
+  arg_0[1u] = (0u).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_b70ded();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_b70ded();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_b70ded();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/b70ded.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/b70ded.wgsl.expected.glsl
new file mode 100644
index 0000000..cd77fcd
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/b70ded.wgsl.expected.glsl
@@ -0,0 +1,78 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba16ui) uniform highp writeonly uimage1D arg_0;
+void textureStore_b70ded() {
+  imageStore(arg_0, int(1u), uvec4(0u));
+}
+
+vec4 vertex_main() {
+  textureStore_b70ded();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'uimage1D' : Reserved word. 
+WARNING: 0:3: 'layout' : useless application of layout qualifier 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+layout(rgba16ui) uniform highp writeonly uimage1D arg_0;
+void textureStore_b70ded() {
+  imageStore(arg_0, int(1u), uvec4(0u));
+}
+
+void fragment_main() {
+  textureStore_b70ded();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'uimage1D' : Reserved word. 
+WARNING: 0:4: 'layout' : useless application of layout qualifier 
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba16ui) uniform highp writeonly uimage1D arg_0;
+void textureStore_b70ded() {
+  imageStore(arg_0, int(1u), uvec4(0u));
+}
+
+void compute_main() {
+  textureStore_b70ded();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'uimage1D' : Reserved word. 
+WARNING: 0:3: 'layout' : useless application of layout qualifier 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureStore/b70ded.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/b70ded.wgsl.expected.msl
new file mode 100644
index 0000000..947fb46
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/b70ded.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_b70ded(texture1d<uint, access::write> tint_symbol_1) {
+  tint_symbol_1.write(uint4(0u), uint(1u));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<uint, access::write> tint_symbol_2) {
+  textureStore_b70ded(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<uint, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<uint, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureStore_b70ded(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture1d<uint, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureStore_b70ded(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureStore/b70ded.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/b70ded.wgsl.expected.spvasm
new file mode 100644
index 0000000..4bef24b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/b70ded.wgsl.expected.spvasm
@@ -0,0 +1,73 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 36
+; Schema: 0
+               OpCapability Shader
+               OpCapability Image1D
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureStore_b70ded "textureStore_b70ded"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 1D 0 0 0 2 Rgba16ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+     %uint_1 = OpConstant %uint 1
+     %v4uint = OpTypeVector %uint 4
+         %21 = OpConstantNull %v4uint
+         %22 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureStore_b70ded = OpFunction %void None %13
+         %16 = OpLabel
+         %18 = OpLoad %11 %arg_0
+               OpImageWrite %18 %uint_1 %21
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %22
+         %24 = OpLabel
+         %25 = OpFunctionCall %void %textureStore_b70ded
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %27 = OpLabel
+         %28 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %28
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %31 = OpLabel
+         %32 = OpFunctionCall %void %textureStore_b70ded
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %textureStore_b70ded
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/b70ded.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/b70ded.wgsl.expected.wgsl
new file mode 100644
index 0000000..59d6f6c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/b70ded.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_1d<rgba16uint, write>;
+
+fn textureStore_b70ded() {
+  textureStore(arg_0, 1u, vec4<u32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_b70ded();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_b70ded();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_b70ded();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/b76ff3.wgsl b/test/tint/builtins/gen/literal/textureStore/b76ff3.wgsl
new file mode 100644
index 0000000..f23a704
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/b76ff3.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d<rgba16sint, write>;
+
+// fn textureStore(texture: texture_storage_2d<rgba16sint, write>, coords: vec2<u32>, value: vec4<i32>)
+fn textureStore_b76ff3() {
+  textureStore(arg_0, vec2<u32>(), vec4<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_b76ff3();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_b76ff3();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_b76ff3();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/b76ff3.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/b76ff3.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..2310856
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/b76ff3.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2D<int4> arg_0 : register(u0, space1);
+
+void textureStore_b76ff3() {
+  arg_0[(0u).xx] = (0).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_b76ff3();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_b76ff3();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_b76ff3();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/b76ff3.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/b76ff3.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..2310856
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/b76ff3.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2D<int4> arg_0 : register(u0, space1);
+
+void textureStore_b76ff3() {
+  arg_0[(0u).xx] = (0).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_b76ff3();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_b76ff3();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_b76ff3();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/b76ff3.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/b76ff3.wgsl.expected.glsl
new file mode 100644
index 0000000..31af161
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/b76ff3.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+layout(rgba16i) uniform highp writeonly iimage2D arg_0;
+void textureStore_b76ff3() {
+  imageStore(arg_0, ivec2(uvec2(0u)), ivec4(0));
+}
+
+vec4 vertex_main() {
+  textureStore_b76ff3();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+layout(rgba16i) uniform highp writeonly iimage2D arg_0;
+void textureStore_b76ff3() {
+  imageStore(arg_0, ivec2(uvec2(0u)), ivec4(0));
+}
+
+void fragment_main() {
+  textureStore_b76ff3();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+layout(rgba16i) uniform highp writeonly iimage2D arg_0;
+void textureStore_b76ff3() {
+  imageStore(arg_0, ivec2(uvec2(0u)), ivec4(0));
+}
+
+void compute_main() {
+  textureStore_b76ff3();
+}
+
+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/b76ff3.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/b76ff3.wgsl.expected.msl
new file mode 100644
index 0000000..04029e7
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/b76ff3.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_b76ff3(texture2d<int, access::write> tint_symbol_1) {
+  tint_symbol_1.write(int4(0), uint2(uint2(0u)));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<int, access::write> tint_symbol_2) {
+  textureStore_b76ff3(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<int, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<int, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureStore_b76ff3(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d<int, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureStore_b76ff3(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureStore/b76ff3.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/b76ff3.wgsl.expected.spvasm
new file mode 100644
index 0000000..54f83ae
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/b76ff3.wgsl.expected.spvasm
@@ -0,0 +1,74 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 38
+; 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_b76ff3 "textureStore_b76ff3"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 2D 0 0 0 2 Rgba16i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+         %21 = OpConstantNull %v2uint
+      %v4int = OpTypeVector %int 4
+         %23 = OpConstantNull %v4int
+         %24 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureStore_b76ff3 = OpFunction %void None %13
+         %16 = OpLabel
+         %18 = OpLoad %11 %arg_0
+               OpImageWrite %18 %21 %23
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %24
+         %26 = OpLabel
+         %27 = OpFunctionCall %void %textureStore_b76ff3
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %29 = OpLabel
+         %30 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %30
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %textureStore_b76ff3
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %textureStore_b76ff3
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/b76ff3.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/b76ff3.wgsl.expected.wgsl
new file mode 100644
index 0000000..13c012c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/b76ff3.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d<rgba16sint, write>;
+
+fn textureStore_b76ff3() {
+  textureStore(arg_0, vec2<u32>(), vec4<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_b76ff3();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_b76ff3();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_b76ff3();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/b77161.wgsl b/test/tint/builtins/gen/literal/textureStore/b77161.wgsl
new file mode 100644
index 0000000..2503648
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/b77161.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_1d<rg32uint, write>;
+
+// fn textureStore(texture: texture_storage_1d<rg32uint, write>, coords: u32, value: vec4<u32>)
+fn textureStore_b77161() {
+  textureStore(arg_0, 1u, vec4<u32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_b77161();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_b77161();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_b77161();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/b77161.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/b77161.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..59dffc9
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/b77161.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture1D<uint4> arg_0 : register(u0, space1);
+
+void textureStore_b77161() {
+  arg_0[1u] = (0u).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_b77161();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_b77161();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_b77161();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/b77161.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/b77161.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..59dffc9
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/b77161.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture1D<uint4> arg_0 : register(u0, space1);
+
+void textureStore_b77161() {
+  arg_0[1u] = (0u).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_b77161();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_b77161();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_b77161();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/b77161.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/b77161.wgsl.expected.glsl
new file mode 100644
index 0000000..1ac7ccd
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/b77161.wgsl.expected.glsl
@@ -0,0 +1,75 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rg32ui) uniform highp writeonly uimage1D arg_0;
+void textureStore_b77161() {
+  imageStore(arg_0, int(1u), uvec4(0u));
+}
+
+vec4 vertex_main() {
+  textureStore_b77161();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+layout(rg32ui) uniform highp writeonly uimage1D arg_0;
+void textureStore_b77161() {
+  imageStore(arg_0, int(1u), uvec4(0u));
+}
+
+void fragment_main() {
+  textureStore_b77161();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'image load-store format' : not supported with this profile: es
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rg32ui) uniform highp writeonly uimage1D arg_0;
+void textureStore_b77161() {
+  imageStore(arg_0, int(1u), uvec4(0u));
+}
+
+void compute_main() {
+  textureStore_b77161();
+}
+
+layout(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/b77161.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/b77161.wgsl.expected.msl
new file mode 100644
index 0000000..260b776
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/b77161.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_b77161(texture1d<uint, access::write> tint_symbol_1) {
+  tint_symbol_1.write(uint4(0u), uint(1u));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<uint, access::write> tint_symbol_2) {
+  textureStore_b77161(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<uint, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<uint, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureStore_b77161(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture1d<uint, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureStore_b77161(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureStore/b77161.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/b77161.wgsl.expected.spvasm
new file mode 100644
index 0000000..714b0c9
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/b77161.wgsl.expected.spvasm
@@ -0,0 +1,74 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 36
+; Schema: 0
+               OpCapability Shader
+               OpCapability Image1D
+               OpCapability StorageImageExtendedFormats
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureStore_b77161 "textureStore_b77161"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 1D 0 0 0 2 Rg32ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+     %uint_1 = OpConstant %uint 1
+     %v4uint = OpTypeVector %uint 4
+         %21 = OpConstantNull %v4uint
+         %22 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureStore_b77161 = OpFunction %void None %13
+         %16 = OpLabel
+         %18 = OpLoad %11 %arg_0
+               OpImageWrite %18 %uint_1 %21
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %22
+         %24 = OpLabel
+         %25 = OpFunctionCall %void %textureStore_b77161
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %27 = OpLabel
+         %28 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %28
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %31 = OpLabel
+         %32 = OpFunctionCall %void %textureStore_b77161
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %textureStore_b77161
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/b77161.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/b77161.wgsl.expected.wgsl
new file mode 100644
index 0000000..c32b685
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/b77161.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_1d<rg32uint, write>;
+
+fn textureStore_b77161() {
+  textureStore(arg_0, 1u, vec4<u32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_b77161();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_b77161();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_b77161();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/c1f29e.wgsl b/test/tint/builtins/gen/literal/textureStore/c1f29e.wgsl
new file mode 100644
index 0000000..c3727f5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/c1f29e.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_1d<r32float, write>;
+
+// fn textureStore(texture: texture_storage_1d<r32float, write>, coords: u32, value: vec4<f32>)
+fn textureStore_c1f29e() {
+  textureStore(arg_0, 1u, vec4<f32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_c1f29e();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_c1f29e();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_c1f29e();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/c1f29e.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/c1f29e.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..8b2154a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/c1f29e.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture1D<float4> arg_0 : register(u0, space1);
+
+void textureStore_c1f29e() {
+  arg_0[1u] = (0.0f).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_c1f29e();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_c1f29e();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_c1f29e();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/c1f29e.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/c1f29e.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..8b2154a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/c1f29e.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture1D<float4> arg_0 : register(u0, space1);
+
+void textureStore_c1f29e() {
+  arg_0[1u] = (0.0f).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_c1f29e();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_c1f29e();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_c1f29e();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/c1f29e.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/c1f29e.wgsl.expected.glsl
new file mode 100644
index 0000000..9f4f693
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/c1f29e.wgsl.expected.glsl
@@ -0,0 +1,78 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(r32f) uniform highp writeonly image1D arg_0;
+void textureStore_c1f29e() {
+  imageStore(arg_0, int(1u), vec4(0.0f));
+}
+
+vec4 vertex_main() {
+  textureStore_c1f29e();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image1D' : Reserved word. 
+WARNING: 0:3: 'layout' : useless application of layout qualifier 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+layout(r32f) uniform highp writeonly image1D arg_0;
+void textureStore_c1f29e() {
+  imageStore(arg_0, int(1u), vec4(0.0f));
+}
+
+void fragment_main() {
+  textureStore_c1f29e();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'image1D' : Reserved word. 
+WARNING: 0:4: 'layout' : useless application of layout qualifier 
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(r32f) uniform highp writeonly image1D arg_0;
+void textureStore_c1f29e() {
+  imageStore(arg_0, int(1u), vec4(0.0f));
+}
+
+void compute_main() {
+  textureStore_c1f29e();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image1D' : Reserved word. 
+WARNING: 0:3: 'layout' : useless application of layout qualifier 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureStore/c1f29e.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/c1f29e.wgsl.expected.msl
new file mode 100644
index 0000000..f99aee7
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/c1f29e.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_c1f29e(texture1d<float, access::write> tint_symbol_1) {
+  tint_symbol_1.write(float4(0.0f), uint(1u));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<float, access::write> tint_symbol_2) {
+  textureStore_c1f29e(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<float, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<float, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureStore_c1f29e(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture1d<float, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureStore_c1f29e(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureStore/c1f29e.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/c1f29e.wgsl.expected.spvasm
new file mode 100644
index 0000000..5f99a79
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/c1f29e.wgsl.expected.spvasm
@@ -0,0 +1,71 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 34
+; Schema: 0
+               OpCapability Shader
+               OpCapability Image1D
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureStore_c1f29e "textureStore_c1f29e"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 1D 0 0 0 2 R32f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %12 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+         %20 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureStore_c1f29e = OpFunction %void None %12
+         %15 = OpLabel
+         %17 = OpLoad %11 %arg_0
+               OpImageWrite %17 %uint_1 %5
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %20
+         %22 = OpLabel
+         %23 = OpFunctionCall %void %textureStore_c1f29e
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+         %25 = OpLabel
+         %26 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %26
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %textureStore_c1f29e
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %12
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %textureStore_c1f29e
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/c1f29e.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/c1f29e.wgsl.expected.wgsl
new file mode 100644
index 0000000..0b929ae
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/c1f29e.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_1d<r32float, write>;
+
+fn textureStore_c1f29e() {
+  textureStore(arg_0, 1u, vec4<f32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_c1f29e();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_c1f29e();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_c1f29e();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/c2ca46.wgsl b/test/tint/builtins/gen/literal/textureStore/c2ca46.wgsl
new file mode 100644
index 0000000..3263299
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/c2ca46.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: u32, value: vec4<i32>)
+fn textureStore_c2ca46() {
+  textureStore(arg_0, vec2<u32>(), 1u, vec4<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_c2ca46();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_c2ca46();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_c2ca46();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/c2ca46.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/c2ca46.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..f8e5aee
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/c2ca46.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2DArray<int4> arg_0 : register(u0, space1);
+
+void textureStore_c2ca46() {
+  arg_0[uint3(0u, 0u, 1u)] = (0).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_c2ca46();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_c2ca46();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_c2ca46();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/c2ca46.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/c2ca46.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..f8e5aee
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/c2ca46.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2DArray<int4> arg_0 : register(u0, space1);
+
+void textureStore_c2ca46() {
+  arg_0[uint3(0u, 0u, 1u)] = (0).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_c2ca46();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_c2ca46();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_c2ca46();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/c2ca46.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/c2ca46.wgsl.expected.glsl
new file mode 100644
index 0000000..2155bb1
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/c2ca46.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+layout(rgba16i) uniform highp writeonly iimage2DArray arg_0;
+void textureStore_c2ca46() {
+  imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), ivec4(0));
+}
+
+vec4 vertex_main() {
+  textureStore_c2ca46();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = 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_c2ca46() {
+  imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), ivec4(0));
+}
+
+void fragment_main() {
+  textureStore_c2ca46();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+layout(rgba16i) uniform highp writeonly iimage2DArray arg_0;
+void textureStore_c2ca46() {
+  imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), ivec4(0));
+}
+
+void compute_main() {
+  textureStore_c2ca46();
+}
+
+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/c2ca46.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/c2ca46.wgsl.expected.msl
new file mode 100644
index 0000000..43cef9a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/c2ca46.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_c2ca46(texture2d_array<int, access::write> tint_symbol_1) {
+  tint_symbol_1.write(int4(0), uint2(uint2(0u)), 1u);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<int, access::write> tint_symbol_2) {
+  textureStore_c2ca46(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_c2ca46(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d_array<int, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureStore_c2ca46(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureStore/c2ca46.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/c2ca46.wgsl.expected.spvasm
new file mode 100644
index 0000000..3e8f100
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/c2ca46.wgsl.expected.spvasm
@@ -0,0 +1,76 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 40
+; 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_c2ca46 "textureStore_c2ca46"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_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
+     %uint_1 = OpConstant %uint 1
+         %23 = OpConstantComposite %v3uint %uint_0 %uint_0 %uint_1
+      %v4int = OpTypeVector %int 4
+         %25 = OpConstantNull %v4int
+         %26 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureStore_c2ca46 = OpFunction %void None %13
+         %16 = OpLabel
+         %18 = OpLoad %11 %arg_0
+               OpImageWrite %18 %23 %25
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %26
+         %28 = OpLabel
+         %29 = OpFunctionCall %void %textureStore_c2ca46
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %31 = OpLabel
+         %32 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %32
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %35 = OpLabel
+         %36 = OpFunctionCall %void %textureStore_c2ca46
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %38 = OpLabel
+         %39 = OpFunctionCall %void %textureStore_c2ca46
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/c2ca46.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/c2ca46.wgsl.expected.wgsl
new file mode 100644
index 0000000..2598ef9
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/c2ca46.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba16sint, write>;
+
+fn textureStore_c2ca46() {
+  textureStore(arg_0, vec2<u32>(), 1u, vec4<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_c2ca46();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_c2ca46();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_c2ca46();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/cb3b0b.wgsl b/test/tint/builtins/gen/literal/textureStore/cb3b0b.wgsl
new file mode 100644
index 0000000..fcca551
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/cb3b0b.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_3d<rgba8sint, write>;
+
+// fn textureStore(texture: texture_storage_3d<rgba8sint, write>, coords: vec3<u32>, value: vec4<i32>)
+fn textureStore_cb3b0b() {
+  textureStore(arg_0, vec3<u32>(), vec4<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_cb3b0b();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_cb3b0b();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_cb3b0b();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/cb3b0b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/cb3b0b.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..643e053
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/cb3b0b.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture3D<int4> arg_0 : register(u0, space1);
+
+void textureStore_cb3b0b() {
+  arg_0[(0u).xxx] = (0).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_cb3b0b();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_cb3b0b();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_cb3b0b();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/cb3b0b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/cb3b0b.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..643e053
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/cb3b0b.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture3D<int4> arg_0 : register(u0, space1);
+
+void textureStore_cb3b0b() {
+  arg_0[(0u).xxx] = (0).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_cb3b0b();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_cb3b0b();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_cb3b0b();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/cb3b0b.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/cb3b0b.wgsl.expected.glsl
new file mode 100644
index 0000000..7d048d2
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/cb3b0b.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+layout(rgba8i) uniform highp writeonly iimage3D arg_0;
+void textureStore_cb3b0b() {
+  imageStore(arg_0, ivec3(uvec3(0u)), ivec4(0));
+}
+
+vec4 vertex_main() {
+  textureStore_cb3b0b();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+layout(rgba8i) uniform highp writeonly iimage3D arg_0;
+void textureStore_cb3b0b() {
+  imageStore(arg_0, ivec3(uvec3(0u)), ivec4(0));
+}
+
+void fragment_main() {
+  textureStore_cb3b0b();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+layout(rgba8i) uniform highp writeonly iimage3D arg_0;
+void textureStore_cb3b0b() {
+  imageStore(arg_0, ivec3(uvec3(0u)), ivec4(0));
+}
+
+void compute_main() {
+  textureStore_cb3b0b();
+}
+
+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/cb3b0b.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/cb3b0b.wgsl.expected.msl
new file mode 100644
index 0000000..070eb53
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/cb3b0b.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_cb3b0b(texture3d<int, access::write> tint_symbol_1) {
+  tint_symbol_1.write(int4(0), uint3(uint3(0u)));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<int, access::write> tint_symbol_2) {
+  textureStore_cb3b0b(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<int, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture3d<int, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureStore_cb3b0b(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture3d<int, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureStore_cb3b0b(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureStore/cb3b0b.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/cb3b0b.wgsl.expected.spvasm
new file mode 100644
index 0000000..8220c1d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/cb3b0b.wgsl.expected.spvasm
@@ -0,0 +1,74 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 38
+; 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_cb3b0b "textureStore_cb3b0b"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 3D 0 0 0 2 Rgba8i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v3uint = OpTypeVector %uint 3
+         %21 = OpConstantNull %v3uint
+      %v4int = OpTypeVector %int 4
+         %23 = OpConstantNull %v4int
+         %24 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureStore_cb3b0b = OpFunction %void None %13
+         %16 = OpLabel
+         %18 = OpLoad %11 %arg_0
+               OpImageWrite %18 %21 %23
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %24
+         %26 = OpLabel
+         %27 = OpFunctionCall %void %textureStore_cb3b0b
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %29 = OpLabel
+         %30 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %30
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %textureStore_cb3b0b
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %textureStore_cb3b0b
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/cb3b0b.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/cb3b0b.wgsl.expected.wgsl
new file mode 100644
index 0000000..4d7d2c0
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/cb3b0b.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_3d<rgba8sint, write>;
+
+fn textureStore_cb3b0b() {
+  textureStore(arg_0, vec3<u32>(), vec4<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_cb3b0b();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_cb3b0b();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_cb3b0b();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/d26166.wgsl b/test/tint/builtins/gen/literal/textureStore/d26166.wgsl
new file mode 100644
index 0000000..aff8c5c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/d26166.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_1d<rgba32uint, write>;
+
+// fn textureStore(texture: texture_storage_1d<rgba32uint, write>, coords: u32, value: vec4<u32>)
+fn textureStore_d26166() {
+  textureStore(arg_0, 1u, vec4<u32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_d26166();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_d26166();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_d26166();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/d26166.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/d26166.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..f98702f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/d26166.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture1D<uint4> arg_0 : register(u0, space1);
+
+void textureStore_d26166() {
+  arg_0[1u] = (0u).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_d26166();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_d26166();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_d26166();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/d26166.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/d26166.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..f98702f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/d26166.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture1D<uint4> arg_0 : register(u0, space1);
+
+void textureStore_d26166() {
+  arg_0[1u] = (0u).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_d26166();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_d26166();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_d26166();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/d26166.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/d26166.wgsl.expected.glsl
new file mode 100644
index 0000000..ac9e79c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/d26166.wgsl.expected.glsl
@@ -0,0 +1,78 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba32ui) uniform highp writeonly uimage1D arg_0;
+void textureStore_d26166() {
+  imageStore(arg_0, int(1u), uvec4(0u));
+}
+
+vec4 vertex_main() {
+  textureStore_d26166();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'uimage1D' : Reserved word. 
+WARNING: 0:3: 'layout' : useless application of layout qualifier 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+layout(rgba32ui) uniform highp writeonly uimage1D arg_0;
+void textureStore_d26166() {
+  imageStore(arg_0, int(1u), uvec4(0u));
+}
+
+void fragment_main() {
+  textureStore_d26166();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'uimage1D' : Reserved word. 
+WARNING: 0:4: 'layout' : useless application of layout qualifier 
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba32ui) uniform highp writeonly uimage1D arg_0;
+void textureStore_d26166() {
+  imageStore(arg_0, int(1u), uvec4(0u));
+}
+
+void compute_main() {
+  textureStore_d26166();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'uimage1D' : Reserved word. 
+WARNING: 0:3: 'layout' : useless application of layout qualifier 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureStore/d26166.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/d26166.wgsl.expected.msl
new file mode 100644
index 0000000..ea57840
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/d26166.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_d26166(texture1d<uint, access::write> tint_symbol_1) {
+  tint_symbol_1.write(uint4(0u), uint(1u));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<uint, access::write> tint_symbol_2) {
+  textureStore_d26166(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<uint, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<uint, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureStore_d26166(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture1d<uint, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureStore_d26166(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureStore/d26166.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/d26166.wgsl.expected.spvasm
new file mode 100644
index 0000000..b619746
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/d26166.wgsl.expected.spvasm
@@ -0,0 +1,73 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 36
+; Schema: 0
+               OpCapability Shader
+               OpCapability Image1D
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureStore_d26166 "textureStore_d26166"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 1D 0 0 0 2 Rgba32ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+     %uint_1 = OpConstant %uint 1
+     %v4uint = OpTypeVector %uint 4
+         %21 = OpConstantNull %v4uint
+         %22 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureStore_d26166 = OpFunction %void None %13
+         %16 = OpLabel
+         %18 = OpLoad %11 %arg_0
+               OpImageWrite %18 %uint_1 %21
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %22
+         %24 = OpLabel
+         %25 = OpFunctionCall %void %textureStore_d26166
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %27 = OpLabel
+         %28 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %28
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %31 = OpLabel
+         %32 = OpFunctionCall %void %textureStore_d26166
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %textureStore_d26166
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/d26166.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/d26166.wgsl.expected.wgsl
new file mode 100644
index 0000000..9ae6acf
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/d26166.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_1d<rgba32uint, write>;
+
+fn textureStore_d26166() {
+  textureStore(arg_0, 1u, vec4<u32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_d26166();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_d26166();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_d26166();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/d82b0a.wgsl b/test/tint/builtins/gen/literal/textureStore/d82b0a.wgsl
new file mode 100644
index 0000000..0430ac6
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/d82b0a.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_3d<rg32sint, write>;
+
+// fn textureStore(texture: texture_storage_3d<rg32sint, write>, coords: vec3<u32>, value: vec4<i32>)
+fn textureStore_d82b0a() {
+  textureStore(arg_0, vec3<u32>(), vec4<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_d82b0a();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_d82b0a();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_d82b0a();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/d82b0a.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/d82b0a.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..9eb672e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/d82b0a.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture3D<int4> arg_0 : register(u0, space1);
+
+void textureStore_d82b0a() {
+  arg_0[(0u).xxx] = (0).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_d82b0a();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_d82b0a();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_d82b0a();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/d82b0a.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/d82b0a.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..9eb672e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/d82b0a.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture3D<int4> arg_0 : register(u0, space1);
+
+void textureStore_d82b0a() {
+  arg_0[(0u).xxx] = (0).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_d82b0a();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_d82b0a();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_d82b0a();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/d82b0a.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/d82b0a.wgsl.expected.glsl
new file mode 100644
index 0000000..6baa1cd
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/d82b0a.wgsl.expected.glsl
@@ -0,0 +1,75 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rg32i) uniform highp writeonly iimage3D arg_0;
+void textureStore_d82b0a() {
+  imageStore(arg_0, ivec3(uvec3(0u)), ivec4(0));
+}
+
+vec4 vertex_main() {
+  textureStore_d82b0a();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+layout(rg32i) uniform highp writeonly iimage3D arg_0;
+void textureStore_d82b0a() {
+  imageStore(arg_0, ivec3(uvec3(0u)), ivec4(0));
+}
+
+void fragment_main() {
+  textureStore_d82b0a();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'image load-store format' : not supported with this profile: es
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rg32i) uniform highp writeonly iimage3D arg_0;
+void textureStore_d82b0a() {
+  imageStore(arg_0, ivec3(uvec3(0u)), ivec4(0));
+}
+
+void compute_main() {
+  textureStore_d82b0a();
+}
+
+layout(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/d82b0a.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/d82b0a.wgsl.expected.msl
new file mode 100644
index 0000000..283430c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/d82b0a.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_d82b0a(texture3d<int, access::write> tint_symbol_1) {
+  tint_symbol_1.write(int4(0), uint3(uint3(0u)));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<int, access::write> tint_symbol_2) {
+  textureStore_d82b0a(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<int, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture3d<int, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureStore_d82b0a(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture3d<int, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureStore_d82b0a(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureStore/d82b0a.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/d82b0a.wgsl.expected.spvasm
new file mode 100644
index 0000000..78fb6b6
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/d82b0a.wgsl.expected.spvasm
@@ -0,0 +1,75 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 38
+; 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_d82b0a "textureStore_d82b0a"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 3D 0 0 0 2 Rg32i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v3uint = OpTypeVector %uint 3
+         %21 = OpConstantNull %v3uint
+      %v4int = OpTypeVector %int 4
+         %23 = OpConstantNull %v4int
+         %24 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureStore_d82b0a = OpFunction %void None %13
+         %16 = OpLabel
+         %18 = OpLoad %11 %arg_0
+               OpImageWrite %18 %21 %23
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %24
+         %26 = OpLabel
+         %27 = OpFunctionCall %void %textureStore_d82b0a
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %29 = OpLabel
+         %30 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %30
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %textureStore_d82b0a
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %textureStore_d82b0a
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/d82b0a.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/d82b0a.wgsl.expected.wgsl
new file mode 100644
index 0000000..840ebef
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/d82b0a.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_3d<rg32sint, write>;
+
+fn textureStore_d82b0a() {
+  textureStore(arg_0, vec3<u32>(), vec4<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_d82b0a();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_d82b0a();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_d82b0a();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/db92a2.wgsl b/test/tint/builtins/gen/literal/textureStore/db92a2.wgsl
new file mode 100644
index 0000000..a285481
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/db92a2.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d<rgba16uint, write>;
+
+// fn textureStore(texture: texture_storage_2d<rgba16uint, write>, coords: vec2<u32>, value: vec4<u32>)
+fn textureStore_db92a2() {
+  textureStore(arg_0, vec2<u32>(), vec4<u32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_db92a2();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_db92a2();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_db92a2();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/db92a2.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/db92a2.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..0cc9f6f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/db92a2.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2D<uint4> arg_0 : register(u0, space1);
+
+void textureStore_db92a2() {
+  arg_0[(0u).xx] = (0u).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_db92a2();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_db92a2();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_db92a2();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/db92a2.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/db92a2.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..0cc9f6f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/db92a2.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2D<uint4> arg_0 : register(u0, space1);
+
+void textureStore_db92a2() {
+  arg_0[(0u).xx] = (0u).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_db92a2();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_db92a2();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_db92a2();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/db92a2.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/db92a2.wgsl.expected.glsl
new file mode 100644
index 0000000..67c6b85
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/db92a2.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+layout(rgba16ui) uniform highp writeonly uimage2D arg_0;
+void textureStore_db92a2() {
+  imageStore(arg_0, ivec2(uvec2(0u)), uvec4(0u));
+}
+
+vec4 vertex_main() {
+  textureStore_db92a2();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+layout(rgba16ui) uniform highp writeonly uimage2D arg_0;
+void textureStore_db92a2() {
+  imageStore(arg_0, ivec2(uvec2(0u)), uvec4(0u));
+}
+
+void fragment_main() {
+  textureStore_db92a2();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+layout(rgba16ui) uniform highp writeonly uimage2D arg_0;
+void textureStore_db92a2() {
+  imageStore(arg_0, ivec2(uvec2(0u)), uvec4(0u));
+}
+
+void compute_main() {
+  textureStore_db92a2();
+}
+
+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/db92a2.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/db92a2.wgsl.expected.msl
new file mode 100644
index 0000000..1e319a7
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/db92a2.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_db92a2(texture2d<uint, access::write> tint_symbol_1) {
+  tint_symbol_1.write(uint4(0u), uint2(uint2(0u)));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<uint, access::write> tint_symbol_2) {
+  textureStore_db92a2(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<uint, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<uint, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureStore_db92a2(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d<uint, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureStore_db92a2(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureStore/db92a2.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/db92a2.wgsl.expected.spvasm
new file mode 100644
index 0000000..e708f64
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/db92a2.wgsl.expected.spvasm
@@ -0,0 +1,73 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 37
+; 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_db92a2 "textureStore_db92a2"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 2D 0 0 0 2 Rgba16ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+     %v2uint = OpTypeVector %uint 2
+         %20 = OpConstantNull %v2uint
+     %v4uint = OpTypeVector %uint 4
+         %22 = OpConstantNull %v4uint
+         %23 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureStore_db92a2 = OpFunction %void None %13
+         %16 = OpLabel
+         %18 = OpLoad %11 %arg_0
+               OpImageWrite %18 %20 %22
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %23
+         %25 = OpLabel
+         %26 = OpFunctionCall %void %textureStore_db92a2
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %28 = OpLabel
+         %29 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %29
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %textureStore_db92a2
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %35 = OpLabel
+         %36 = OpFunctionCall %void %textureStore_db92a2
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/db92a2.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/db92a2.wgsl.expected.wgsl
new file mode 100644
index 0000000..3d6717e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/db92a2.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d<rgba16uint, write>;
+
+fn textureStore_db92a2() {
+  textureStore(arg_0, vec2<u32>(), vec4<u32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_db92a2();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_db92a2();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_db92a2();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/de4b94.wgsl b/test/tint/builtins/gen/literal/textureStore/de4b94.wgsl
new file mode 100644
index 0000000..77739a0
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/de4b94.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_1d<r32sint, write>;
+
+// fn textureStore(texture: texture_storage_1d<r32sint, write>, coords: u32, value: vec4<i32>)
+fn textureStore_de4b94() {
+  textureStore(arg_0, 1u, vec4<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_de4b94();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_de4b94();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_de4b94();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/de4b94.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/de4b94.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..e830000
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/de4b94.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture1D<int4> arg_0 : register(u0, space1);
+
+void textureStore_de4b94() {
+  arg_0[1u] = (0).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_de4b94();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_de4b94();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_de4b94();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/de4b94.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/de4b94.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..e830000
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/de4b94.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture1D<int4> arg_0 : register(u0, space1);
+
+void textureStore_de4b94() {
+  arg_0[1u] = (0).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_de4b94();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_de4b94();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_de4b94();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/de4b94.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/de4b94.wgsl.expected.glsl
new file mode 100644
index 0000000..83e4696
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/de4b94.wgsl.expected.glsl
@@ -0,0 +1,78 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(r32i) uniform highp writeonly iimage1D arg_0;
+void textureStore_de4b94() {
+  imageStore(arg_0, int(1u), ivec4(0));
+}
+
+vec4 vertex_main() {
+  textureStore_de4b94();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'iimage1D' : Reserved word. 
+WARNING: 0:3: 'layout' : useless application of layout qualifier 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+layout(r32i) uniform highp writeonly iimage1D arg_0;
+void textureStore_de4b94() {
+  imageStore(arg_0, int(1u), ivec4(0));
+}
+
+void fragment_main() {
+  textureStore_de4b94();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'iimage1D' : Reserved word. 
+WARNING: 0:4: 'layout' : useless application of layout qualifier 
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(r32i) uniform highp writeonly iimage1D arg_0;
+void textureStore_de4b94() {
+  imageStore(arg_0, int(1u), ivec4(0));
+}
+
+void compute_main() {
+  textureStore_de4b94();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'iimage1D' : Reserved word. 
+WARNING: 0:3: 'layout' : useless application of layout qualifier 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureStore/de4b94.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/de4b94.wgsl.expected.msl
new file mode 100644
index 0000000..8402154
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/de4b94.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_de4b94(texture1d<int, access::write> tint_symbol_1) {
+  tint_symbol_1.write(int4(0), uint(1u));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<int, access::write> tint_symbol_2) {
+  textureStore_de4b94(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<int, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<int, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureStore_de4b94(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture1d<int, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureStore_de4b94(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureStore/de4b94.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/de4b94.wgsl.expected.spvasm
new file mode 100644
index 0000000..b5ffea9
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/de4b94.wgsl.expected.spvasm
@@ -0,0 +1,74 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 37
+; Schema: 0
+               OpCapability Shader
+               OpCapability Image1D
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureStore_de4b94 "textureStore_de4b94"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 1D 0 0 0 2 R32i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+      %v4int = OpTypeVector %int 4
+         %22 = OpConstantNull %v4int
+         %23 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureStore_de4b94 = OpFunction %void None %13
+         %16 = OpLabel
+         %18 = OpLoad %11 %arg_0
+               OpImageWrite %18 %uint_1 %22
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %23
+         %25 = OpLabel
+         %26 = OpFunctionCall %void %textureStore_de4b94
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %28 = OpLabel
+         %29 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %29
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %textureStore_de4b94
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %35 = OpLabel
+         %36 = OpFunctionCall %void %textureStore_de4b94
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/de4b94.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/de4b94.wgsl.expected.wgsl
new file mode 100644
index 0000000..bdd4cad
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/de4b94.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_1d<r32sint, write>;
+
+fn textureStore_de4b94() {
+  textureStore(arg_0, 1u, vec4<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_de4b94();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_de4b94();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_de4b94();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/e7c6d8.wgsl b/test/tint/builtins/gen/literal/textureStore/e7c6d8.wgsl
new file mode 100644
index 0000000..b7e07e0
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/e7c6d8.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_1d<rgba8unorm, write>;
+
+// fn textureStore(texture: texture_storage_1d<rgba8unorm, write>, coords: u32, value: vec4<f32>)
+fn textureStore_e7c6d8() {
+  textureStore(arg_0, 1u, vec4<f32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_e7c6d8();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_e7c6d8();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_e7c6d8();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/e7c6d8.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/e7c6d8.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..87e9182
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/e7c6d8.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture1D<float4> arg_0 : register(u0, space1);
+
+void textureStore_e7c6d8() {
+  arg_0[1u] = (0.0f).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_e7c6d8();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_e7c6d8();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_e7c6d8();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/e7c6d8.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/e7c6d8.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..87e9182
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/e7c6d8.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture1D<float4> arg_0 : register(u0, space1);
+
+void textureStore_e7c6d8() {
+  arg_0[1u] = (0.0f).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_e7c6d8();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_e7c6d8();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_e7c6d8();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/e7c6d8.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/e7c6d8.wgsl.expected.glsl
new file mode 100644
index 0000000..9943f8b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/e7c6d8.wgsl.expected.glsl
@@ -0,0 +1,78 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba8) uniform highp writeonly image1D arg_0;
+void textureStore_e7c6d8() {
+  imageStore(arg_0, int(1u), vec4(0.0f));
+}
+
+vec4 vertex_main() {
+  textureStore_e7c6d8();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image1D' : Reserved word. 
+WARNING: 0:3: 'layout' : useless application of layout qualifier 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+layout(rgba8) uniform highp writeonly image1D arg_0;
+void textureStore_e7c6d8() {
+  imageStore(arg_0, int(1u), vec4(0.0f));
+}
+
+void fragment_main() {
+  textureStore_e7c6d8();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'image1D' : Reserved word. 
+WARNING: 0:4: 'layout' : useless application of layout qualifier 
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba8) uniform highp writeonly image1D arg_0;
+void textureStore_e7c6d8() {
+  imageStore(arg_0, int(1u), vec4(0.0f));
+}
+
+void compute_main() {
+  textureStore_e7c6d8();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image1D' : Reserved word. 
+WARNING: 0:3: 'layout' : useless application of layout qualifier 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureStore/e7c6d8.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/e7c6d8.wgsl.expected.msl
new file mode 100644
index 0000000..85510ef
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/e7c6d8.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_e7c6d8(texture1d<float, access::write> tint_symbol_1) {
+  tint_symbol_1.write(float4(0.0f), uint(1u));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<float, access::write> tint_symbol_2) {
+  textureStore_e7c6d8(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<float, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<float, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureStore_e7c6d8(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture1d<float, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureStore_e7c6d8(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureStore/e7c6d8.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/e7c6d8.wgsl.expected.spvasm
new file mode 100644
index 0000000..e9be8b7
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/e7c6d8.wgsl.expected.spvasm
@@ -0,0 +1,71 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 34
+; Schema: 0
+               OpCapability Shader
+               OpCapability Image1D
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureStore_e7c6d8 "textureStore_e7c6d8"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 1D 0 0 0 2 Rgba8
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %12 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+         %20 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureStore_e7c6d8 = OpFunction %void None %12
+         %15 = OpLabel
+         %17 = OpLoad %11 %arg_0
+               OpImageWrite %17 %uint_1 %5
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %20
+         %22 = OpLabel
+         %23 = OpFunctionCall %void %textureStore_e7c6d8
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+         %25 = OpLabel
+         %26 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %26
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %textureStore_e7c6d8
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %12
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %textureStore_e7c6d8
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/e7c6d8.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/e7c6d8.wgsl.expected.wgsl
new file mode 100644
index 0000000..3e17151
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/e7c6d8.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_1d<rgba8unorm, write>;
+
+fn textureStore_e7c6d8() {
+  textureStore(arg_0, 1u, vec4<f32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_e7c6d8();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_e7c6d8();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_e7c6d8();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/e8cbf7.wgsl b/test/tint/builtins/gen/literal/textureStore/e8cbf7.wgsl
new file mode 100644
index 0000000..8d6a6aa
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/e8cbf7.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d<r32uint, write>;
+
+// fn textureStore(texture: texture_storage_2d<r32uint, write>, coords: vec2<u32>, value: vec4<u32>)
+fn textureStore_e8cbf7() {
+  textureStore(arg_0, vec2<u32>(), vec4<u32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_e8cbf7();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_e8cbf7();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_e8cbf7();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/e8cbf7.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/e8cbf7.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..c5cfb67
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/e8cbf7.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2D<uint4> arg_0 : register(u0, space1);
+
+void textureStore_e8cbf7() {
+  arg_0[(0u).xx] = (0u).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_e8cbf7();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_e8cbf7();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_e8cbf7();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/e8cbf7.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/e8cbf7.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..c5cfb67
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/e8cbf7.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture2D<uint4> arg_0 : register(u0, space1);
+
+void textureStore_e8cbf7() {
+  arg_0[(0u).xx] = (0u).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_e8cbf7();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_e8cbf7();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_e8cbf7();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/e8cbf7.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/e8cbf7.wgsl.expected.glsl
new file mode 100644
index 0000000..2b6995d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/e8cbf7.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+layout(r32ui) uniform highp writeonly uimage2D arg_0;
+void textureStore_e8cbf7() {
+  imageStore(arg_0, ivec2(uvec2(0u)), uvec4(0u));
+}
+
+vec4 vertex_main() {
+  textureStore_e8cbf7();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+layout(r32ui) uniform highp writeonly uimage2D arg_0;
+void textureStore_e8cbf7() {
+  imageStore(arg_0, ivec2(uvec2(0u)), uvec4(0u));
+}
+
+void fragment_main() {
+  textureStore_e8cbf7();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+layout(r32ui) uniform highp writeonly uimage2D arg_0;
+void textureStore_e8cbf7() {
+  imageStore(arg_0, ivec2(uvec2(0u)), uvec4(0u));
+}
+
+void compute_main() {
+  textureStore_e8cbf7();
+}
+
+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/e8cbf7.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/e8cbf7.wgsl.expected.msl
new file mode 100644
index 0000000..e263440
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/e8cbf7.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_e8cbf7(texture2d<uint, access::write> tint_symbol_1) {
+  tint_symbol_1.write(uint4(0u), uint2(uint2(0u)));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<uint, access::write> tint_symbol_2) {
+  textureStore_e8cbf7(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<uint, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<uint, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureStore_e8cbf7(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d<uint, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureStore_e8cbf7(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureStore/e8cbf7.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/e8cbf7.wgsl.expected.spvasm
new file mode 100644
index 0000000..38ad68a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/e8cbf7.wgsl.expected.spvasm
@@ -0,0 +1,73 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 37
+; 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_e8cbf7 "textureStore_e8cbf7"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 2D 0 0 0 2 R32ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+     %v2uint = OpTypeVector %uint 2
+         %20 = OpConstantNull %v2uint
+     %v4uint = OpTypeVector %uint 4
+         %22 = OpConstantNull %v4uint
+         %23 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureStore_e8cbf7 = OpFunction %void None %13
+         %16 = OpLabel
+         %18 = OpLoad %11 %arg_0
+               OpImageWrite %18 %20 %22
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %23
+         %25 = OpLabel
+         %26 = OpFunctionCall %void %textureStore_e8cbf7
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %28 = OpLabel
+         %29 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %29
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %textureStore_e8cbf7
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %35 = OpLabel
+         %36 = OpFunctionCall %void %textureStore_e8cbf7
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/e8cbf7.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/e8cbf7.wgsl.expected.wgsl
new file mode 100644
index 0000000..33cb1d3
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/e8cbf7.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d<r32uint, write>;
+
+fn textureStore_e8cbf7() {
+  textureStore(arg_0, vec2<u32>(), vec4<u32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_e8cbf7();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_e8cbf7();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_e8cbf7();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/f1e6d3.wgsl b/test/tint/builtins/gen/literal/textureStore/f1e6d3.wgsl
new file mode 100644
index 0000000..e73dc3e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/f1e6d3.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_3d<r32sint, write>;
+
+// fn textureStore(texture: texture_storage_3d<r32sint, write>, coords: vec3<u32>, value: vec4<i32>)
+fn textureStore_f1e6d3() {
+  textureStore(arg_0, vec3<u32>(), vec4<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_f1e6d3();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_f1e6d3();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_f1e6d3();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/f1e6d3.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/f1e6d3.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..b02d310
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/f1e6d3.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture3D<int4> arg_0 : register(u0, space1);
+
+void textureStore_f1e6d3() {
+  arg_0[(0u).xxx] = (0).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_f1e6d3();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_f1e6d3();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_f1e6d3();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/f1e6d3.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/f1e6d3.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..b02d310
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/f1e6d3.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture3D<int4> arg_0 : register(u0, space1);
+
+void textureStore_f1e6d3() {
+  arg_0[(0u).xxx] = (0).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_f1e6d3();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_f1e6d3();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_f1e6d3();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/f1e6d3.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/f1e6d3.wgsl.expected.glsl
new file mode 100644
index 0000000..ba30681
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/f1e6d3.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+layout(r32i) uniform highp writeonly iimage3D arg_0;
+void textureStore_f1e6d3() {
+  imageStore(arg_0, ivec3(uvec3(0u)), ivec4(0));
+}
+
+vec4 vertex_main() {
+  textureStore_f1e6d3();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+layout(r32i) uniform highp writeonly iimage3D arg_0;
+void textureStore_f1e6d3() {
+  imageStore(arg_0, ivec3(uvec3(0u)), ivec4(0));
+}
+
+void fragment_main() {
+  textureStore_f1e6d3();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+layout(r32i) uniform highp writeonly iimage3D arg_0;
+void textureStore_f1e6d3() {
+  imageStore(arg_0, ivec3(uvec3(0u)), ivec4(0));
+}
+
+void compute_main() {
+  textureStore_f1e6d3();
+}
+
+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/f1e6d3.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/f1e6d3.wgsl.expected.msl
new file mode 100644
index 0000000..06ddbc1
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/f1e6d3.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_f1e6d3(texture3d<int, access::write> tint_symbol_1) {
+  tint_symbol_1.write(int4(0), uint3(uint3(0u)));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<int, access::write> tint_symbol_2) {
+  textureStore_f1e6d3(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<int, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture3d<int, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureStore_f1e6d3(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture3d<int, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureStore_f1e6d3(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureStore/f1e6d3.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/f1e6d3.wgsl.expected.spvasm
new file mode 100644
index 0000000..3b45b31
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/f1e6d3.wgsl.expected.spvasm
@@ -0,0 +1,74 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 38
+; 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_f1e6d3 "textureStore_f1e6d3"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 3D 0 0 0 2 R32i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v3uint = OpTypeVector %uint 3
+         %21 = OpConstantNull %v3uint
+      %v4int = OpTypeVector %int 4
+         %23 = OpConstantNull %v4int
+         %24 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureStore_f1e6d3 = OpFunction %void None %13
+         %16 = OpLabel
+         %18 = OpLoad %11 %arg_0
+               OpImageWrite %18 %21 %23
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %24
+         %26 = OpLabel
+         %27 = OpFunctionCall %void %textureStore_f1e6d3
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %29 = OpLabel
+         %30 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %30
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %textureStore_f1e6d3
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %textureStore_f1e6d3
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/f1e6d3.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/f1e6d3.wgsl.expected.wgsl
new file mode 100644
index 0000000..a68c2ec
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/f1e6d3.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_3d<r32sint, write>;
+
+fn textureStore_f1e6d3() {
+  textureStore(arg_0, vec3<u32>(), vec4<i32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_f1e6d3();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_f1e6d3();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_f1e6d3();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/fcbe66.wgsl b/test/tint/builtins/gen/literal/textureStore/fcbe66.wgsl
new file mode 100644
index 0000000..323cd36
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/fcbe66.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_3d<rg32float, write>;
+
+// fn textureStore(texture: texture_storage_3d<rg32float, write>, coords: vec3<u32>, value: vec4<f32>)
+fn textureStore_fcbe66() {
+  textureStore(arg_0, vec3<u32>(), vec4<f32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_fcbe66();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_fcbe66();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_fcbe66();
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/fcbe66.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/fcbe66.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..b1b554d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/fcbe66.wgsl.expected.dxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture3D<float4> arg_0 : register(u0, space1);
+
+void textureStore_fcbe66() {
+  arg_0[(0u).xxx] = (0.0f).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_fcbe66();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_fcbe66();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_fcbe66();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/fcbe66.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/fcbe66.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..b1b554d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/fcbe66.wgsl.expected.fxc.hlsl
@@ -0,0 +1,32 @@
+RWTexture3D<float4> arg_0 : register(u0, space1);
+
+void textureStore_fcbe66() {
+  arg_0[(0u).xxx] = (0.0f).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_fcbe66();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_fcbe66();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_fcbe66();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureStore/fcbe66.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/fcbe66.wgsl.expected.glsl
new file mode 100644
index 0000000..87b611e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/fcbe66.wgsl.expected.glsl
@@ -0,0 +1,75 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rg32f) uniform highp writeonly image3D arg_0;
+void textureStore_fcbe66() {
+  imageStore(arg_0, ivec3(uvec3(0u)), vec4(0.0f));
+}
+
+vec4 vertex_main() {
+  textureStore_fcbe66();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+layout(rg32f) uniform highp writeonly image3D arg_0;
+void textureStore_fcbe66() {
+  imageStore(arg_0, ivec3(uvec3(0u)), vec4(0.0f));
+}
+
+void fragment_main() {
+  textureStore_fcbe66();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'image load-store format' : not supported with this profile: es
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rg32f) uniform highp writeonly image3D arg_0;
+void textureStore_fcbe66() {
+  imageStore(arg_0, ivec3(uvec3(0u)), vec4(0.0f));
+}
+
+void compute_main() {
+  textureStore_fcbe66();
+}
+
+layout(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/fcbe66.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/fcbe66.wgsl.expected.msl
new file mode 100644
index 0000000..c2349be
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/fcbe66.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_fcbe66(texture3d<float, access::write> tint_symbol_1) {
+  tint_symbol_1.write(float4(0.0f), uint3(uint3(0u)));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<float, access::write> tint_symbol_2) {
+  textureStore_fcbe66(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<float, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture3d<float, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureStore_fcbe66(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture3d<float, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureStore_fcbe66(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureStore/fcbe66.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/fcbe66.wgsl.expected.spvasm
new file mode 100644
index 0000000..6617ea5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/fcbe66.wgsl.expected.spvasm
@@ -0,0 +1,72 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 35
+; 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_fcbe66 "textureStore_fcbe66"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 3D 0 0 0 2 Rg32f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %12 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v3uint = OpTypeVector %uint 3
+         %20 = OpConstantNull %v3uint
+         %21 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureStore_fcbe66 = OpFunction %void None %12
+         %15 = OpLabel
+         %17 = OpLoad %11 %arg_0
+               OpImageWrite %17 %20 %5
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %21
+         %23 = OpLabel
+         %24 = OpFunctionCall %void %textureStore_fcbe66
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+         %26 = OpLabel
+         %27 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %27
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+         %30 = OpLabel
+         %31 = OpFunctionCall %void %textureStore_fcbe66
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %12
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %textureStore_fcbe66
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/fcbe66.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/fcbe66.wgsl.expected.wgsl
new file mode 100644
index 0000000..2b58eeb
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureStore/fcbe66.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_3d<rg32float, write>;
+
+fn textureStore_fcbe66() {
+  textureStore(arg_0, vec3<u32>(), vec4<f32>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_fcbe66();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_fcbe66();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_fcbe66();
+}
diff --git a/test/tint/builtins/gen/literal/transpose/06794e.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/transpose/06794e.wgsl.expected.fxc.hlsl
index 2e4508d..f1f3224 100644
--- a/test/tint/builtins/gen/literal/transpose/06794e.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/transpose/06794e.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
   transpose_06794e();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000204EECC7200(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/transpose/5edd96.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/transpose/5edd96.wgsl.expected.fxc.hlsl
index 4f8832f..b4a69e2 100644
--- a/test/tint/builtins/gen/literal/transpose/5edd96.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/transpose/5edd96.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
   transpose_5edd96();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000292A0E96D40(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/transpose/5f36bf.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/transpose/5f36bf.wgsl.expected.fxc.hlsl
index cc78b8f..208ae1c 100644
--- a/test/tint/builtins/gen/literal/transpose/5f36bf.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/transpose/5f36bf.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
   transpose_5f36bf();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000237E1607910(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/transpose/7be8b2.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/transpose/7be8b2.wgsl.expected.fxc.hlsl
index a45d63b..ed7f50f 100644
--- a/test/tint/builtins/gen/literal/transpose/7be8b2.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/transpose/7be8b2.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
   transpose_7be8b2();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001EDDB33C1F0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/transpose/844869.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/transpose/844869.wgsl.expected.fxc.hlsl
index ec91e0b..0ac951e 100644
--- a/test/tint/builtins/gen/literal/transpose/844869.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/transpose/844869.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
   transpose_844869();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001F000A07970(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/transpose/8c06ce.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/transpose/8c06ce.wgsl.expected.fxc.hlsl
index 7a4521b..bb6fb91 100644
--- a/test/tint/builtins/gen/literal/transpose/8c06ce.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/transpose/8c06ce.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
   transpose_8c06ce();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000028A648373A0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/transpose/b9ad1f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/transpose/b9ad1f.wgsl.expected.fxc.hlsl
index dd484fc..d92de90 100644
--- a/test/tint/builtins/gen/literal/transpose/b9ad1f.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/transpose/b9ad1f.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
   transpose_b9ad1f();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001E12EBEEBC0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/transpose/d6faec.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/transpose/d6faec.wgsl.expected.fxc.hlsl
index 0fdbfb1..8103bfb 100644
--- a/test/tint/builtins/gen/literal/transpose/d6faec.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/transpose/d6faec.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
   transpose_d6faec();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002356649E890(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/transpose/faeb05.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/transpose/faeb05.wgsl.expected.fxc.hlsl
index 16ac417..0429c73 100644
--- a/test/tint/builtins/gen/literal/transpose/faeb05.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/transpose/faeb05.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
   transpose_faeb05();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000019548DF3C90(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/trunc/103ab8.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/trunc/103ab8.wgsl.expected.fxc.hlsl
index e27ff8b..d25fa79 100644
--- a/test/tint/builtins/gen/literal/trunc/103ab8.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/trunc/103ab8.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
   trunc_103ab8();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000022CEF83F530(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/trunc/a56109.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/trunc/a56109.wgsl.expected.fxc.hlsl
index 003cc1e..58542bd 100644
--- a/test/tint/builtins/gen/literal/trunc/a56109.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/trunc/a56109.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
   trunc_a56109();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000295C5ED1620(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/literal/trunc/cc2b0d.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/trunc/cc2b0d.wgsl.expected.fxc.hlsl
index afe8dc6..ad2b8b9 100644
--- a/test/tint/builtins/gen/literal/trunc/cc2b0d.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/trunc/cc2b0d.wgsl.expected.fxc.hlsl
@@ -30,7 +30,3 @@
   trunc_cc2b0d();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000176C0197D30(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000176C0197D30(2,13-15): error X3000: unrecognized identifier 'res'
-
diff --git a/test/tint/builtins/gen/literal/trunc/ce7c17.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/trunc/ce7c17.wgsl.expected.fxc.hlsl
index 08aa6d3..e591b7f 100644
--- a/test/tint/builtins/gen/literal/trunc/ce7c17.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/trunc/ce7c17.wgsl.expected.fxc.hlsl
@@ -30,6 +30,3 @@
   trunc_ce7c17();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000235C1E68810(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/abs/421ca3.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/abs/421ca3.wgsl.expected.fxc.hlsl
index 5e90e2d..12b231a 100644
--- a/test/tint/builtins/gen/var/abs/421ca3.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/abs/421ca3.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
   abs_421ca3();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002C922E88770(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002C922E88770(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/abs/538d29.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/abs/538d29.wgsl.expected.fxc.hlsl
index 1f4e9ce..daeb777 100644
--- a/test/tint/builtins/gen/var/abs/538d29.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/abs/538d29.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
   abs_538d29();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001B8FDD307F0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001B8FDD307F0(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/abs/5ae4fe.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/abs/5ae4fe.wgsl.expected.fxc.hlsl
index dc15e74..88125e3 100644
--- a/test/tint/builtins/gen/var/abs/5ae4fe.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/abs/5ae4fe.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
   abs_5ae4fe();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000183992C05E0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000183992C05E0(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/abs/fd247f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/abs/fd247f.wgsl.expected.fxc.hlsl
index 891b948..23b1f74 100644
--- a/test/tint/builtins/gen/var/abs/fd247f.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/abs/fd247f.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
   abs_fd247f();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002C33CE4C600(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002C33CE4C600(2,13-17): error X3000: unrecognized identifier 'arg_0'
-
diff --git a/test/tint/builtins/gen/var/acos/004aff.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/acos/004aff.wgsl.expected.fxc.hlsl
index 6332759..6b1ebd0 100644
--- a/test/tint/builtins/gen/var/acos/004aff.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/acos/004aff.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
   acos_004aff();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000014A098A05E0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000014A098A05E0(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/acos/203628.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/acos/203628.wgsl.expected.fxc.hlsl
index 388e412..67c0aa3 100644
--- a/test/tint/builtins/gen/var/acos/203628.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/acos/203628.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
   acos_203628();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000227066CF430(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000227066CF430(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/acos/303e3d.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/acos/303e3d.wgsl.expected.fxc.hlsl
index 48013a1..949afd2 100644
--- a/test/tint/builtins/gen/var/acos/303e3d.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/acos/303e3d.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
   acos_303e3d();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001C6C153CEA0(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001C6C153CEA0(2,13-17): error X3000: unrecognized identifier 'arg_0'
-
diff --git a/test/tint/builtins/gen/var/acos/f47057.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/acos/f47057.wgsl.expected.fxc.hlsl
index 9b3376d..3b14b67 100644
--- a/test/tint/builtins/gen/var/acos/f47057.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/acos/f47057.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
   acos_f47057();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000287C9AECA00(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000287C9AECA00(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/acosh/5f49d8.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/acosh/5f49d8.wgsl.expected.fxc.hlsl
index bfa965b..c117b61 100644
--- a/test/tint/builtins/gen/var/acosh/5f49d8.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/acosh/5f49d8.wgsl.expected.fxc.hlsl
@@ -35,6 +35,3 @@
   acosh_5f49d8();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002311F9F6BD0(1,8-16): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/acosh/a37dfe.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/acosh/a37dfe.wgsl.expected.fxc.hlsl
index ca1ca13..042317e 100644
--- a/test/tint/builtins/gen/var/acosh/a37dfe.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/acosh/a37dfe.wgsl.expected.fxc.hlsl
@@ -35,6 +35,3 @@
   acosh_a37dfe();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001D63F571640(1,1-9): error X3000: unrecognized identifier 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/acosh/de60d8.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/acosh/de60d8.wgsl.expected.fxc.hlsl
index f2776f0..6265bcb 100644
--- a/test/tint/builtins/gen/var/acosh/de60d8.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/acosh/de60d8.wgsl.expected.fxc.hlsl
@@ -35,6 +35,3 @@
   acosh_de60d8();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000021E640184D0(1,8-16): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/acosh/f56574.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/acosh/f56574.wgsl.expected.fxc.hlsl
index a531094..d89968c 100644
--- a/test/tint/builtins/gen/var/acosh/f56574.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/acosh/f56574.wgsl.expected.fxc.hlsl
@@ -35,6 +35,3 @@
   acosh_f56574();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000027554446BD0(1,8-16): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/arrayLength/8421b9.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/arrayLength/8421b9.wgsl.expected.dxc.hlsl
index af8f59a..fc94710 100644
--- a/test/tint/builtins/gen/var/arrayLength/8421b9.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/arrayLength/8421b9.wgsl.expected.dxc.hlsl
@@ -1,17 +1,17 @@
 SKIP: FAILED
 
-gen/var/arrayLength/8421b9.wgsl:26:10 error: using f16 types in 'storage' address space is not implemented yet
+builtins/gen/var/arrayLength/8421b9.wgsl:26:10 error: using f16 types in 'storage' address space is not implemented yet
   arg_0: array<f16>,
          ^^^^^^^^^^
 
-gen/var/arrayLength/8421b9.wgsl:25:1 note: see layout of struct:
+builtins/gen/var/arrayLength/8421b9.wgsl:25:1 note: see layout of struct:
 /*           align(2) size(2) */ struct SB_RO {
 /* offset(0) align(2) size(2) */   arg_0 : array<f16>;
 /*                            */ };
 struct SB_RO {
 ^^^^^^
 
-gen/var/arrayLength/8421b9.wgsl:28:42 note: see declaration of variable
+builtins/gen/var/arrayLength/8421b9.wgsl:28:42 note: see declaration of variable
 @group(0) @binding(1) var<storage, read> sb_ro : SB_RO;
                                          ^^^^^
 
diff --git a/test/tint/builtins/gen/var/arrayLength/8421b9.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/arrayLength/8421b9.wgsl.expected.fxc.hlsl
index af8f59a..fc94710 100644
--- a/test/tint/builtins/gen/var/arrayLength/8421b9.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/arrayLength/8421b9.wgsl.expected.fxc.hlsl
@@ -1,17 +1,17 @@
 SKIP: FAILED
 
-gen/var/arrayLength/8421b9.wgsl:26:10 error: using f16 types in 'storage' address space is not implemented yet
+builtins/gen/var/arrayLength/8421b9.wgsl:26:10 error: using f16 types in 'storage' address space is not implemented yet
   arg_0: array<f16>,
          ^^^^^^^^^^
 
-gen/var/arrayLength/8421b9.wgsl:25:1 note: see layout of struct:
+builtins/gen/var/arrayLength/8421b9.wgsl:25:1 note: see layout of struct:
 /*           align(2) size(2) */ struct SB_RO {
 /* offset(0) align(2) size(2) */   arg_0 : array<f16>;
 /*                            */ };
 struct SB_RO {
 ^^^^^^
 
-gen/var/arrayLength/8421b9.wgsl:28:42 note: see declaration of variable
+builtins/gen/var/arrayLength/8421b9.wgsl:28:42 note: see declaration of variable
 @group(0) @binding(1) var<storage, read> sb_ro : SB_RO;
                                          ^^^^^
 
diff --git a/test/tint/builtins/gen/var/arrayLength/8421b9.wgsl.expected.msl b/test/tint/builtins/gen/var/arrayLength/8421b9.wgsl.expected.msl
index af8f59a..fc94710 100644
--- a/test/tint/builtins/gen/var/arrayLength/8421b9.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/arrayLength/8421b9.wgsl.expected.msl
@@ -1,17 +1,17 @@
 SKIP: FAILED
 
-gen/var/arrayLength/8421b9.wgsl:26:10 error: using f16 types in 'storage' address space is not implemented yet
+builtins/gen/var/arrayLength/8421b9.wgsl:26:10 error: using f16 types in 'storage' address space is not implemented yet
   arg_0: array<f16>,
          ^^^^^^^^^^
 
-gen/var/arrayLength/8421b9.wgsl:25:1 note: see layout of struct:
+builtins/gen/var/arrayLength/8421b9.wgsl:25:1 note: see layout of struct:
 /*           align(2) size(2) */ struct SB_RO {
 /* offset(0) align(2) size(2) */   arg_0 : array<f16>;
 /*                            */ };
 struct SB_RO {
 ^^^^^^
 
-gen/var/arrayLength/8421b9.wgsl:28:42 note: see declaration of variable
+builtins/gen/var/arrayLength/8421b9.wgsl:28:42 note: see declaration of variable
 @group(0) @binding(1) var<storage, read> sb_ro : SB_RO;
                                          ^^^^^
 
diff --git a/test/tint/builtins/gen/var/arrayLength/8421b9.wgsl.expected.spvasm b/test/tint/builtins/gen/var/arrayLength/8421b9.wgsl.expected.spvasm
index af8f59a..fc94710 100644
--- a/test/tint/builtins/gen/var/arrayLength/8421b9.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/arrayLength/8421b9.wgsl.expected.spvasm
@@ -1,17 +1,17 @@
 SKIP: FAILED
 
-gen/var/arrayLength/8421b9.wgsl:26:10 error: using f16 types in 'storage' address space is not implemented yet
+builtins/gen/var/arrayLength/8421b9.wgsl:26:10 error: using f16 types in 'storage' address space is not implemented yet
   arg_0: array<f16>,
          ^^^^^^^^^^
 
-gen/var/arrayLength/8421b9.wgsl:25:1 note: see layout of struct:
+builtins/gen/var/arrayLength/8421b9.wgsl:25:1 note: see layout of struct:
 /*           align(2) size(2) */ struct SB_RO {
 /* offset(0) align(2) size(2) */   arg_0 : array<f16>;
 /*                            */ };
 struct SB_RO {
 ^^^^^^
 
-gen/var/arrayLength/8421b9.wgsl:28:42 note: see declaration of variable
+builtins/gen/var/arrayLength/8421b9.wgsl:28:42 note: see declaration of variable
 @group(0) @binding(1) var<storage, read> sb_ro : SB_RO;
                                          ^^^^^
 
diff --git a/test/tint/builtins/gen/var/arrayLength/8421b9.wgsl.expected.wgsl b/test/tint/builtins/gen/var/arrayLength/8421b9.wgsl.expected.wgsl
index af8f59a..fc94710 100644
--- a/test/tint/builtins/gen/var/arrayLength/8421b9.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/arrayLength/8421b9.wgsl.expected.wgsl
@@ -1,17 +1,17 @@
 SKIP: FAILED
 
-gen/var/arrayLength/8421b9.wgsl:26:10 error: using f16 types in 'storage' address space is not implemented yet
+builtins/gen/var/arrayLength/8421b9.wgsl:26:10 error: using f16 types in 'storage' address space is not implemented yet
   arg_0: array<f16>,
          ^^^^^^^^^^
 
-gen/var/arrayLength/8421b9.wgsl:25:1 note: see layout of struct:
+builtins/gen/var/arrayLength/8421b9.wgsl:25:1 note: see layout of struct:
 /*           align(2) size(2) */ struct SB_RO {
 /* offset(0) align(2) size(2) */   arg_0 : array<f16>;
 /*                            */ };
 struct SB_RO {
 ^^^^^^
 
-gen/var/arrayLength/8421b9.wgsl:28:42 note: see declaration of variable
+builtins/gen/var/arrayLength/8421b9.wgsl:28:42 note: see declaration of variable
 @group(0) @binding(1) var<storage, read> sb_ro : SB_RO;
                                          ^^^^^
 
diff --git a/test/tint/builtins/gen/var/arrayLength/cbd6b5.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/arrayLength/cbd6b5.wgsl.expected.dxc.hlsl
index ec22a8b..f19d93a 100644
--- a/test/tint/builtins/gen/var/arrayLength/cbd6b5.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/arrayLength/cbd6b5.wgsl.expected.dxc.hlsl
@@ -1,17 +1,17 @@
 SKIP: FAILED
 
-gen/var/arrayLength/cbd6b5.wgsl:26:10 error: using f16 types in 'storage' address space is not implemented yet
+builtins/gen/var/arrayLength/cbd6b5.wgsl:26:10 error: using f16 types in 'storage' address space is not implemented yet
   arg_0: array<f16>,
          ^^^^^^^^^^
 
-gen/var/arrayLength/cbd6b5.wgsl:25:1 note: see layout of struct:
+builtins/gen/var/arrayLength/cbd6b5.wgsl:25:1 note: see layout of struct:
 /*           align(2) size(2) */ struct SB_RW {
 /* offset(0) align(2) size(2) */   arg_0 : array<f16>;
 /*                            */ };
 struct SB_RW {
 ^^^^^^
 
-gen/var/arrayLength/cbd6b5.wgsl:28:48 note: see declaration of variable
+builtins/gen/var/arrayLength/cbd6b5.wgsl:28:48 note: see declaration of variable
 @group(0) @binding(0) var<storage, read_write> sb_rw : SB_RW;
                                                ^^^^^
 
diff --git a/test/tint/builtins/gen/var/arrayLength/cbd6b5.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/arrayLength/cbd6b5.wgsl.expected.fxc.hlsl
index ec22a8b..f19d93a 100644
--- a/test/tint/builtins/gen/var/arrayLength/cbd6b5.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/arrayLength/cbd6b5.wgsl.expected.fxc.hlsl
@@ -1,17 +1,17 @@
 SKIP: FAILED
 
-gen/var/arrayLength/cbd6b5.wgsl:26:10 error: using f16 types in 'storage' address space is not implemented yet
+builtins/gen/var/arrayLength/cbd6b5.wgsl:26:10 error: using f16 types in 'storage' address space is not implemented yet
   arg_0: array<f16>,
          ^^^^^^^^^^
 
-gen/var/arrayLength/cbd6b5.wgsl:25:1 note: see layout of struct:
+builtins/gen/var/arrayLength/cbd6b5.wgsl:25:1 note: see layout of struct:
 /*           align(2) size(2) */ struct SB_RW {
 /* offset(0) align(2) size(2) */   arg_0 : array<f16>;
 /*                            */ };
 struct SB_RW {
 ^^^^^^
 
-gen/var/arrayLength/cbd6b5.wgsl:28:48 note: see declaration of variable
+builtins/gen/var/arrayLength/cbd6b5.wgsl:28:48 note: see declaration of variable
 @group(0) @binding(0) var<storage, read_write> sb_rw : SB_RW;
                                                ^^^^^
 
diff --git a/test/tint/builtins/gen/var/arrayLength/cbd6b5.wgsl.expected.msl b/test/tint/builtins/gen/var/arrayLength/cbd6b5.wgsl.expected.msl
index ec22a8b..f19d93a 100644
--- a/test/tint/builtins/gen/var/arrayLength/cbd6b5.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/arrayLength/cbd6b5.wgsl.expected.msl
@@ -1,17 +1,17 @@
 SKIP: FAILED
 
-gen/var/arrayLength/cbd6b5.wgsl:26:10 error: using f16 types in 'storage' address space is not implemented yet
+builtins/gen/var/arrayLength/cbd6b5.wgsl:26:10 error: using f16 types in 'storage' address space is not implemented yet
   arg_0: array<f16>,
          ^^^^^^^^^^
 
-gen/var/arrayLength/cbd6b5.wgsl:25:1 note: see layout of struct:
+builtins/gen/var/arrayLength/cbd6b5.wgsl:25:1 note: see layout of struct:
 /*           align(2) size(2) */ struct SB_RW {
 /* offset(0) align(2) size(2) */   arg_0 : array<f16>;
 /*                            */ };
 struct SB_RW {
 ^^^^^^
 
-gen/var/arrayLength/cbd6b5.wgsl:28:48 note: see declaration of variable
+builtins/gen/var/arrayLength/cbd6b5.wgsl:28:48 note: see declaration of variable
 @group(0) @binding(0) var<storage, read_write> sb_rw : SB_RW;
                                                ^^^^^
 
diff --git a/test/tint/builtins/gen/var/arrayLength/cbd6b5.wgsl.expected.spvasm b/test/tint/builtins/gen/var/arrayLength/cbd6b5.wgsl.expected.spvasm
index ec22a8b..f19d93a 100644
--- a/test/tint/builtins/gen/var/arrayLength/cbd6b5.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/arrayLength/cbd6b5.wgsl.expected.spvasm
@@ -1,17 +1,17 @@
 SKIP: FAILED
 
-gen/var/arrayLength/cbd6b5.wgsl:26:10 error: using f16 types in 'storage' address space is not implemented yet
+builtins/gen/var/arrayLength/cbd6b5.wgsl:26:10 error: using f16 types in 'storage' address space is not implemented yet
   arg_0: array<f16>,
          ^^^^^^^^^^
 
-gen/var/arrayLength/cbd6b5.wgsl:25:1 note: see layout of struct:
+builtins/gen/var/arrayLength/cbd6b5.wgsl:25:1 note: see layout of struct:
 /*           align(2) size(2) */ struct SB_RW {
 /* offset(0) align(2) size(2) */   arg_0 : array<f16>;
 /*                            */ };
 struct SB_RW {
 ^^^^^^
 
-gen/var/arrayLength/cbd6b5.wgsl:28:48 note: see declaration of variable
+builtins/gen/var/arrayLength/cbd6b5.wgsl:28:48 note: see declaration of variable
 @group(0) @binding(0) var<storage, read_write> sb_rw : SB_RW;
                                                ^^^^^
 
diff --git a/test/tint/builtins/gen/var/arrayLength/cbd6b5.wgsl.expected.wgsl b/test/tint/builtins/gen/var/arrayLength/cbd6b5.wgsl.expected.wgsl
index ec22a8b..f19d93a 100644
--- a/test/tint/builtins/gen/var/arrayLength/cbd6b5.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/arrayLength/cbd6b5.wgsl.expected.wgsl
@@ -1,17 +1,17 @@
 SKIP: FAILED
 
-gen/var/arrayLength/cbd6b5.wgsl:26:10 error: using f16 types in 'storage' address space is not implemented yet
+builtins/gen/var/arrayLength/cbd6b5.wgsl:26:10 error: using f16 types in 'storage' address space is not implemented yet
   arg_0: array<f16>,
          ^^^^^^^^^^
 
-gen/var/arrayLength/cbd6b5.wgsl:25:1 note: see layout of struct:
+builtins/gen/var/arrayLength/cbd6b5.wgsl:25:1 note: see layout of struct:
 /*           align(2) size(2) */ struct SB_RW {
 /* offset(0) align(2) size(2) */   arg_0 : array<f16>;
 /*                            */ };
 struct SB_RW {
 ^^^^^^
 
-gen/var/arrayLength/cbd6b5.wgsl:28:48 note: see declaration of variable
+builtins/gen/var/arrayLength/cbd6b5.wgsl:28:48 note: see declaration of variable
 @group(0) @binding(0) var<storage, read_write> sb_rw : SB_RW;
                                                ^^^^^
 
diff --git a/test/tint/builtins/gen/var/asin/11dfda.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/asin/11dfda.wgsl.expected.fxc.hlsl
index 806254c..20abaf0 100644
--- a/test/tint/builtins/gen/var/asin/11dfda.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/asin/11dfda.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
   asin_11dfda();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001D54DD58900(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001D54DD58900(2,13-17): error X3000: unrecognized identifier 'arg_0'
-
diff --git a/test/tint/builtins/gen/var/asin/2d8e29.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/asin/2d8e29.wgsl.expected.fxc.hlsl
index c95a38d..0c2024e 100644
--- a/test/tint/builtins/gen/var/asin/2d8e29.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/asin/2d8e29.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
   asin_2d8e29();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000243E5218C90(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000243E5218C90(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/asin/3cfbd4.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/asin/3cfbd4.wgsl.expected.fxc.hlsl
index 16015bb..746cafe 100644
--- a/test/tint/builtins/gen/var/asin/3cfbd4.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/asin/3cfbd4.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
   asin_3cfbd4();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000019720581EE0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000019720581EE0(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/asin/b4aced.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/asin/b4aced.wgsl.expected.fxc.hlsl
index 729a746..fabbdb2 100644
--- a/test/tint/builtins/gen/var/asin/b4aced.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/asin/b4aced.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
   asin_b4aced();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000274BBD1CA00(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000274BBD1CA00(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/asinh/468a48.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/asinh/468a48.wgsl.expected.fxc.hlsl
index dcbf450..d8d7a07 100644
--- a/test/tint/builtins/gen/var/asinh/468a48.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/asinh/468a48.wgsl.expected.fxc.hlsl
@@ -35,6 +35,3 @@
   asinh_468a48();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002776ED11E20(1,1-9): error X3000: unrecognized identifier 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/asinh/95ab2b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/asinh/95ab2b.wgsl.expected.fxc.hlsl
index 60b07b0..21e7f11 100644
--- a/test/tint/builtins/gen/var/asinh/95ab2b.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/asinh/95ab2b.wgsl.expected.fxc.hlsl
@@ -35,6 +35,3 @@
   asinh_95ab2b();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002E3B2D56BD0(1,8-16): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/asinh/ad8f8b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/asinh/ad8f8b.wgsl.expected.fxc.hlsl
index 2bec5b5..1312d34 100644
--- a/test/tint/builtins/gen/var/asinh/ad8f8b.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/asinh/ad8f8b.wgsl.expected.fxc.hlsl
@@ -35,6 +35,3 @@
   asinh_ad8f8b();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001C8AF6F1580(1,8-16): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/asinh/fb5e8c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/asinh/fb5e8c.wgsl.expected.fxc.hlsl
index 75a4736..28c45da 100644
--- a/test/tint/builtins/gen/var/asinh/fb5e8c.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/asinh/fb5e8c.wgsl.expected.fxc.hlsl
@@ -35,6 +35,3 @@
   asinh_fb5e8c();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001B966509E00(1,8-16): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/atan/19faea.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/atan/19faea.wgsl.expected.fxc.hlsl
index 04ac231..ba6935d 100644
--- a/test/tint/builtins/gen/var/atan/19faea.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/atan/19faea.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
   atan_19faea();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001F5B44507F0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001F5B44507F0(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/atan/1e1764.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/atan/1e1764.wgsl.expected.fxc.hlsl
index b1775ff..4000184 100644
--- a/test/tint/builtins/gen/var/atan/1e1764.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/atan/1e1764.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
   atan_1e1764();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000015CC8119100(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000015CC8119100(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/atan/a5f421.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/atan/a5f421.wgsl.expected.fxc.hlsl
index 7eeb502..cb19bf0 100644
--- a/test/tint/builtins/gen/var/atan/a5f421.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/atan/a5f421.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
   atan_a5f421();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001E218212B50(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001E218212B50(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/atan/a7ba61.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/atan/a7ba61.wgsl.expected.fxc.hlsl
index 1fae88d..c6c5603 100644
--- a/test/tint/builtins/gen/var/atan/a7ba61.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/atan/a7ba61.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
   atan_a7ba61();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000193197C2E20(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000193197C2E20(2,13-17): error X3000: unrecognized identifier 'arg_0'
-
diff --git a/test/tint/builtins/gen/var/atan2/21dfea.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/atan2/21dfea.wgsl.expected.fxc.hlsl
index 7952947..3cd3e43 100644
--- a/test/tint/builtins/gen/var/atan2/21dfea.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/atan2/21dfea.wgsl.expected.fxc.hlsl
@@ -32,8 +32,3 @@
   atan2_21dfea();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000155102818A0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000155102818A0(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000155102818A0(4,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/atan2/93febc.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/atan2/93febc.wgsl.expected.fxc.hlsl
index cdf1948..0c18f34 100644
--- a/test/tint/builtins/gen/var/atan2/93febc.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/atan2/93febc.wgsl.expected.fxc.hlsl
@@ -32,8 +32,3 @@
   atan2_93febc();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001B1F88A7150(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001B1F88A7150(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001B1F88A7150(4,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/atan2/ca698e.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/atan2/ca698e.wgsl.expected.fxc.hlsl
index 044e1b8..0cba786 100644
--- a/test/tint/builtins/gen/var/atan2/ca698e.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/atan2/ca698e.wgsl.expected.fxc.hlsl
@@ -32,7 +32,3 @@
   atan2_ca698e();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000284FEEEF860(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000284FEEEF860(2,13-17): error X3000: unrecognized identifier 'arg_0'
-
diff --git a/test/tint/builtins/gen/var/atan2/d983ab.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/atan2/d983ab.wgsl.expected.fxc.hlsl
index 926647d..2213c7c 100644
--- a/test/tint/builtins/gen/var/atan2/d983ab.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/atan2/d983ab.wgsl.expected.fxc.hlsl
@@ -32,8 +32,3 @@
   atan2_d983ab();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000023A1AB1D2D0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000023A1AB1D2D0(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000023A1AB1D2D0(4,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/atanh/5bf88d.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/atanh/5bf88d.wgsl.expected.fxc.hlsl
index c08dcf6..b4b103d 100644
--- a/test/tint/builtins/gen/var/atanh/5bf88d.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/atanh/5bf88d.wgsl.expected.fxc.hlsl
@@ -35,6 +35,3 @@
   atanh_5bf88d();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000223A4C149E0(1,8-16): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/atanh/d2d8cd.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/atanh/d2d8cd.wgsl.expected.fxc.hlsl
index b725226..e79deef 100644
--- a/test/tint/builtins/gen/var/atanh/d2d8cd.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/atanh/d2d8cd.wgsl.expected.fxc.hlsl
@@ -35,6 +35,3 @@
   atanh_d2d8cd();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000275850EA270(1,1-9): error X3000: unrecognized identifier 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/atanh/e3b450.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/atanh/e3b450.wgsl.expected.fxc.hlsl
index a96d584..e1d03df 100644
--- a/test/tint/builtins/gen/var/atanh/e3b450.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/atanh/e3b450.wgsl.expected.fxc.hlsl
@@ -35,6 +35,3 @@
   atanh_e3b450();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001C82047E7C0(1,8-16): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/atanh/ec4b06.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/atanh/ec4b06.wgsl.expected.fxc.hlsl
index c96a0ee..ddda081 100644
--- a/test/tint/builtins/gen/var/atanh/ec4b06.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/atanh/ec4b06.wgsl.expected.fxc.hlsl
@@ -35,6 +35,3 @@
   atanh_ec4b06();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002AC957584B0(1,8-16): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/ceil/09bf52.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/ceil/09bf52.wgsl.expected.fxc.hlsl
index 75dab64..3102431 100644
--- a/test/tint/builtins/gen/var/ceil/09bf52.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/ceil/09bf52.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
   ceil_09bf52();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001A987B49660(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001A987B49660(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/ceil/18c240.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/ceil/18c240.wgsl.expected.fxc.hlsl
index c34ea03..87fd945 100644
--- a/test/tint/builtins/gen/var/ceil/18c240.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/ceil/18c240.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
   ceil_18c240();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001F7F15A6FA0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001F7F15A6FA0(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/ceil/4bca2a.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/ceil/4bca2a.wgsl.expected.fxc.hlsl
index c01139b..3761d12 100644
--- a/test/tint/builtins/gen/var/ceil/4bca2a.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/ceil/4bca2a.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
   ceil_4bca2a();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000024CF8246830(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000024CF8246830(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/ceil/f3f889.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/ceil/f3f889.wgsl.expected.fxc.hlsl
index ecdbf03..9285041 100644
--- a/test/tint/builtins/gen/var/ceil/f3f889.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/ceil/f3f889.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
   ceil_f3f889();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002391D5D1160(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002391D5D1160(2,13-17): error X3000: unrecognized identifier 'arg_0'
-
diff --git a/test/tint/builtins/gen/var/clamp/235b29.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/clamp/235b29.wgsl.expected.fxc.hlsl
index 1169ce4..ef2952b 100644
--- a/test/tint/builtins/gen/var/clamp/235b29.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/clamp/235b29.wgsl.expected.fxc.hlsl
@@ -33,9 +33,3 @@
   clamp_235b29();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000024CD8072900(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000024CD8072900(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000024CD8072900(4,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000024CD8072900(5,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/clamp/2c251b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/clamp/2c251b.wgsl.expected.fxc.hlsl
index 946d07a..21a3aec 100644
--- a/test/tint/builtins/gen/var/clamp/2c251b.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/clamp/2c251b.wgsl.expected.fxc.hlsl
@@ -33,9 +33,3 @@
   clamp_2c251b();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001D56C1F9DE0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001D56C1F9DE0(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001D56C1F9DE0(4,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001D56C1F9DE0(5,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/clamp/553ffb.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/clamp/553ffb.wgsl.expected.fxc.hlsl
index 6c663b8..85b3969 100644
--- a/test/tint/builtins/gen/var/clamp/553ffb.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/clamp/553ffb.wgsl.expected.fxc.hlsl
@@ -33,7 +33,3 @@
   clamp_553ffb();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000022BE4491540(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000022BE4491540(2,13-17): error X3000: unrecognized identifier 'arg_0'
-
diff --git a/test/tint/builtins/gen/var/clamp/b195eb.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/clamp/b195eb.wgsl.expected.fxc.hlsl
index 87a16e6..fd0e57e 100644
--- a/test/tint/builtins/gen/var/clamp/b195eb.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/clamp/b195eb.wgsl.expected.fxc.hlsl
@@ -33,9 +33,3 @@
   clamp_b195eb();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002017A6F3930(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002017A6F3930(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002017A6F3930(4,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002017A6F3930(5,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/cos/0835a8.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/cos/0835a8.wgsl.expected.fxc.hlsl
index 6a8d875..06f97cd 100644
--- a/test/tint/builtins/gen/var/cos/0835a8.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/cos/0835a8.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
   cos_0835a8();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000026FB6F714B0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000026FB6F714B0(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/cos/0a89f7.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/cos/0a89f7.wgsl.expected.fxc.hlsl
index 01410b8..92c2a80 100644
--- a/test/tint/builtins/gen/var/cos/0a89f7.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/cos/0a89f7.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
   cos_0a89f7();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000012D2C4B1DB0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000012D2C4B1DB0(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/cos/5bc2c6.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/cos/5bc2c6.wgsl.expected.fxc.hlsl
index 856b91f..c1e3823 100644
--- a/test/tint/builtins/gen/var/cos/5bc2c6.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/cos/5bc2c6.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
   cos_5bc2c6();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000021A2289CA00(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000021A2289CA00(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/cos/fc047d.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/cos/fc047d.wgsl.expected.fxc.hlsl
index fb57ccb..9381bca 100644
--- a/test/tint/builtins/gen/var/cos/fc047d.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/cos/fc047d.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
   cos_fc047d();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000023368939570(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000023368939570(2,13-17): error X3000: unrecognized identifier 'arg_0'
-
diff --git a/test/tint/builtins/gen/var/cosh/2ed778.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/cosh/2ed778.wgsl.expected.fxc.hlsl
index daec563..02541f9 100644
--- a/test/tint/builtins/gen/var/cosh/2ed778.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/cosh/2ed778.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
   cosh_2ed778();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000025119222EB0(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000025119222EB0(2,13-17): error X3000: unrecognized identifier 'arg_0'
-
diff --git a/test/tint/builtins/gen/var/cosh/3b7bbf.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/cosh/3b7bbf.wgsl.expected.fxc.hlsl
index 5838354..ed7b63b 100644
--- a/test/tint/builtins/gen/var/cosh/3b7bbf.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/cosh/3b7bbf.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
   cosh_3b7bbf();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000023E2A2C07F0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000023E2A2C07F0(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/cosh/43b672.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/cosh/43b672.wgsl.expected.fxc.hlsl
index a35fa62..4237902 100644
--- a/test/tint/builtins/gen/var/cosh/43b672.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/cosh/43b672.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
   cosh_43b672();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000244BAA52310(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000244BAA52310(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/cosh/b1b8a0.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/cosh/b1b8a0.wgsl.expected.fxc.hlsl
index 86a786d..0a013b6 100644
--- a/test/tint/builtins/gen/var/cosh/b1b8a0.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/cosh/b1b8a0.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
   cosh_b1b8a0();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000018FD1882B50(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000018FD1882B50(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/cross/9857cb.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/cross/9857cb.wgsl.expected.fxc.hlsl
index 9c32ca7..296baa1 100644
--- a/test/tint/builtins/gen/var/cross/9857cb.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/cross/9857cb.wgsl.expected.fxc.hlsl
@@ -32,8 +32,3 @@
   cross_9857cb();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000018E1A1D1BC0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000018E1A1D1BC0(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000018E1A1D1BC0(4,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/degrees/3055d3.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/degrees/3055d3.wgsl.expected.fxc.hlsl
index dc4b54a..2fc1013 100644
--- a/test/tint/builtins/gen/var/degrees/3055d3.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/degrees/3055d3.wgsl.expected.fxc.hlsl
@@ -35,6 +35,3 @@
   degrees_3055d3();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000151C0FBF8C0(1,8-16): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/degrees/5e9805.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/degrees/5e9805.wgsl.expected.fxc.hlsl
index 32b3d34..4d2d201 100644
--- a/test/tint/builtins/gen/var/degrees/5e9805.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/degrees/5e9805.wgsl.expected.fxc.hlsl
@@ -35,6 +35,3 @@
   degrees_5e9805();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000020047AF8DA0(1,1-9): error X3000: unrecognized identifier 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/degrees/dfe8f4.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/degrees/dfe8f4.wgsl.expected.fxc.hlsl
index 5066e38..71e7b58 100644
--- a/test/tint/builtins/gen/var/degrees/dfe8f4.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/degrees/dfe8f4.wgsl.expected.fxc.hlsl
@@ -35,6 +35,3 @@
   degrees_dfe8f4();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000192E8B81620(1,8-16): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/degrees/f59715.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/degrees/f59715.wgsl.expected.fxc.hlsl
index b378860..cee3765 100644
--- a/test/tint/builtins/gen/var/degrees/f59715.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/degrees/f59715.wgsl.expected.fxc.hlsl
@@ -35,6 +35,3 @@
   degrees_f59715();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000022454CA0150(1,8-16): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/determinant/32bfde.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/determinant/32bfde.wgsl.expected.fxc.hlsl
index 3db7954..6488184 100644
--- a/test/tint/builtins/gen/var/determinant/32bfde.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/determinant/32bfde.wgsl.expected.fxc.hlsl
@@ -31,8 +31,3 @@
   determinant_32bfde();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000022F54326C80(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000022F54326C80(3,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000022F54326C80(3,13-15): error X3000: unrecognized identifier 'res'
-
diff --git a/test/tint/builtins/gen/var/determinant/d7c86f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/determinant/d7c86f.wgsl.expected.fxc.hlsl
index d769802..08dfa53 100644
--- a/test/tint/builtins/gen/var/determinant/d7c86f.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/determinant/d7c86f.wgsl.expected.fxc.hlsl
@@ -31,8 +31,3 @@
   determinant_d7c86f();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001C5F7AE5180(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001C5F7AE5180(3,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001C5F7AE5180(3,13-15): error X3000: unrecognized identifier 'res'
-
diff --git a/test/tint/builtins/gen/var/determinant/fc12a5.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/determinant/fc12a5.wgsl.expected.fxc.hlsl
index a06af79..e3bcce0 100644
--- a/test/tint/builtins/gen/var/determinant/fc12a5.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/determinant/fc12a5.wgsl.expected.fxc.hlsl
@@ -31,8 +31,3 @@
   determinant_fc12a5();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000022674B2E9D0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000022674B2E9D0(3,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000022674B2E9D0(3,13-15): error X3000: unrecognized identifier 'res'
-
diff --git a/test/tint/builtins/gen/var/distance/7272f3.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/distance/7272f3.wgsl.expected.fxc.hlsl
index 019f6af..0804174 100644
--- a/test/tint/builtins/gen/var/distance/7272f3.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/distance/7272f3.wgsl.expected.fxc.hlsl
@@ -32,9 +32,3 @@
   distance_7272f3();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001EADAF82D50(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001EADAF82D50(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001EADAF82D50(4,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001EADAF82D50(4,13-15): error X3000: unrecognized identifier 'res'
-
diff --git a/test/tint/builtins/gen/var/distance/7d201f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/distance/7d201f.wgsl.expected.fxc.hlsl
index 42c0407..4377906 100644
--- a/test/tint/builtins/gen/var/distance/7d201f.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/distance/7d201f.wgsl.expected.fxc.hlsl
@@ -32,7 +32,3 @@
   distance_7d201f();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000020A788F9640(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000020A788F9640(2,13-17): error X3000: unrecognized identifier 'arg_0'
-
diff --git a/test/tint/builtins/gen/var/distance/892a5d.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/distance/892a5d.wgsl.expected.fxc.hlsl
index e6d94bf..b093422 100644
--- a/test/tint/builtins/gen/var/distance/892a5d.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/distance/892a5d.wgsl.expected.fxc.hlsl
@@ -32,9 +32,3 @@
   distance_892a5d();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001FA47782B40(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001FA47782B40(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001FA47782B40(4,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001FA47782B40(4,13-15): error X3000: unrecognized identifier 'res'
-
diff --git a/test/tint/builtins/gen/var/distance/928fa0.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/distance/928fa0.wgsl.expected.fxc.hlsl
index 354f95e..b3c81f0 100644
--- a/test/tint/builtins/gen/var/distance/928fa0.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/distance/928fa0.wgsl.expected.fxc.hlsl
@@ -32,9 +32,3 @@
   distance_928fa0();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000277E5AD2CF0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000277E5AD2CF0(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000277E5AD2CF0(4,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000277E5AD2CF0(4,13-15): error X3000: unrecognized identifier 'res'
-
diff --git a/test/tint/builtins/gen/var/dot/8e40f1.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/dot/8e40f1.wgsl.expected.fxc.hlsl
index ad26057..a32263f 100644
--- a/test/tint/builtins/gen/var/dot/8e40f1.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/dot/8e40f1.wgsl.expected.fxc.hlsl
@@ -32,9 +32,3 @@
   dot_8e40f1();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000018A9A333310(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000018A9A333310(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000018A9A333310(4,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000018A9A333310(4,13-15): error X3000: unrecognized identifier 'res'
-
diff --git a/test/tint/builtins/gen/var/dot/cd5a04.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/dot/cd5a04.wgsl.expected.fxc.hlsl
index 2a3cca8..83129f5 100644
--- a/test/tint/builtins/gen/var/dot/cd5a04.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/dot/cd5a04.wgsl.expected.fxc.hlsl
@@ -32,9 +32,3 @@
   dot_cd5a04();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000020151407920(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000020151407920(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000020151407920(4,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000020151407920(4,13-15): error X3000: unrecognized identifier 'res'
-
diff --git a/test/tint/builtins/gen/var/dot/d0d179.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/dot/d0d179.wgsl.expected.fxc.hlsl
index 67a0bee..f193fc7 100644
--- a/test/tint/builtins/gen/var/dot/d0d179.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/dot/d0d179.wgsl.expected.fxc.hlsl
@@ -32,9 +32,3 @@
   dot_d0d179();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000019F987BD460(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000019F987BD460(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000019F987BD460(4,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000019F987BD460(4,13-15): error X3000: unrecognized identifier 'res'
-
diff --git a/test/tint/builtins/gen/var/dot4I8Packed/881e62.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/dot4I8Packed/881e62.wgsl.expected.fxc.hlsl
index 733f9e5..b5bc698 100644
--- a/test/tint/builtins/gen/var/dot4I8Packed/881e62.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/dot4I8Packed/881e62.wgsl.expected.fxc.hlsl
@@ -37,6 +37,3 @@
   dot4I8Packed_881e62();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001A416C12830(3,10-56): error X3004: undeclared identifier 'dot4add_i8packed'
-
diff --git a/test/tint/builtins/gen/var/dot4I8Packed/881e62.wgsl.expected.msl b/test/tint/builtins/gen/var/dot4I8Packed/881e62.wgsl.expected.msl
index 2189322..78cb718 100644
--- a/test/tint/builtins/gen/var/dot4I8Packed/881e62.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/dot4I8Packed/881e62.wgsl.expected.msl
@@ -25,4 +25,7 @@
   dot4I8Packed_881e62();
 }
 
-Failed to generate: error: Unknown import method: dot4I8Packed
+Failed to generate: builtins/gen/var/dot4I8Packed/881e62.wgsl:24:8 error: MSL backend does not support extension 'chromium_experimental_dp4a'
+enable chromium_experimental_dp4a;
+       ^^^^^^^^^^^^^^^^^^^^^^^^^^
+
diff --git a/test/tint/builtins/gen/var/dot4U8Packed/fbed7b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/dot4U8Packed/fbed7b.wgsl.expected.fxc.hlsl
index fef2404..fb71ba6 100644
--- a/test/tint/builtins/gen/var/dot4U8Packed/fbed7b.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/dot4U8Packed/fbed7b.wgsl.expected.fxc.hlsl
@@ -37,6 +37,3 @@
   dot4U8Packed_fbed7b();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000191724B1570(3,10-56): error X3004: undeclared identifier 'dot4add_u8packed'
-
diff --git a/test/tint/builtins/gen/var/dot4U8Packed/fbed7b.wgsl.expected.msl b/test/tint/builtins/gen/var/dot4U8Packed/fbed7b.wgsl.expected.msl
index 4ca1d46..be47b5c 100644
--- a/test/tint/builtins/gen/var/dot4U8Packed/fbed7b.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/dot4U8Packed/fbed7b.wgsl.expected.msl
@@ -25,4 +25,7 @@
   dot4U8Packed_fbed7b();
 }
 
-Failed to generate: error: Unknown import method: dot4U8Packed
+Failed to generate: builtins/gen/var/dot4U8Packed/fbed7b.wgsl:24:8 error: MSL backend does not support extension 'chromium_experimental_dp4a'
+enable chromium_experimental_dp4a;
+       ^^^^^^^^^^^^^^^^^^^^^^^^^^
+
diff --git a/test/tint/builtins/gen/var/exp/13806d.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/exp/13806d.wgsl.expected.fxc.hlsl
index ebcc65f..0c64a84 100644
--- a/test/tint/builtins/gen/var/exp/13806d.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/exp/13806d.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
   exp_13806d();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002270EAE6F40(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002270EAE6F40(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/exp/2e08e2.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/exp/2e08e2.wgsl.expected.fxc.hlsl
index 0f2359d..4a68530 100644
--- a/test/tint/builtins/gen/var/exp/2e08e2.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/exp/2e08e2.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
   exp_2e08e2();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000256E60D6F90(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000256E60D6F90(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/exp/611a87.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/exp/611a87.wgsl.expected.fxc.hlsl
index 30ab783..9caffbf 100644
--- a/test/tint/builtins/gen/var/exp/611a87.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/exp/611a87.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
   exp_611a87();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002855D95D650(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002855D95D650(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/exp/c18fe9.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/exp/c18fe9.wgsl.expected.fxc.hlsl
index ad6ebca..1b4b45a 100644
--- a/test/tint/builtins/gen/var/exp/c18fe9.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/exp/c18fe9.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
   exp_c18fe9();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002AE86501340(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002AE86501340(2,13-17): error X3000: unrecognized identifier 'arg_0'
-
diff --git a/test/tint/builtins/gen/var/exp2/151a4c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/exp2/151a4c.wgsl.expected.fxc.hlsl
index aaf1ee1..4736202 100644
--- a/test/tint/builtins/gen/var/exp2/151a4c.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/exp2/151a4c.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
   exp2_151a4c();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000027F32148910(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000027F32148910(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/exp2/751377.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/exp2/751377.wgsl.expected.fxc.hlsl
index 3284d6f..43e987d 100644
--- a/test/tint/builtins/gen/var/exp2/751377.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/exp2/751377.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
   exp2_751377();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000028B810B9560(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000028B810B9560(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/exp2/b408e4.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/exp2/b408e4.wgsl.expected.fxc.hlsl
index dad6555..2cd60f8 100644
--- a/test/tint/builtins/gen/var/exp2/b408e4.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/exp2/b408e4.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
   exp2_b408e4();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001CEFA5170D0(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001CEFA5170D0(2,13-17): error X3000: unrecognized identifier 'arg_0'
-
diff --git a/test/tint/builtins/gen/var/exp2/ffa827.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/exp2/ffa827.wgsl.expected.fxc.hlsl
index 87e544c..bd4753b 100644
--- a/test/tint/builtins/gen/var/exp2/ffa827.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/exp2/ffa827.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
   exp2_ffa827();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001E8001E07F0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001E8001E07F0(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/faceForward/524986.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/faceForward/524986.wgsl.expected.fxc.hlsl
index 13e64eb..a31db9b 100644
--- a/test/tint/builtins/gen/var/faceForward/524986.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/faceForward/524986.wgsl.expected.fxc.hlsl
@@ -33,9 +33,3 @@
   faceForward_524986();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000295C6562990(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000295C6562990(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000295C6562990(4,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000295C6562990(5,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/faceForward/cc63dc.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/faceForward/cc63dc.wgsl.expected.fxc.hlsl
index a1942e93..69747ce 100644
--- a/test/tint/builtins/gen/var/faceForward/cc63dc.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/faceForward/cc63dc.wgsl.expected.fxc.hlsl
@@ -33,9 +33,3 @@
   faceForward_cc63dc();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002186E2D0B70(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002186E2D0B70(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002186E2D0B70(4,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002186E2D0B70(5,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/faceForward/fb0f2e.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/faceForward/fb0f2e.wgsl.expected.fxc.hlsl
index 68f1d02..8f3d052 100644
--- a/test/tint/builtins/gen/var/faceForward/fb0f2e.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/faceForward/fb0f2e.wgsl.expected.fxc.hlsl
@@ -33,9 +33,3 @@
   faceForward_fb0f2e();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002526D7A2430(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002526D7A2430(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002526D7A2430(4,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002526D7A2430(5,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/floor/3802c0.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/floor/3802c0.wgsl.expected.fxc.hlsl
index e347826..d326422 100644
--- a/test/tint/builtins/gen/var/floor/3802c0.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/floor/3802c0.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
   floor_3802c0();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002CFD3102AA0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002CFD3102AA0(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/floor/84658c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/floor/84658c.wgsl.expected.fxc.hlsl
index 04bf97a..0bf7dca 100644
--- a/test/tint/builtins/gen/var/floor/84658c.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/floor/84658c.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
   floor_84658c();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000208743D86D0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000208743D86D0(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/floor/a2d31b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/floor/a2d31b.wgsl.expected.fxc.hlsl
index b670bde..6b49520 100644
--- a/test/tint/builtins/gen/var/floor/a2d31b.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/floor/a2d31b.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
   floor_a2d31b();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000020277229EB0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000020277229EB0(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/floor/b6e09c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/floor/b6e09c.wgsl.expected.fxc.hlsl
index 04d8270..622c043 100644
--- a/test/tint/builtins/gen/var/floor/b6e09c.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/floor/b6e09c.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
   floor_b6e09c();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001FC8E37C9F0(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001FC8E37C9F0(2,13-17): error X3000: unrecognized identifier 'arg_0'
-
diff --git a/test/tint/builtins/gen/var/fma/ab7818.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/fma/ab7818.wgsl.expected.fxc.hlsl
index 4cc79d7..acfcf1a 100644
--- a/test/tint/builtins/gen/var/fma/ab7818.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/fma/ab7818.wgsl.expected.fxc.hlsl
@@ -33,9 +33,3 @@
   fma_ab7818();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001C8EC063920(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001C8EC063920(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001C8EC063920(4,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001C8EC063920(5,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/fma/bf21b6.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/fma/bf21b6.wgsl.expected.fxc.hlsl
index c30ed3a..84e6b2a 100644
--- a/test/tint/builtins/gen/var/fma/bf21b6.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/fma/bf21b6.wgsl.expected.fxc.hlsl
@@ -33,9 +33,3 @@
   fma_bf21b6();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000213565C3920(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000213565C3920(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000213565C3920(4,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000213565C3920(5,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/fma/c8abb3.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/fma/c8abb3.wgsl.expected.fxc.hlsl
index 0085a06..d030535 100644
--- a/test/tint/builtins/gen/var/fma/c8abb3.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/fma/c8abb3.wgsl.expected.fxc.hlsl
@@ -33,7 +33,3 @@
   fma_c8abb3();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001545EC319C0(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001545EC319C0(2,13-17): error X3000: unrecognized identifier 'arg_0'
-
diff --git a/test/tint/builtins/gen/var/fma/e7abdc.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/fma/e7abdc.wgsl.expected.fxc.hlsl
index 0866b5c..64f994a 100644
--- a/test/tint/builtins/gen/var/fma/e7abdc.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/fma/e7abdc.wgsl.expected.fxc.hlsl
@@ -33,9 +33,3 @@
   fma_e7abdc();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001D742133930(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001D742133930(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001D742133930(4,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001D742133930(5,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/fract/181aa9.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/fract/181aa9.wgsl.expected.fxc.hlsl
index 87fc1a1..0c48407 100644
--- a/test/tint/builtins/gen/var/fract/181aa9.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/fract/181aa9.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
   fract_181aa9();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000290A4231990(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000290A4231990(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/fract/498c77.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/fract/498c77.wgsl.expected.fxc.hlsl
index bf6c7ae..56d1880 100644
--- a/test/tint/builtins/gen/var/fract/498c77.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/fract/498c77.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
   fract_498c77();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001F8576786D0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001F8576786D0(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/fract/958a1d.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/fract/958a1d.wgsl.expected.fxc.hlsl
index 6771ca7..4b65f46 100644
--- a/test/tint/builtins/gen/var/fract/958a1d.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/fract/958a1d.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
   fract_958a1d();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002450F006F40(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002450F006F40(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/fract/eb38ce.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/fract/eb38ce.wgsl.expected.fxc.hlsl
index c481b82..e8e9fa1 100644
--- a/test/tint/builtins/gen/var/fract/eb38ce.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/fract/eb38ce.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
   fract_eb38ce();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000024B27352E20(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000024B27352E20(2,13-17): error X3000: unrecognized identifier 'arg_0'
-
diff --git a/test/tint/builtins/gen/var/frexp/3dd21e.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/frexp/3dd21e.wgsl.expected.fxc.hlsl
index c514368..507defa 100644
--- a/test/tint/builtins/gen/var/frexp/3dd21e.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/frexp/3dd21e.wgsl.expected.fxc.hlsl
@@ -42,6 +42,3 @@
   frexp_3dd21e();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002B0820A2F50(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/frexp/5257dd.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/frexp/5257dd.wgsl.expected.fxc.hlsl
index e4e360f..765ece2 100644
--- a/test/tint/builtins/gen/var/frexp/5257dd.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/frexp/5257dd.wgsl.expected.fxc.hlsl
@@ -42,6 +42,3 @@
   frexp_5257dd();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000029E12ED17D0(2,3-11): error X3000: unrecognized identifier 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/frexp/5f47bf.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/frexp/5f47bf.wgsl.expected.fxc.hlsl
index 82d183a..5b4c0ab 100644
--- a/test/tint/builtins/gen/var/frexp/5f47bf.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/frexp/5f47bf.wgsl.expected.fxc.hlsl
@@ -42,6 +42,3 @@
   frexp_5f47bf();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002974137DC80(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/frexp/ae4a66.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/frexp/ae4a66.wgsl.expected.fxc.hlsl
index 31c17af..862b97d 100644
--- a/test/tint/builtins/gen/var/frexp/ae4a66.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/frexp/ae4a66.wgsl.expected.fxc.hlsl
@@ -42,6 +42,3 @@
   frexp_ae4a66();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000024B22CBDA70(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/inverseSqrt/440300.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/inverseSqrt/440300.wgsl.expected.fxc.hlsl
index 68da594..6353e2e 100644
--- a/test/tint/builtins/gen/var/inverseSqrt/440300.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/inverseSqrt/440300.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
   inverseSqrt_440300();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000020CC4502790(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000020CC4502790(2,13-17): error X3000: unrecognized identifier 'arg_0'
-
diff --git a/test/tint/builtins/gen/var/inverseSqrt/5f51f8.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/inverseSqrt/5f51f8.wgsl.expected.fxc.hlsl
index 13b4979..2f8cf5c 100644
--- a/test/tint/builtins/gen/var/inverseSqrt/5f51f8.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/inverseSqrt/5f51f8.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
   inverseSqrt_5f51f8();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002676056B340(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002676056B340(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/inverseSqrt/b85ebd.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/inverseSqrt/b85ebd.wgsl.expected.fxc.hlsl
index 4fd1981..2531da9 100644
--- a/test/tint/builtins/gen/var/inverseSqrt/b85ebd.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/inverseSqrt/b85ebd.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
   inverseSqrt_b85ebd();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000214452BD540(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000214452BD540(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/inverseSqrt/cbdc70.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/inverseSqrt/cbdc70.wgsl.expected.fxc.hlsl
index 5079fc1..681772a 100644
--- a/test/tint/builtins/gen/var/inverseSqrt/cbdc70.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/inverseSqrt/cbdc70.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
   inverseSqrt_cbdc70();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000024C10401C30(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000024C10401C30(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/ldexp/3d90b4.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/ldexp/3d90b4.wgsl.expected.fxc.hlsl
index e19db38..9ae2336 100644
--- a/test/tint/builtins/gen/var/ldexp/3d90b4.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/ldexp/3d90b4.wgsl.expected.fxc.hlsl
@@ -32,7 +32,3 @@
   ldexp_3d90b4();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000297E2767C20(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000297E2767C20(4,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/ldexp/624e0c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/ldexp/624e0c.wgsl.expected.fxc.hlsl
index 77d2859..3a434be 100644
--- a/test/tint/builtins/gen/var/ldexp/624e0c.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/ldexp/624e0c.wgsl.expected.fxc.hlsl
@@ -32,7 +32,3 @@
   ldexp_624e0c();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001C8D38A1580(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001C8D38A1580(2,13-17): error X3000: unrecognized identifier 'arg_0'
-
diff --git a/test/tint/builtins/gen/var/ldexp/7485ce.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/ldexp/7485ce.wgsl.expected.fxc.hlsl
index fa06333..9f483e1 100644
--- a/test/tint/builtins/gen/var/ldexp/7485ce.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/ldexp/7485ce.wgsl.expected.fxc.hlsl
@@ -32,7 +32,3 @@
   ldexp_7485ce();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001553C486F80(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001553C486F80(4,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/ldexp/7fa13c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/ldexp/7fa13c.wgsl.expected.fxc.hlsl
index 07506fc..2b90260 100644
--- a/test/tint/builtins/gen/var/ldexp/7fa13c.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/ldexp/7fa13c.wgsl.expected.fxc.hlsl
@@ -32,7 +32,3 @@
   ldexp_7fa13c();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000020AEA25D620(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000020AEA25D620(4,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/length/3f0e13.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/length/3f0e13.wgsl.expected.fxc.hlsl
index 01eb851..3c23526 100644
--- a/test/tint/builtins/gen/var/length/3f0e13.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/length/3f0e13.wgsl.expected.fxc.hlsl
@@ -31,8 +31,3 @@
   length_3f0e13();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000020BA93CCC20(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000020BA93CCC20(3,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000020BA93CCC20(3,13-15): error X3000: unrecognized identifier 'res'
-
diff --git a/test/tint/builtins/gen/var/length/5b1a9b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/length/5b1a9b.wgsl.expected.fxc.hlsl
index 4ea492e..b5542b5 100644
--- a/test/tint/builtins/gen/var/length/5b1a9b.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/length/5b1a9b.wgsl.expected.fxc.hlsl
@@ -31,8 +31,3 @@
   length_5b1a9b();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001EF153A9D90(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001EF153A9D90(3,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001EF153A9D90(3,13-15): error X3000: unrecognized identifier 'res'
-
diff --git a/test/tint/builtins/gen/var/length/ba16d6.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/length/ba16d6.wgsl.expected.fxc.hlsl
index 1629874..422bf1d 100644
--- a/test/tint/builtins/gen/var/length/ba16d6.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/length/ba16d6.wgsl.expected.fxc.hlsl
@@ -31,8 +31,3 @@
   length_ba16d6();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002644DC827C0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002644DC827C0(3,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002644DC827C0(3,13-15): error X3000: unrecognized identifier 'res'
-
diff --git a/test/tint/builtins/gen/var/length/c158da.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/length/c158da.wgsl.expected.fxc.hlsl
index ff57d0b..51ff282 100644
--- a/test/tint/builtins/gen/var/length/c158da.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/length/c158da.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
   length_c158da();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000229284770C0(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000229284770C0(2,13-17): error X3000: unrecognized identifier 'arg_0'
-
diff --git a/test/tint/builtins/gen/var/log/6ff86f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/log/6ff86f.wgsl.expected.fxc.hlsl
index 0ea573c..f6fed76 100644
--- a/test/tint/builtins/gen/var/log/6ff86f.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/log/6ff86f.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
   log_6ff86f();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000029DD70F8770(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000029DD70F8770(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/log/8f0e32.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/log/8f0e32.wgsl.expected.fxc.hlsl
index 5c7cd72..c8f8fb2 100644
--- a/test/tint/builtins/gen/var/log/8f0e32.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/log/8f0e32.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
   log_8f0e32();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002A51B8C05E0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002A51B8C05E0(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/log/c9f489.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/log/c9f489.wgsl.expected.fxc.hlsl
index 5929a1c..1842fc3 100644
--- a/test/tint/builtins/gen/var/log/c9f489.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/log/c9f489.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
   log_c9f489();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000242D2E74480(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000242D2E74480(2,13-17): error X3000: unrecognized identifier 'arg_0'
-
diff --git a/test/tint/builtins/gen/var/log/cdbdc1.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/log/cdbdc1.wgsl.expected.fxc.hlsl
index 52bc9ae..8e10438 100644
--- a/test/tint/builtins/gen/var/log/cdbdc1.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/log/cdbdc1.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
   log_cdbdc1();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002F51ED070D0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002F51ED070D0(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/log2/38b478.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/log2/38b478.wgsl.expected.fxc.hlsl
index 2bdd289..a064161 100644
--- a/test/tint/builtins/gen/var/log2/38b478.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/log2/38b478.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
   log2_38b478();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000021830188770(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000021830188770(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/log2/776088.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/log2/776088.wgsl.expected.fxc.hlsl
index 64e5e4a..00d4694 100644
--- a/test/tint/builtins/gen/var/log2/776088.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/log2/776088.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
   log2_776088();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001FF2A6D2B50(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001FF2A6D2B50(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/log2/8c10b3.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/log2/8c10b3.wgsl.expected.fxc.hlsl
index d5a8f48..b2942db 100644
--- a/test/tint/builtins/gen/var/log2/8c10b3.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/log2/8c10b3.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
   log2_8c10b3();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002320D6B2E20(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002320D6B2E20(2,13-17): error X3000: unrecognized identifier 'arg_0'
-
diff --git a/test/tint/builtins/gen/var/log2/fb9f0b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/log2/fb9f0b.wgsl.expected.fxc.hlsl
index c6e2e2b..c887b557 100644
--- a/test/tint/builtins/gen/var/log2/fb9f0b.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/log2/fb9f0b.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
   log2_fb9f0b();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000196C422E8F0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000196C422E8F0(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/max/111ac0.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/max/111ac0.wgsl.expected.fxc.hlsl
index 15b4bff..33ea840 100644
--- a/test/tint/builtins/gen/var/max/111ac0.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/max/111ac0.wgsl.expected.fxc.hlsl
@@ -32,7 +32,3 @@
   max_111ac0();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000261ECC86E70(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000261ECC86E70(2,13-17): error X3000: unrecognized identifier 'arg_0'
-
diff --git a/test/tint/builtins/gen/var/max/34956e.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/max/34956e.wgsl.expected.fxc.hlsl
index 6402eb7..4479358 100644
--- a/test/tint/builtins/gen/var/max/34956e.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/max/34956e.wgsl.expected.fxc.hlsl
@@ -32,8 +32,3 @@
   max_34956e();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000024F90CA9900(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000024F90CA9900(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000024F90CA9900(4,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/max/445169.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/max/445169.wgsl.expected.fxc.hlsl
index 3f48199..517ecfd 100644
--- a/test/tint/builtins/gen/var/max/445169.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/max/445169.wgsl.expected.fxc.hlsl
@@ -32,8 +32,3 @@
   max_445169();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001DB65BB6D70(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001DB65BB6D70(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001DB65BB6D70(4,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/max/e14f2b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/max/e14f2b.wgsl.expected.fxc.hlsl
index 1251ca9..5f4ea88 100644
--- a/test/tint/builtins/gen/var/max/e14f2b.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/max/e14f2b.wgsl.expected.fxc.hlsl
@@ -32,8 +32,3 @@
   max_e14f2b();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000026D512195F0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000026D512195F0(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000026D512195F0(4,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/min/7c710a.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/min/7c710a.wgsl.expected.fxc.hlsl
index 1e7afd7..62d0a13 100644
--- a/test/tint/builtins/gen/var/min/7c710a.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/min/7c710a.wgsl.expected.fxc.hlsl
@@ -32,8 +32,3 @@
   min_7c710a();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000019DCD0014A0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000019DCD0014A0(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000019DCD0014A0(4,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/min/ab0acd.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/min/ab0acd.wgsl.expected.fxc.hlsl
index 5da4fb5..a92ab98 100644
--- a/test/tint/builtins/gen/var/min/ab0acd.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/min/ab0acd.wgsl.expected.fxc.hlsl
@@ -32,8 +32,3 @@
   min_ab0acd();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000019AECEC2DB0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000019AECEC2DB0(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000019AECEC2DB0(4,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/min/ac84d6.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/min/ac84d6.wgsl.expected.fxc.hlsl
index 77aa23f..8274c9c 100644
--- a/test/tint/builtins/gen/var/min/ac84d6.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/min/ac84d6.wgsl.expected.fxc.hlsl
@@ -32,7 +32,3 @@
   min_ac84d6();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000216706F6E70(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000216706F6E70(2,13-17): error X3000: unrecognized identifier 'arg_0'
-
diff --git a/test/tint/builtins/gen/var/min/e780f9.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/min/e780f9.wgsl.expected.fxc.hlsl
index 7a24d5d..b29a781 100644
--- a/test/tint/builtins/gen/var/min/e780f9.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/min/e780f9.wgsl.expected.fxc.hlsl
@@ -32,8 +32,3 @@
   min_e780f9();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001C199F46BD0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001C199F46BD0(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001C199F46BD0(4,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/mix/38cbbb.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/mix/38cbbb.wgsl.expected.fxc.hlsl
index f7267d2..7a960c5 100644
--- a/test/tint/builtins/gen/var/mix/38cbbb.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/mix/38cbbb.wgsl.expected.fxc.hlsl
@@ -33,7 +33,3 @@
   mix_38cbbb();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000265C36E19E0(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000265C36E19E0(2,13-17): error X3000: unrecognized identifier 'arg_0'
-
diff --git a/test/tint/builtins/gen/var/mix/63f2fd.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/mix/63f2fd.wgsl.expected.fxc.hlsl
index a54e8bd..28746be 100644
--- a/test/tint/builtins/gen/var/mix/63f2fd.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/mix/63f2fd.wgsl.expected.fxc.hlsl
@@ -33,9 +33,3 @@
   mix_63f2fd();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000021DB787B5D0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000021DB787B5D0(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000021DB787B5D0(4,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000021DB787B5D0(5,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/mix/98ee3e.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/mix/98ee3e.wgsl.expected.fxc.hlsl
index 034d036..bc20a21 100644
--- a/test/tint/builtins/gen/var/mix/98ee3e.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/mix/98ee3e.wgsl.expected.fxc.hlsl
@@ -33,9 +33,3 @@
   mix_98ee3e();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000261CFF10B50(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000261CFF10B50(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000261CFF10B50(4,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000261CFF10B50(5,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/mix/c1aec6.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/mix/c1aec6.wgsl.expected.fxc.hlsl
index c8b6210..b076788 100644
--- a/test/tint/builtins/gen/var/mix/c1aec6.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/mix/c1aec6.wgsl.expected.fxc.hlsl
@@ -33,9 +33,3 @@
   mix_c1aec6();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002489FE7D9C0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002489FE7D9C0(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002489FE7D9C0(4,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002489FE7D9C0(4,13-17): error X3000: unrecognized identifier 'arg_2'
-
diff --git a/test/tint/builtins/gen/var/mix/e46a83.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/mix/e46a83.wgsl.expected.fxc.hlsl
index 088d879..9a64812 100644
--- a/test/tint/builtins/gen/var/mix/e46a83.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/mix/e46a83.wgsl.expected.fxc.hlsl
@@ -33,9 +33,3 @@
   mix_e46a83();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001F3F7264500(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001F3F7264500(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001F3F7264500(4,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001F3F7264500(4,13-17): error X3000: unrecognized identifier 'arg_2'
-
diff --git a/test/tint/builtins/gen/var/mix/ee2468.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/mix/ee2468.wgsl.expected.fxc.hlsl
index 7e6e6f0..bc1e9cc 100644
--- a/test/tint/builtins/gen/var/mix/ee2468.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/mix/ee2468.wgsl.expected.fxc.hlsl
@@ -33,9 +33,3 @@
   mix_ee2468();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000122D9269150(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000122D9269150(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000122D9269150(4,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000122D9269150(5,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/mix/f1a543.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/mix/f1a543.wgsl.expected.fxc.hlsl
index 97176f9..07c8f81 100644
--- a/test/tint/builtins/gen/var/mix/f1a543.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/mix/f1a543.wgsl.expected.fxc.hlsl
@@ -33,9 +33,3 @@
   mix_f1a543();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000027B644EDA60(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000027B644EDA60(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000027B644EDA60(4,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000027B644EDA60(4,13-17): error X3000: unrecognized identifier 'arg_2'
-
diff --git a/test/tint/builtins/gen/var/modf/45005f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/modf/45005f.wgsl.expected.fxc.hlsl
index 64e0fc4..f603a26 100644
--- a/test/tint/builtins/gen/var/modf/45005f.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/modf/45005f.wgsl.expected.fxc.hlsl
@@ -41,6 +41,3 @@
   modf_45005f();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000022A03927740(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/modf/8dbbbf.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/modf/8dbbbf.wgsl.expected.fxc.hlsl
index db80c1f..a744ba3 100644
--- a/test/tint/builtins/gen/var/modf/8dbbbf.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/modf/8dbbbf.wgsl.expected.fxc.hlsl
@@ -41,6 +41,3 @@
   modf_8dbbbf();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001A838D20100(2,3-11): error X3000: unrecognized identifier 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/modf/995934.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/modf/995934.wgsl.expected.fxc.hlsl
index d2a2137..c859c5c 100644
--- a/test/tint/builtins/gen/var/modf/995934.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/modf/995934.wgsl.expected.fxc.hlsl
@@ -41,6 +41,3 @@
   modf_995934();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000022D4D8C17A0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/modf/a545b9.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/modf/a545b9.wgsl.expected.fxc.hlsl
index 412c83d..c31eba6 100644
--- a/test/tint/builtins/gen/var/modf/a545b9.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/modf/a545b9.wgsl.expected.fxc.hlsl
@@ -41,6 +41,3 @@
   modf_a545b9();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001F329190D80(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/normalize/39d5ec.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/normalize/39d5ec.wgsl.expected.fxc.hlsl
index 0515aa9..446e72a 100644
--- a/test/tint/builtins/gen/var/normalize/39d5ec.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/normalize/39d5ec.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
   normalize_39d5ec();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000026F4DE48920(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000026F4DE48920(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/normalize/7990f3.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/normalize/7990f3.wgsl.expected.fxc.hlsl
index ef29d84..aefa43f 100644
--- a/test/tint/builtins/gen/var/normalize/7990f3.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/normalize/7990f3.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
   normalize_7990f3();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000234A30F1570(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000234A30F1570(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/normalize/b8cb8d.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/normalize/b8cb8d.wgsl.expected.fxc.hlsl
index 04068803..99e6565 100644
--- a/test/tint/builtins/gen/var/normalize/b8cb8d.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/normalize/b8cb8d.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
   normalize_b8cb8d();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000021732CD97D0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000021732CD97D0(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/pow/4f33b2.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/pow/4f33b2.wgsl.expected.fxc.hlsl
index 11cb081..7b02c07 100644
--- a/test/tint/builtins/gen/var/pow/4f33b2.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/pow/4f33b2.wgsl.expected.fxc.hlsl
@@ -32,8 +32,3 @@
   pow_4f33b2();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001C8CA6D2360(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001C8CA6D2360(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001C8CA6D2360(4,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/pow/ce9ef5.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/pow/ce9ef5.wgsl.expected.fxc.hlsl
index a893034..4af4f1a 100644
--- a/test/tint/builtins/gen/var/pow/ce9ef5.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/pow/ce9ef5.wgsl.expected.fxc.hlsl
@@ -32,7 +32,3 @@
   pow_ce9ef5();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001987C544730(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001987C544730(2,13-17): error X3000: unrecognized identifier 'arg_0'
-
diff --git a/test/tint/builtins/gen/var/pow/f37b25.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/pow/f37b25.wgsl.expected.fxc.hlsl
index 49f883c..fd19bd5 100644
--- a/test/tint/builtins/gen/var/pow/f37b25.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/pow/f37b25.wgsl.expected.fxc.hlsl
@@ -32,8 +32,3 @@
   pow_f37b25();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000018483F919C0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000018483F919C0(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000018483F919C0(4,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/pow/fa5429.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/pow/fa5429.wgsl.expected.fxc.hlsl
index 9bad326..90c9918 100644
--- a/test/tint/builtins/gen/var/pow/fa5429.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/pow/fa5429.wgsl.expected.fxc.hlsl
@@ -32,8 +32,3 @@
   pow_fa5429();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001E461739570(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001E461739570(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001E461739570(4,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/radians/208fd9.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/radians/208fd9.wgsl.expected.fxc.hlsl
index d26e91e..697a96d 100644
--- a/test/tint/builtins/gen/var/radians/208fd9.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/radians/208fd9.wgsl.expected.fxc.hlsl
@@ -35,6 +35,3 @@
   radians_208fd9();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000025E7A643540(1,1-9): error X3000: unrecognized identifier 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/radians/44f20b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/radians/44f20b.wgsl.expected.fxc.hlsl
index e58dd03..b93f28d 100644
--- a/test/tint/builtins/gen/var/radians/44f20b.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/radians/44f20b.wgsl.expected.fxc.hlsl
@@ -35,6 +35,3 @@
   radians_44f20b();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001F25F161620(1,8-16): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/radians/7ea4c7.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/radians/7ea4c7.wgsl.expected.fxc.hlsl
index ca0996d..d824c99 100644
--- a/test/tint/builtins/gen/var/radians/7ea4c7.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/radians/7ea4c7.wgsl.expected.fxc.hlsl
@@ -35,6 +35,3 @@
   radians_7ea4c7();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000020CCED30150(1,8-16): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/radians/fbacf0.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/radians/fbacf0.wgsl.expected.fxc.hlsl
index 0ea92ab..61dd8b0 100644
--- a/test/tint/builtins/gen/var/radians/fbacf0.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/radians/fbacf0.wgsl.expected.fxc.hlsl
@@ -35,6 +35,3 @@
   radians_fbacf0();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002290DE021A0(1,8-16): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/reflect/310de5.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/reflect/310de5.wgsl.expected.fxc.hlsl
index 30317a4..84245f1 100644
--- a/test/tint/builtins/gen/var/reflect/310de5.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/reflect/310de5.wgsl.expected.fxc.hlsl
@@ -32,8 +32,3 @@
   reflect_310de5();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001A447B2CCB0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001A447B2CCB0(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001A447B2CCB0(4,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/reflect/61ca21.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/reflect/61ca21.wgsl.expected.fxc.hlsl
index 7f3977e..a9f8023 100644
--- a/test/tint/builtins/gen/var/reflect/61ca21.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/reflect/61ca21.wgsl.expected.fxc.hlsl
@@ -32,8 +32,3 @@
   reflect_61ca21();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002B6431BD140(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002B6431BD140(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002B6431BD140(4,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/reflect/bb15ac.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/reflect/bb15ac.wgsl.expected.fxc.hlsl
index 7979837..36a346f 100644
--- a/test/tint/builtins/gen/var/reflect/bb15ac.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/reflect/bb15ac.wgsl.expected.fxc.hlsl
@@ -32,8 +32,3 @@
   reflect_bb15ac();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001D1F2206F80(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001D1F2206F80(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001D1F2206F80(4,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/refract/0594ba.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/refract/0594ba.wgsl.expected.fxc.hlsl
index 9201cef..bb32e3b 100644
--- a/test/tint/builtins/gen/var/refract/0594ba.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/refract/0594ba.wgsl.expected.fxc.hlsl
@@ -33,9 +33,3 @@
   refract_0594ba();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001D61952A880(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001D61952A880(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001D61952A880(4,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001D61952A880(4,13-17): error X3000: unrecognized identifier 'arg_2'
-
diff --git a/test/tint/builtins/gen/var/refract/570cb3.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/refract/570cb3.wgsl.expected.fxc.hlsl
index 7d3be7d..b4f13e0 100644
--- a/test/tint/builtins/gen/var/refract/570cb3.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/refract/570cb3.wgsl.expected.fxc.hlsl
@@ -33,9 +33,3 @@
   refract_570cb3();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001BAD82D3A70(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001BAD82D3A70(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001BAD82D3A70(4,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001BAD82D3A70(4,13-17): error X3000: unrecognized identifier 'arg_2'
-
diff --git a/test/tint/builtins/gen/var/refract/8984af.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/refract/8984af.wgsl.expected.fxc.hlsl
index 260d085..3f0f6be 100644
--- a/test/tint/builtins/gen/var/refract/8984af.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/refract/8984af.wgsl.expected.fxc.hlsl
@@ -33,9 +33,3 @@
   refract_8984af();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001BED048A880(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001BED048A880(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001BED048A880(4,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001BED048A880(4,13-17): error X3000: unrecognized identifier 'arg_2'
-
diff --git a/test/tint/builtins/gen/var/round/9078ef.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/round/9078ef.wgsl.expected.fxc.hlsl
index b1f7b10..9ac2d12 100644
--- a/test/tint/builtins/gen/var/round/9078ef.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/round/9078ef.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
   round_9078ef();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000021E2DBC1640(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000021E2DBC1640(2,13-17): error X3000: unrecognized identifier 'arg_0'
-
diff --git a/test/tint/builtins/gen/var/round/d87e84.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/round/d87e84.wgsl.expected.fxc.hlsl
index 95b83e2..4e5f123 100644
--- a/test/tint/builtins/gen/var/round/d87e84.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/round/d87e84.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
   round_d87e84();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000013FF5D11570(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000013FF5D11570(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/round/e1bba2.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/round/e1bba2.wgsl.expected.fxc.hlsl
index 64c5a88..921ccde 100644
--- a/test/tint/builtins/gen/var/round/e1bba2.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/round/e1bba2.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
   round_e1bba2();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002DBC8633250(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002DBC8633250(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/round/f665b5.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/round/f665b5.wgsl.expected.fxc.hlsl
index b1bdd81..5a06695 100644
--- a/test/tint/builtins/gen/var/round/f665b5.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/round/f665b5.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
   round_f665b5();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000023EB7FA70D0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000023EB7FA70D0(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/saturate/462535.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/saturate/462535.wgsl.expected.fxc.hlsl
index 7a4deca..5f02aae 100644
--- a/test/tint/builtins/gen/var/saturate/462535.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/saturate/462535.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
   saturate_462535();
   return;
 }
-FXC validation failure:
-C:\src\dawn\test\tint\Shader@0x000001DC3F306920(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-C:\src\dawn\test\tint\Shader@0x000001DC3F306920(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/saturate/cd2028.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/saturate/cd2028.wgsl.expected.fxc.hlsl
index 314bc8a..0ef67b8 100644
--- a/test/tint/builtins/gen/var/saturate/cd2028.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/saturate/cd2028.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
   saturate_cd2028();
   return;
 }
-FXC validation failure:
-C:\src\dawn\test\tint\Shader@0x00000112C07589F0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-C:\src\dawn\test\tint\Shader@0x00000112C07589F0(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/saturate/dcde71.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/saturate/dcde71.wgsl.expected.fxc.hlsl
index 75dd778..3f92fa4 100644
--- a/test/tint/builtins/gen/var/saturate/dcde71.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/saturate/dcde71.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
   saturate_dcde71();
   return;
 }
-FXC validation failure:
-C:\src\dawn\test\tint\Shader@0x0000023B2F7F4970(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-C:\src\dawn\test\tint\Shader@0x0000023B2F7F4970(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/saturate/e8df56.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/saturate/e8df56.wgsl.expected.fxc.hlsl
index 3a649ba..5c2b820 100644
--- a/test/tint/builtins/gen/var/saturate/e8df56.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/saturate/e8df56.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
   saturate_e8df56();
   return;
 }
-FXC validation failure:
-C:\src\dawn\test\tint\Shader@0x000001DB75B70300(2,3-11): error X3000: unrecognized identifier 'float16_t'
-C:\src\dawn\test\tint\Shader@0x000001DB75B70300(2,13-17): error X3000: unrecognized identifier 'arg_0'
-
diff --git a/test/tint/builtins/gen/var/select/10e73b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/select/10e73b.wgsl.expected.fxc.hlsl
index e8c0804..91c838c 100644
--- a/test/tint/builtins/gen/var/select/10e73b.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/select/10e73b.wgsl.expected.fxc.hlsl
@@ -33,7 +33,3 @@
   select_10e73b();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001B6F116BCD0(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001B6F116BCD0(2,13-17): error X3000: unrecognized identifier 'arg_0'
-
diff --git a/test/tint/builtins/gen/var/select/1ada2a.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/select/1ada2a.wgsl.expected.fxc.hlsl
index a7ddf09..ac216fa 100644
--- a/test/tint/builtins/gen/var/select/1ada2a.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/select/1ada2a.wgsl.expected.fxc.hlsl
@@ -33,8 +33,3 @@
   select_1ada2a();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001843DACE700(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001843DACE700(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001843DACE700(5,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/select/53d518.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/select/53d518.wgsl.expected.fxc.hlsl
index 41ea9bf..50237cf 100644
--- a/test/tint/builtins/gen/var/select/53d518.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/select/53d518.wgsl.expected.fxc.hlsl
@@ -33,8 +33,3 @@
   select_53d518();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001B5EE857E30(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001B5EE857E30(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001B5EE857E30(5,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/select/830dd9.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/select/830dd9.wgsl.expected.fxc.hlsl
index 844a4b7..c171292 100644
--- a/test/tint/builtins/gen/var/select/830dd9.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/select/830dd9.wgsl.expected.fxc.hlsl
@@ -33,8 +33,3 @@
   select_830dd9();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002476DF13A60(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002476DF13A60(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002476DF13A60(5,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/select/86f9bd.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/select/86f9bd.wgsl.expected.fxc.hlsl
index 341d518..f4865d5 100644
--- a/test/tint/builtins/gen/var/select/86f9bd.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/select/86f9bd.wgsl.expected.fxc.hlsl
@@ -33,8 +33,3 @@
   select_86f9bd();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000018386C13370(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000018386C13370(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000018386C13370(5,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/select/a081f1.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/select/a081f1.wgsl.expected.fxc.hlsl
index 9ac9d28..6a64b7e 100644
--- a/test/tint/builtins/gen/var/select/a081f1.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/select/a081f1.wgsl.expected.fxc.hlsl
@@ -33,8 +33,3 @@
   select_a081f1();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002045A0049A0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002045A0049A0(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002045A0049A0(5,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/select/ed7c13.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/select/ed7c13.wgsl.expected.fxc.hlsl
index 89935f9..23bf4d5 100644
--- a/test/tint/builtins/gen/var/select/ed7c13.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/select/ed7c13.wgsl.expected.fxc.hlsl
@@ -33,8 +33,3 @@
   select_ed7c13();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002503B521520(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002503B521520(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002503B521520(5,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/sign/160933.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/sign/160933.wgsl.expected.fxc.hlsl
index 15614dd..3359004 100644
--- a/test/tint/builtins/gen/var/sign/160933.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/sign/160933.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
   sign_160933();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001D74F9AEFE0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001D74F9AEFE0(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/sign/5d283a.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/sign/5d283a.wgsl.expected.fxc.hlsl
index 0f5e127..9d8131c 100644
--- a/test/tint/builtins/gen/var/sign/5d283a.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/sign/5d283a.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
   sign_5d283a();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000025242B02410(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000025242B02410(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/sign/7c85ea.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/sign/7c85ea.wgsl.expected.fxc.hlsl
index f270ceb..ae76047 100644
--- a/test/tint/builtins/gen/var/sign/7c85ea.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/sign/7c85ea.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
   sign_7c85ea();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000025B195644F0(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000025B195644F0(2,13-17): error X3000: unrecognized identifier 'arg_0'
-
diff --git a/test/tint/builtins/gen/var/sign/ccdb3c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/sign/ccdb3c.wgsl.expected.fxc.hlsl
index 2756198..735e750 100644
--- a/test/tint/builtins/gen/var/sign/ccdb3c.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/sign/ccdb3c.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
   sign_ccdb3c();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000027F56D505E0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000027F56D505E0(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/sin/2c903b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/sin/2c903b.wgsl.expected.fxc.hlsl
index 06f82a8..8b8d223 100644
--- a/test/tint/builtins/gen/var/sin/2c903b.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/sin/2c903b.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
   sin_2c903b();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000022899018770(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000022899018770(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/sin/3cca11.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/sin/3cca11.wgsl.expected.fxc.hlsl
index 8ea97b8..9fe0a31 100644
--- a/test/tint/builtins/gen/var/sin/3cca11.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/sin/3cca11.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
   sin_3cca11();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001FCDD1705E0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001FCDD1705E0(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/sin/5c0712.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/sin/5c0712.wgsl.expected.fxc.hlsl
index cf3f4d4..26a60e2 100644
--- a/test/tint/builtins/gen/var/sin/5c0712.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/sin/5c0712.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
   sin_5c0712();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000260A64A2B50(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000260A64A2B50(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/sin/66a59f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/sin/66a59f.wgsl.expected.fxc.hlsl
index 40199e2..4ce2ce2 100644
--- a/test/tint/builtins/gen/var/sin/66a59f.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/sin/66a59f.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
   sin_66a59f();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001826042C2F0(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001826042C2F0(2,13-17): error X3000: unrecognized identifier 'arg_0'
-
diff --git a/test/tint/builtins/gen/var/sinh/0908c1.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/sinh/0908c1.wgsl.expected.fxc.hlsl
index 218f8d2..010bd52 100644
--- a/test/tint/builtins/gen/var/sinh/0908c1.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/sinh/0908c1.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
   sinh_0908c1();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000029A72348830(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000029A72348830(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/sinh/69cce2.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/sinh/69cce2.wgsl.expected.fxc.hlsl
index 7029997..1204a4a 100644
--- a/test/tint/builtins/gen/var/sinh/69cce2.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/sinh/69cce2.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
   sinh_69cce2();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002177048C2F0(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002177048C2F0(2,13-17): error X3000: unrecognized identifier 'arg_0'
-
diff --git a/test/tint/builtins/gen/var/sinh/924f19.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/sinh/924f19.wgsl.expected.fxc.hlsl
index 65bd9a3..c12d5f5 100644
--- a/test/tint/builtins/gen/var/sinh/924f19.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/sinh/924f19.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
   sinh_924f19();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000023F87A98990(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000023F87A98990(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/sinh/ba7e25.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/sinh/ba7e25.wgsl.expected.fxc.hlsl
index 6d013e8..beeee6f 100644
--- a/test/tint/builtins/gen/var/sinh/ba7e25.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/sinh/ba7e25.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
   sinh_ba7e25();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001CF8F9907F0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001CF8F9907F0(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/smoothstep/12c031.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/smoothstep/12c031.wgsl.expected.fxc.hlsl
index 8bc9391..e31f56f 100644
--- a/test/tint/builtins/gen/var/smoothstep/12c031.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/smoothstep/12c031.wgsl.expected.fxc.hlsl
@@ -33,9 +33,3 @@
   smoothstep_12c031();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001E666F5FB00(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001E666F5FB00(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001E666F5FB00(4,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001E666F5FB00(5,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/smoothstep/586e12.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/smoothstep/586e12.wgsl.expected.fxc.hlsl
index e740197..b5bdb64 100644
--- a/test/tint/builtins/gen/var/smoothstep/586e12.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/smoothstep/586e12.wgsl.expected.fxc.hlsl
@@ -33,7 +33,3 @@
   smoothstep_586e12();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001CA5325EE80(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001CA5325EE80(2,13-17): error X3000: unrecognized identifier 'arg_0'
-
diff --git a/test/tint/builtins/gen/var/smoothstep/6e7a74.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/smoothstep/6e7a74.wgsl.expected.fxc.hlsl
index dd99645..6fb59fa 100644
--- a/test/tint/builtins/gen/var/smoothstep/6e7a74.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/smoothstep/6e7a74.wgsl.expected.fxc.hlsl
@@ -33,9 +33,3 @@
   smoothstep_6e7a74();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000018E52AF3660(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000018E52AF3660(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000018E52AF3660(4,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000018E52AF3660(5,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/smoothstep/c43ebd.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/smoothstep/c43ebd.wgsl.expected.fxc.hlsl
index dcf7052..f41d30c 100644
--- a/test/tint/builtins/gen/var/smoothstep/c43ebd.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/smoothstep/c43ebd.wgsl.expected.fxc.hlsl
@@ -33,9 +33,3 @@
   smoothstep_c43ebd();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001EE5BEB1170(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001EE5BEB1170(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001EE5BEB1170(4,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001EE5BEB1170(5,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/sqrt/803d1c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/sqrt/803d1c.wgsl.expected.fxc.hlsl
index 888036e..41d7162 100644
--- a/test/tint/builtins/gen/var/sqrt/803d1c.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/sqrt/803d1c.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
   sqrt_803d1c();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000017B75EA30C0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000017B75EA30C0(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/sqrt/895a0c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/sqrt/895a0c.wgsl.expected.fxc.hlsl
index 68388d4..a0cf37a 100644
--- a/test/tint/builtins/gen/var/sqrt/895a0c.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/sqrt/895a0c.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
   sqrt_895a0c();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000173DFA01300(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000173DFA01300(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/sqrt/d9ab4d.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/sqrt/d9ab4d.wgsl.expected.fxc.hlsl
index 2dae4c2..64f1ffc 100644
--- a/test/tint/builtins/gen/var/sqrt/d9ab4d.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/sqrt/d9ab4d.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
   sqrt_d9ab4d();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000261E9DA1200(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000261E9DA1200(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/sqrt/ec33e9.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/sqrt/ec33e9.wgsl.expected.fxc.hlsl
index 9a31e13..3fedcd9 100644
--- a/test/tint/builtins/gen/var/sqrt/ec33e9.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/sqrt/ec33e9.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
   sqrt_ec33e9();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002A68F39AB60(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002A68F39AB60(2,13-17): error X3000: unrecognized identifier 'arg_0'
-
diff --git a/test/tint/builtins/gen/var/step/07cb06.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/step/07cb06.wgsl.expected.fxc.hlsl
index f643e8f..e7aee04 100644
--- a/test/tint/builtins/gen/var/step/07cb06.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/step/07cb06.wgsl.expected.fxc.hlsl
@@ -32,8 +32,3 @@
   step_07cb06();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000026FD2EC2DB0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000026FD2EC2DB0(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000026FD2EC2DB0(4,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/step/630d07.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/step/630d07.wgsl.expected.fxc.hlsl
index 1d7db44..4818e72 100644
--- a/test/tint/builtins/gen/var/step/630d07.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/step/630d07.wgsl.expected.fxc.hlsl
@@ -32,7 +32,3 @@
   step_630d07();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000024979951900(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000024979951900(2,13-17): error X3000: unrecognized identifier 'arg_0'
-
diff --git a/test/tint/builtins/gen/var/step/baa320.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/step/baa320.wgsl.expected.fxc.hlsl
index 7bae936..8328420 100644
--- a/test/tint/builtins/gen/var/step/baa320.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/step/baa320.wgsl.expected.fxc.hlsl
@@ -32,8 +32,3 @@
   step_baa320();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001DD0BA42C40(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001DD0BA42C40(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001DD0BA42C40(4,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/step/cc6b61.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/step/cc6b61.wgsl.expected.fxc.hlsl
index 285ad21..29ed50d 100644
--- a/test/tint/builtins/gen/var/step/cc6b61.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/step/cc6b61.wgsl.expected.fxc.hlsl
@@ -32,8 +32,3 @@
   step_cc6b61();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000013865172DA0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000013865172DA0(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000013865172DA0(4,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/tan/539e54.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/tan/539e54.wgsl.expected.fxc.hlsl
index c932938..a89a0d1 100644
--- a/test/tint/builtins/gen/var/tan/539e54.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/tan/539e54.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
   tan_539e54();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002AE30C0C880(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002AE30C0C880(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/tan/9f7c9c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/tan/9f7c9c.wgsl.expected.fxc.hlsl
index bfffaf2..1e2d978 100644
--- a/test/tint/builtins/gen/var/tan/9f7c9c.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/tan/9f7c9c.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
   tan_9f7c9c();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000013C12D4B340(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000013C12D4B340(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/tan/d4d491.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/tan/d4d491.wgsl.expected.fxc.hlsl
index 6df8e23..44dc465 100644
--- a/test/tint/builtins/gen/var/tan/d4d491.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/tan/d4d491.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
   tan_d4d491();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000026911B52E20(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000026911B52E20(2,13-17): error X3000: unrecognized identifier 'arg_0'
-
diff --git a/test/tint/builtins/gen/var/tan/db0456.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/tan/db0456.wgsl.expected.fxc.hlsl
index 2c6f4b3..7520c26 100644
--- a/test/tint/builtins/gen/var/tan/db0456.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/tan/db0456.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
   tan_db0456();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000022CB9A7E270(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000022CB9A7E270(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/tanh/06a4fe.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/tanh/06a4fe.wgsl.expected.fxc.hlsl
index a8775d6..09a20f1 100644
--- a/test/tint/builtins/gen/var/tanh/06a4fe.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/tanh/06a4fe.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
   tanh_06a4fe();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000028509F68770(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000028509F68770(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/tanh/5b19af.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/tanh/5b19af.wgsl.expected.fxc.hlsl
index 8c81022..796f6e4 100644
--- a/test/tint/builtins/gen/var/tanh/5b19af.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/tanh/5b19af.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
   tanh_5b19af();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001A07EE64130(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001A07EE64130(2,13-17): error X3000: unrecognized identifier 'arg_0'
-
diff --git a/test/tint/builtins/gen/var/tanh/6d105a.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/tanh/6d105a.wgsl.expected.fxc.hlsl
index 56aff70..5011426 100644
--- a/test/tint/builtins/gen/var/tanh/6d105a.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/tanh/6d105a.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
   tanh_6d105a();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000022C76563400(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000022C76563400(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/tanh/e8efb3.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/tanh/e8efb3.wgsl.expected.fxc.hlsl
index 4ce0631..8c4f0ad 100644
--- a/test/tint/builtins/gen/var/tanh/e8efb3.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/tanh/e8efb3.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
   tanh_e8efb3();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000020C348DBBA0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000020C348DBBA0(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/0a1ce8.wgsl b/test/tint/builtins/gen/var/textureDimensions/0a1ce8.wgsl
new file mode 100644
index 0000000..5f926ae
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/0a1ce8.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_depth_2d_array;
+
+// fn textureDimensions(texture: texture_depth_2d_array, level: u32) -> vec2<i32>
+fn textureDimensions_0a1ce8() {
+  var arg_1 = 1u;
+  var res: vec2<i32> = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_0a1ce8();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_0a1ce8();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_0a1ce8();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/0a1ce8.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/0a1ce8.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..6a8a99e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/0a1ce8.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture2DArray arg_0 : register(t0, space1);
+
+void textureDimensions_0a1ce8() {
+  uint arg_1 = 1u;
+  int4 tint_tmp;
+  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
+  int2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_0a1ce8();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_0a1ce8();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_0a1ce8();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/0a1ce8.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/0a1ce8.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..6a8a99e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/0a1ce8.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture2DArray arg_0 : register(t0, space1);
+
+void textureDimensions_0a1ce8() {
+  uint arg_1 = 1u;
+  int4 tint_tmp;
+  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
+  int2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_0a1ce8();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_0a1ce8();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_0a1ce8();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/0a1ce8.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/0a1ce8.wgsl.expected.glsl
new file mode 100644
index 0000000..ef24d5e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/0a1ce8.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+
+uniform highp sampler2DArray arg_0_1;
+void textureDimensions_0a1ce8() {
+  uint arg_1 = 1u;
+  ivec2 res = textureSize(arg_0_1, int(arg_1)).xy;
+}
+
+vec4 vertex_main() {
+  textureDimensions_0a1ce8();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2DArray arg_0_1;
+void textureDimensions_0a1ce8() {
+  uint arg_1 = 1u;
+  ivec2 res = textureSize(arg_0_1, int(arg_1)).xy;
+}
+
+void fragment_main() {
+  textureDimensions_0a1ce8();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp sampler2DArray arg_0_1;
+void textureDimensions_0a1ce8() {
+  uint arg_1 = 1u;
+  ivec2 res = textureSize(arg_0_1, int(arg_1)).xy;
+}
+
+void compute_main() {
+  textureDimensions_0a1ce8();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/0a1ce8.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/0a1ce8.wgsl.expected.msl
new file mode 100644
index 0000000..da0abf0
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/0a1ce8.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_0a1ce8(depth2d_array<float, access::sample> tint_symbol_1) {
+  uint arg_1 = 1u;
+  int2 res = int2(tint_symbol_1.get_width(arg_1), tint_symbol_1.get_height(arg_1));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(depth2d_array<float, access::sample> tint_symbol_2) {
+  textureDimensions_0a1ce8(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(depth2d_array<float, access::sample> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(depth2d_array<float, access::sample> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_0a1ce8(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(depth2d_array<float, access::sample> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_0a1ce8(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/0a1ce8.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/0a1ce8.wgsl.expected.spvasm
new file mode 100644
index 0000000..9e9dc56
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/0a1ce8.wgsl.expected.spvasm
@@ -0,0 +1,85 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 45
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_0a1ce8 "textureDimensions_0a1ce8"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %12 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %20 = OpConstantNull %uint
+        %int = OpTypeInt 32 1
+      %v2int = OpTypeVector %int 2
+      %v3int = OpTypeVector %int 3
+%_ptr_Function_v2int = OpTypePointer Function %v2int
+         %30 = OpConstantNull %v2int
+         %31 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_0a1ce8 = OpFunction %void None %12
+         %15 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_uint Function %20
+        %res = OpVariable %_ptr_Function_v2int Function %30
+               OpStore %arg_1 %uint_1
+         %26 = OpLoad %11 %arg_0
+         %27 = OpLoad %uint %arg_1
+         %24 = OpImageQuerySizeLod %v3int %26 %27
+         %21 = OpVectorShuffle %v2int %24 %24 0 1
+               OpStore %res %21
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %31
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %textureDimensions_0a1ce8
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+         %36 = OpLabel
+         %37 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %37
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %textureDimensions_0a1ce8
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %12
+         %43 = OpLabel
+         %44 = OpFunctionCall %void %textureDimensions_0a1ce8
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/0a1ce8.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/0a1ce8.wgsl.expected.wgsl
new file mode 100644
index 0000000..cec85de
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/0a1ce8.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+@group(1) @binding(0) var arg_0 : texture_depth_2d_array;
+
+fn textureDimensions_0a1ce8() {
+  var arg_1 = 1u;
+  var res : vec2<i32> = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_0a1ce8();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_0a1ce8();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_0a1ce8();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/0d7633.wgsl b/test/tint/builtins/gen/var/textureDimensions/0d7633.wgsl
new file mode 100644
index 0000000..dbc0ee9
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/0d7633.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_1d<i32>;
+
+// fn textureDimensions(texture: texture_1d<i32>, level: u32) -> i32
+fn textureDimensions_0d7633() {
+  var arg_1 = 1u;
+  var res: i32 = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_0d7633();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_0d7633();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_0d7633();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/0d7633.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/0d7633.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..5653b0e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/0d7633.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture1D<int4> arg_0 : register(t0, space1);
+
+void textureDimensions_0d7633() {
+  uint arg_1 = 1u;
+  int2 tint_tmp;
+  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y);
+  int res = tint_tmp.x;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_0d7633();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_0d7633();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_0d7633();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/0d7633.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/0d7633.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..5653b0e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/0d7633.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture1D<int4> arg_0 : register(t0, space1);
+
+void textureDimensions_0d7633() {
+  uint arg_1 = 1u;
+  int2 tint_tmp;
+  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y);
+  int res = tint_tmp.x;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_0d7633();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_0d7633();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_0d7633();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/0d7633.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/0d7633.wgsl.expected.glsl
new file mode 100644
index 0000000..91d58d3
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/0d7633.wgsl.expected.glsl
@@ -0,0 +1,78 @@
+SKIP: FAILED
+
+#version 310 es
+
+uniform highp isampler1D arg_0_1;
+void textureDimensions_0d7633() {
+  uint arg_1 = 1u;
+  int res = textureSize(arg_0_1, int(arg_1));
+}
+
+vec4 vertex_main() {
+  textureDimensions_0d7633();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'isampler1D' : Reserved word. 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+uniform highp isampler1D arg_0_1;
+void textureDimensions_0d7633() {
+  uint arg_1 = 1u;
+  int res = textureSize(arg_0_1, int(arg_1));
+}
+
+void fragment_main() {
+  textureDimensions_0d7633();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'isampler1D' : Reserved word. 
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+uniform highp isampler1D arg_0_1;
+void textureDimensions_0d7633() {
+  uint arg_1 = 1u;
+  int res = textureSize(arg_0_1, int(arg_1));
+}
+
+void compute_main() {
+  textureDimensions_0d7633();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'isampler1D' : Reserved word. 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/0d7633.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/0d7633.wgsl.expected.msl
new file mode 100644
index 0000000..5e838d2
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/0d7633.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_0d7633(texture1d<int, access::sample> tint_symbol_1) {
+  uint arg_1 = 1u;
+  int res = int(tint_symbol_1.get_width(0));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<int, access::sample> tint_symbol_2) {
+  textureDimensions_0d7633(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<int, access::sample> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<int, access::sample> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_0d7633(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture1d<int, access::sample> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_0d7633(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/0d7633.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/0d7633.wgsl.expected.spvasm
new file mode 100644
index 0000000..4991015
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/0d7633.wgsl.expected.spvasm
@@ -0,0 +1,83 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 42
+; Schema: 0
+               OpCapability Shader
+               OpCapability Sampled1D
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_0d7633 "textureDimensions_0d7633"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 1D 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %21 = OpConstantNull %uint
+%_ptr_Function_int = OpTypePointer Function %int
+         %27 = OpConstantNull %int
+         %28 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_0d7633 = OpFunction %void None %13
+         %16 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_uint Function %21
+        %res = OpVariable %_ptr_Function_int Function %27
+               OpStore %arg_1 %uint_1
+         %23 = OpLoad %11 %arg_0
+         %24 = OpLoad %uint %arg_1
+         %22 = OpImageQuerySizeLod %int %23 %24
+               OpStore %res %22
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %28
+         %30 = OpLabel
+         %31 = OpFunctionCall %void %textureDimensions_0d7633
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %33 = OpLabel
+         %34 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %34
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %37 = OpLabel
+         %38 = OpFunctionCall %void %textureDimensions_0d7633
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %textureDimensions_0d7633
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/0d7633.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/0d7633.wgsl.expected.wgsl
new file mode 100644
index 0000000..0c00e85
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/0d7633.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+@group(1) @binding(0) var arg_0 : texture_1d<i32>;
+
+fn textureDimensions_0d7633() {
+  var arg_1 = 1u;
+  var res : i32 = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_0d7633();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_0d7633();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_0d7633();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/0e28d3.wgsl b/test/tint/builtins/gen/var/textureDimensions/0e28d3.wgsl
new file mode 100644
index 0000000..b9abbbf
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/0e28d3.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_cube_array<f32>;
+
+// fn textureDimensions(texture: texture_cube_array<f32>, level: u32) -> vec2<i32>
+fn textureDimensions_0e28d3() {
+  var arg_1 = 1u;
+  var res: vec2<i32> = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_0e28d3();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_0e28d3();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_0e28d3();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/0e28d3.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/0e28d3.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..9b2431e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/0e28d3.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+TextureCubeArray<float4> arg_0 : register(t0, space1);
+
+void textureDimensions_0e28d3() {
+  uint arg_1 = 1u;
+  int4 tint_tmp;
+  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
+  int2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_0e28d3();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_0e28d3();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_0e28d3();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/0e28d3.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/0e28d3.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..9b2431e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/0e28d3.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+TextureCubeArray<float4> arg_0 : register(t0, space1);
+
+void textureDimensions_0e28d3() {
+  uint arg_1 = 1u;
+  int4 tint_tmp;
+  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
+  int2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_0e28d3();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_0e28d3();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_0e28d3();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/0e28d3.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/0e28d3.wgsl.expected.glsl
new file mode 100644
index 0000000..fb1cefc
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/0e28d3.wgsl.expected.glsl
@@ -0,0 +1,78 @@
+SKIP: FAILED
+
+#version 310 es
+
+uniform highp samplerCubeArray arg_0_1;
+void textureDimensions_0e28d3() {
+  uint arg_1 = 1u;
+  ivec2 res = textureSize(arg_0_1, int(arg_1)).xy;
+}
+
+vec4 vertex_main() {
+  textureDimensions_0e28d3();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'samplerCubeArray' : Reserved word. 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+uniform highp samplerCubeArray arg_0_1;
+void textureDimensions_0e28d3() {
+  uint arg_1 = 1u;
+  ivec2 res = textureSize(arg_0_1, int(arg_1)).xy;
+}
+
+void fragment_main() {
+  textureDimensions_0e28d3();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'samplerCubeArray' : Reserved word. 
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+uniform highp samplerCubeArray arg_0_1;
+void textureDimensions_0e28d3() {
+  uint arg_1 = 1u;
+  ivec2 res = textureSize(arg_0_1, int(arg_1)).xy;
+}
+
+void compute_main() {
+  textureDimensions_0e28d3();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'samplerCubeArray' : Reserved word. 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/0e28d3.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/0e28d3.wgsl.expected.msl
new file mode 100644
index 0000000..c37cac9
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/0e28d3.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_0e28d3(texturecube_array<float, access::sample> tint_symbol_1) {
+  uint arg_1 = 1u;
+  int2 res = int2(tint_symbol_1.get_width(arg_1), tint_symbol_1.get_height(arg_1));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texturecube_array<float, access::sample> tint_symbol_2) {
+  textureDimensions_0e28d3(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texturecube_array<float, access::sample> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texturecube_array<float, access::sample> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_0e28d3(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texturecube_array<float, access::sample> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_0e28d3(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/0e28d3.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/0e28d3.wgsl.expected.spvasm
new file mode 100644
index 0000000..de08fb3
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/0e28d3.wgsl.expected.spvasm
@@ -0,0 +1,86 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 45
+; Schema: 0
+               OpCapability Shader
+               OpCapability SampledCubeArray
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_0e28d3 "textureDimensions_0e28d3"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float Cube 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %12 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %20 = OpConstantNull %uint
+        %int = OpTypeInt 32 1
+      %v2int = OpTypeVector %int 2
+      %v3int = OpTypeVector %int 3
+%_ptr_Function_v2int = OpTypePointer Function %v2int
+         %30 = OpConstantNull %v2int
+         %31 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_0e28d3 = OpFunction %void None %12
+         %15 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_uint Function %20
+        %res = OpVariable %_ptr_Function_v2int Function %30
+               OpStore %arg_1 %uint_1
+         %26 = OpLoad %11 %arg_0
+         %27 = OpLoad %uint %arg_1
+         %24 = OpImageQuerySizeLod %v3int %26 %27
+         %21 = OpVectorShuffle %v2int %24 %24 0 1
+               OpStore %res %21
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %31
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %textureDimensions_0e28d3
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+         %36 = OpLabel
+         %37 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %37
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %textureDimensions_0e28d3
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %12
+         %43 = OpLabel
+         %44 = OpFunctionCall %void %textureDimensions_0e28d3
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/0e28d3.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/0e28d3.wgsl.expected.wgsl
new file mode 100644
index 0000000..32b59d9
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/0e28d3.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+@group(1) @binding(0) var arg_0 : texture_cube_array<f32>;
+
+fn textureDimensions_0e28d3() {
+  var arg_1 = 1u;
+  var res : vec2<i32> = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_0e28d3();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_0e28d3();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_0e28d3();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/16f7cb.wgsl b/test/tint/builtins/gen/var/textureDimensions/16f7cb.wgsl
new file mode 100644
index 0000000..39dfc95
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/16f7cb.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_1d<f32>;
+
+// fn textureDimensions(texture: texture_1d<f32>, level: u32) -> i32
+fn textureDimensions_16f7cb() {
+  var arg_1 = 1u;
+  var res: i32 = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_16f7cb();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_16f7cb();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_16f7cb();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/16f7cb.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/16f7cb.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..93f39f8
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/16f7cb.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture1D<float4> arg_0 : register(t0, space1);
+
+void textureDimensions_16f7cb() {
+  uint arg_1 = 1u;
+  int2 tint_tmp;
+  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y);
+  int res = tint_tmp.x;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_16f7cb();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_16f7cb();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_16f7cb();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/16f7cb.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/16f7cb.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..93f39f8
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/16f7cb.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture1D<float4> arg_0 : register(t0, space1);
+
+void textureDimensions_16f7cb() {
+  uint arg_1 = 1u;
+  int2 tint_tmp;
+  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y);
+  int res = tint_tmp.x;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_16f7cb();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_16f7cb();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_16f7cb();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/16f7cb.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/16f7cb.wgsl.expected.glsl
new file mode 100644
index 0000000..4997a45
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/16f7cb.wgsl.expected.glsl
@@ -0,0 +1,78 @@
+SKIP: FAILED
+
+#version 310 es
+
+uniform highp sampler1D arg_0_1;
+void textureDimensions_16f7cb() {
+  uint arg_1 = 1u;
+  int res = textureSize(arg_0_1, int(arg_1));
+}
+
+vec4 vertex_main() {
+  textureDimensions_16f7cb();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'sampler1D' : Reserved word. 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+uniform highp sampler1D arg_0_1;
+void textureDimensions_16f7cb() {
+  uint arg_1 = 1u;
+  int res = textureSize(arg_0_1, int(arg_1));
+}
+
+void fragment_main() {
+  textureDimensions_16f7cb();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'sampler1D' : Reserved word. 
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+uniform highp sampler1D arg_0_1;
+void textureDimensions_16f7cb() {
+  uint arg_1 = 1u;
+  int res = textureSize(arg_0_1, int(arg_1));
+}
+
+void compute_main() {
+  textureDimensions_16f7cb();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'sampler1D' : Reserved word. 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/16f7cb.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/16f7cb.wgsl.expected.msl
new file mode 100644
index 0000000..153a6f3
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/16f7cb.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_16f7cb(texture1d<float, access::sample> tint_symbol_1) {
+  uint arg_1 = 1u;
+  int res = int(tint_symbol_1.get_width(0));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<float, access::sample> tint_symbol_2) {
+  textureDimensions_16f7cb(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<float, access::sample> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<float, access::sample> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_16f7cb(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture1d<float, access::sample> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_16f7cb(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/16f7cb.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/16f7cb.wgsl.expected.spvasm
new file mode 100644
index 0000000..3664be0
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/16f7cb.wgsl.expected.spvasm
@@ -0,0 +1,83 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 42
+; Schema: 0
+               OpCapability Shader
+               OpCapability Sampled1D
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_16f7cb "textureDimensions_16f7cb"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 1D 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %12 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %20 = OpConstantNull %uint
+        %int = OpTypeInt 32 1
+%_ptr_Function_int = OpTypePointer Function %int
+         %27 = OpConstantNull %int
+         %28 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_16f7cb = OpFunction %void None %12
+         %15 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_uint Function %20
+        %res = OpVariable %_ptr_Function_int Function %27
+               OpStore %arg_1 %uint_1
+         %23 = OpLoad %11 %arg_0
+         %24 = OpLoad %uint %arg_1
+         %21 = OpImageQuerySizeLod %int %23 %24
+               OpStore %res %21
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %28
+         %30 = OpLabel
+         %31 = OpFunctionCall %void %textureDimensions_16f7cb
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+         %33 = OpLabel
+         %34 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %34
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+         %37 = OpLabel
+         %38 = OpFunctionCall %void %textureDimensions_16f7cb
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %12
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %textureDimensions_16f7cb
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/16f7cb.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/16f7cb.wgsl.expected.wgsl
new file mode 100644
index 0000000..b15d59f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/16f7cb.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+@group(1) @binding(0) var arg_0 : texture_1d<f32>;
+
+fn textureDimensions_16f7cb() {
+  var arg_1 = 1u;
+  var res : i32 = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_16f7cb();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_16f7cb();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_16f7cb();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/1e3981.wgsl b/test/tint/builtins/gen/var/textureDimensions/1e3981.wgsl
new file mode 100644
index 0000000..006bfd8
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/1e3981.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_1d<u32>;
+
+// fn textureDimensions(texture: texture_1d<u32>, level: u32) -> i32
+fn textureDimensions_1e3981() {
+  var arg_1 = 1u;
+  var res: i32 = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_1e3981();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_1e3981();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_1e3981();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/1e3981.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/1e3981.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..31d4651
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/1e3981.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture1D<uint4> arg_0 : register(t0, space1);
+
+void textureDimensions_1e3981() {
+  uint arg_1 = 1u;
+  int2 tint_tmp;
+  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y);
+  int res = tint_tmp.x;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_1e3981();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_1e3981();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_1e3981();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/1e3981.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/1e3981.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..31d4651
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/1e3981.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture1D<uint4> arg_0 : register(t0, space1);
+
+void textureDimensions_1e3981() {
+  uint arg_1 = 1u;
+  int2 tint_tmp;
+  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y);
+  int res = tint_tmp.x;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_1e3981();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_1e3981();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_1e3981();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/1e3981.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/1e3981.wgsl.expected.glsl
new file mode 100644
index 0000000..c87c594
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/1e3981.wgsl.expected.glsl
@@ -0,0 +1,78 @@
+SKIP: FAILED
+
+#version 310 es
+
+uniform highp usampler1D arg_0_1;
+void textureDimensions_1e3981() {
+  uint arg_1 = 1u;
+  int res = textureSize(arg_0_1, int(arg_1));
+}
+
+vec4 vertex_main() {
+  textureDimensions_1e3981();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'usampler1D' : Reserved word. 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+uniform highp usampler1D arg_0_1;
+void textureDimensions_1e3981() {
+  uint arg_1 = 1u;
+  int res = textureSize(arg_0_1, int(arg_1));
+}
+
+void fragment_main() {
+  textureDimensions_1e3981();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'usampler1D' : Reserved word. 
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+uniform highp usampler1D arg_0_1;
+void textureDimensions_1e3981() {
+  uint arg_1 = 1u;
+  int res = textureSize(arg_0_1, int(arg_1));
+}
+
+void compute_main() {
+  textureDimensions_1e3981();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'usampler1D' : Reserved word. 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/1e3981.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/1e3981.wgsl.expected.msl
new file mode 100644
index 0000000..ff14fe6
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/1e3981.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_1e3981(texture1d<uint, access::sample> tint_symbol_1) {
+  uint arg_1 = 1u;
+  int res = int(tint_symbol_1.get_width(0));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<uint, access::sample> tint_symbol_2) {
+  textureDimensions_1e3981(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<uint, access::sample> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<uint, access::sample> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_1e3981(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture1d<uint, access::sample> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_1e3981(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/1e3981.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/1e3981.wgsl.expected.spvasm
new file mode 100644
index 0000000..14764a5
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/1e3981.wgsl.expected.spvasm
@@ -0,0 +1,83 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 42
+; Schema: 0
+               OpCapability Shader
+               OpCapability Sampled1D
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_1e3981 "textureDimensions_1e3981"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 1D 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %20 = OpConstantNull %uint
+        %int = OpTypeInt 32 1
+%_ptr_Function_int = OpTypePointer Function %int
+         %27 = OpConstantNull %int
+         %28 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_1e3981 = OpFunction %void None %13
+         %16 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_uint Function %20
+        %res = OpVariable %_ptr_Function_int Function %27
+               OpStore %arg_1 %uint_1
+         %23 = OpLoad %11 %arg_0
+         %24 = OpLoad %uint %arg_1
+         %21 = OpImageQuerySizeLod %int %23 %24
+               OpStore %res %21
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %28
+         %30 = OpLabel
+         %31 = OpFunctionCall %void %textureDimensions_1e3981
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %33 = OpLabel
+         %34 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %34
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %37 = OpLabel
+         %38 = OpFunctionCall %void %textureDimensions_1e3981
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %textureDimensions_1e3981
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/1e3981.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/1e3981.wgsl.expected.wgsl
new file mode 100644
index 0000000..2c5e4ac
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/1e3981.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+@group(1) @binding(0) var arg_0 : texture_1d<u32>;
+
+fn textureDimensions_1e3981() {
+  var arg_1 = 1u;
+  var res : i32 = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_1e3981();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_1e3981();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_1e3981();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/216688.wgsl b/test/tint/builtins/gen/var/textureDimensions/216688.wgsl
new file mode 100644
index 0000000..62690e1
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/216688.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_2d_array<f32>;
+
+// fn textureDimensions(texture: texture_2d_array<f32>, level: u32) -> vec2<i32>
+fn textureDimensions_216688() {
+  var arg_1 = 1u;
+  var res: vec2<i32> = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_216688();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_216688();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_216688();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/216688.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/216688.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..878e5dd
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/216688.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+
+void textureDimensions_216688() {
+  uint arg_1 = 1u;
+  int4 tint_tmp;
+  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
+  int2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_216688();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_216688();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_216688();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/216688.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/216688.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..878e5dd
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/216688.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+
+void textureDimensions_216688() {
+  uint arg_1 = 1u;
+  int4 tint_tmp;
+  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
+  int2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_216688();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_216688();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_216688();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/216688.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/216688.wgsl.expected.glsl
new file mode 100644
index 0000000..0a8a3e8
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/216688.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+
+uniform highp sampler2DArray arg_0_1;
+void textureDimensions_216688() {
+  uint arg_1 = 1u;
+  ivec2 res = textureSize(arg_0_1, int(arg_1)).xy;
+}
+
+vec4 vertex_main() {
+  textureDimensions_216688();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2DArray arg_0_1;
+void textureDimensions_216688() {
+  uint arg_1 = 1u;
+  ivec2 res = textureSize(arg_0_1, int(arg_1)).xy;
+}
+
+void fragment_main() {
+  textureDimensions_216688();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp sampler2DArray arg_0_1;
+void textureDimensions_216688() {
+  uint arg_1 = 1u;
+  ivec2 res = textureSize(arg_0_1, int(arg_1)).xy;
+}
+
+void compute_main() {
+  textureDimensions_216688();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/216688.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/216688.wgsl.expected.msl
new file mode 100644
index 0000000..a75efa9
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/216688.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_216688(texture2d_array<float, access::sample> tint_symbol_1) {
+  uint arg_1 = 1u;
+  int2 res = int2(tint_symbol_1.get_width(arg_1), tint_symbol_1.get_height(arg_1));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<float, access::sample> tint_symbol_2) {
+  textureDimensions_216688(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<float, access::sample> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<float, access::sample> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_216688(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d_array<float, access::sample> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_216688(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/216688.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/216688.wgsl.expected.spvasm
new file mode 100644
index 0000000..ca7d09b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/216688.wgsl.expected.spvasm
@@ -0,0 +1,85 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 45
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_216688 "textureDimensions_216688"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %12 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %20 = OpConstantNull %uint
+        %int = OpTypeInt 32 1
+      %v2int = OpTypeVector %int 2
+      %v3int = OpTypeVector %int 3
+%_ptr_Function_v2int = OpTypePointer Function %v2int
+         %30 = OpConstantNull %v2int
+         %31 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_216688 = OpFunction %void None %12
+         %15 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_uint Function %20
+        %res = OpVariable %_ptr_Function_v2int Function %30
+               OpStore %arg_1 %uint_1
+         %26 = OpLoad %11 %arg_0
+         %27 = OpLoad %uint %arg_1
+         %24 = OpImageQuerySizeLod %v3int %26 %27
+         %21 = OpVectorShuffle %v2int %24 %24 0 1
+               OpStore %res %21
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %31
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %textureDimensions_216688
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+         %36 = OpLabel
+         %37 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %37
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %textureDimensions_216688
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %12
+         %43 = OpLabel
+         %44 = OpFunctionCall %void %textureDimensions_216688
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/216688.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/216688.wgsl.expected.wgsl
new file mode 100644
index 0000000..1914b2b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/216688.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+@group(1) @binding(0) var arg_0 : texture_2d_array<f32>;
+
+fn textureDimensions_216688() {
+  var arg_1 = 1u;
+  var res : vec2<i32> = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_216688();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_216688();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_216688();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/220dc3.wgsl b/test/tint/builtins/gen/var/textureDimensions/220dc3.wgsl
new file mode 100644
index 0000000..c6ad068
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/220dc3.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_2d<u32>;
+
+// fn textureDimensions(texture: texture_2d<u32>, level: u32) -> vec2<i32>
+fn textureDimensions_220dc3() {
+  var arg_1 = 1u;
+  var res: vec2<i32> = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_220dc3();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_220dc3();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_220dc3();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/220dc3.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/220dc3.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..01303f7
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/220dc3.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture2D<uint4> arg_0 : register(t0, space1);
+
+void textureDimensions_220dc3() {
+  uint arg_1 = 1u;
+  int3 tint_tmp;
+  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  int2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_220dc3();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_220dc3();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_220dc3();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/220dc3.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/220dc3.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..01303f7
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/220dc3.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture2D<uint4> arg_0 : register(t0, space1);
+
+void textureDimensions_220dc3() {
+  uint arg_1 = 1u;
+  int3 tint_tmp;
+  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  int2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_220dc3();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_220dc3();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_220dc3();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/220dc3.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/220dc3.wgsl.expected.glsl
new file mode 100644
index 0000000..1c957c1
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/220dc3.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+
+uniform highp usampler2D arg_0_1;
+void textureDimensions_220dc3() {
+  uint arg_1 = 1u;
+  ivec2 res = textureSize(arg_0_1, int(arg_1));
+}
+
+vec4 vertex_main() {
+  textureDimensions_220dc3();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp usampler2D arg_0_1;
+void textureDimensions_220dc3() {
+  uint arg_1 = 1u;
+  ivec2 res = textureSize(arg_0_1, int(arg_1));
+}
+
+void fragment_main() {
+  textureDimensions_220dc3();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp usampler2D arg_0_1;
+void textureDimensions_220dc3() {
+  uint arg_1 = 1u;
+  ivec2 res = textureSize(arg_0_1, int(arg_1));
+}
+
+void compute_main() {
+  textureDimensions_220dc3();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/220dc3.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/220dc3.wgsl.expected.msl
new file mode 100644
index 0000000..ee8e56e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/220dc3.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_220dc3(texture2d<uint, access::sample> tint_symbol_1) {
+  uint arg_1 = 1u;
+  int2 res = int2(tint_symbol_1.get_width(arg_1), tint_symbol_1.get_height(arg_1));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<uint, access::sample> tint_symbol_2) {
+  textureDimensions_220dc3(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<uint, access::sample> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<uint, access::sample> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_220dc3(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d<uint, access::sample> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_220dc3(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/220dc3.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/220dc3.wgsl.expected.spvasm
new file mode 100644
index 0000000..dd0cfd1
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/220dc3.wgsl.expected.spvasm
@@ -0,0 +1,83 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 43
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_220dc3 "textureDimensions_220dc3"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 2D 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %20 = OpConstantNull %uint
+        %int = OpTypeInt 32 1
+      %v2int = OpTypeVector %int 2
+%_ptr_Function_v2int = OpTypePointer Function %v2int
+         %28 = OpConstantNull %v2int
+         %29 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_220dc3 = OpFunction %void None %13
+         %16 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_uint Function %20
+        %res = OpVariable %_ptr_Function_v2int Function %28
+               OpStore %arg_1 %uint_1
+         %24 = OpLoad %11 %arg_0
+         %25 = OpLoad %uint %arg_1
+         %21 = OpImageQuerySizeLod %v2int %24 %25
+               OpStore %res %21
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %29
+         %31 = OpLabel
+         %32 = OpFunctionCall %void %textureDimensions_220dc3
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %34 = OpLabel
+         %35 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %35
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %38 = OpLabel
+         %39 = OpFunctionCall %void %textureDimensions_220dc3
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %41 = OpLabel
+         %42 = OpFunctionCall %void %textureDimensions_220dc3
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/220dc3.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/220dc3.wgsl.expected.wgsl
new file mode 100644
index 0000000..e377046
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/220dc3.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+@group(1) @binding(0) var arg_0 : texture_2d<u32>;
+
+fn textureDimensions_220dc3() {
+  var arg_1 = 1u;
+  var res : vec2<i32> = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_220dc3();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_220dc3();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_220dc3();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/2d4299.wgsl b/test/tint/builtins/gen/var/textureDimensions/2d4299.wgsl
new file mode 100644
index 0000000..3b083d5
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/2d4299.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_cube_array<i32>;
+
+// fn textureDimensions(texture: texture_cube_array<i32>, level: u32) -> vec2<i32>
+fn textureDimensions_2d4299() {
+  var arg_1 = 1u;
+  var res: vec2<i32> = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_2d4299();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_2d4299();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_2d4299();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/2d4299.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/2d4299.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..c3e5b1a
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/2d4299.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+TextureCubeArray<int4> arg_0 : register(t0, space1);
+
+void textureDimensions_2d4299() {
+  uint arg_1 = 1u;
+  int4 tint_tmp;
+  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
+  int2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_2d4299();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_2d4299();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_2d4299();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/2d4299.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/2d4299.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..c3e5b1a
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/2d4299.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+TextureCubeArray<int4> arg_0 : register(t0, space1);
+
+void textureDimensions_2d4299() {
+  uint arg_1 = 1u;
+  int4 tint_tmp;
+  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
+  int2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_2d4299();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_2d4299();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_2d4299();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/2d4299.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/2d4299.wgsl.expected.glsl
new file mode 100644
index 0000000..3545ee2
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/2d4299.wgsl.expected.glsl
@@ -0,0 +1,78 @@
+SKIP: FAILED
+
+#version 310 es
+
+uniform highp isamplerCubeArray arg_0_1;
+void textureDimensions_2d4299() {
+  uint arg_1 = 1u;
+  ivec2 res = textureSize(arg_0_1, int(arg_1)).xy;
+}
+
+vec4 vertex_main() {
+  textureDimensions_2d4299();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'isamplerCubeArray' : Reserved word. 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+uniform highp isamplerCubeArray arg_0_1;
+void textureDimensions_2d4299() {
+  uint arg_1 = 1u;
+  ivec2 res = textureSize(arg_0_1, int(arg_1)).xy;
+}
+
+void fragment_main() {
+  textureDimensions_2d4299();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'isamplerCubeArray' : Reserved word. 
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+uniform highp isamplerCubeArray arg_0_1;
+void textureDimensions_2d4299() {
+  uint arg_1 = 1u;
+  ivec2 res = textureSize(arg_0_1, int(arg_1)).xy;
+}
+
+void compute_main() {
+  textureDimensions_2d4299();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'isamplerCubeArray' : Reserved word. 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/2d4299.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/2d4299.wgsl.expected.msl
new file mode 100644
index 0000000..2db62ef
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/2d4299.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_2d4299(texturecube_array<int, access::sample> tint_symbol_1) {
+  uint arg_1 = 1u;
+  int2 res = int2(tint_symbol_1.get_width(arg_1), tint_symbol_1.get_height(arg_1));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texturecube_array<int, access::sample> tint_symbol_2) {
+  textureDimensions_2d4299(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texturecube_array<int, access::sample> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texturecube_array<int, access::sample> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_2d4299(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texturecube_array<int, access::sample> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_2d4299(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/2d4299.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/2d4299.wgsl.expected.spvasm
new file mode 100644
index 0000000..2212170
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/2d4299.wgsl.expected.spvasm
@@ -0,0 +1,86 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 45
+; Schema: 0
+               OpCapability Shader
+               OpCapability SampledCubeArray
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_2d4299 "textureDimensions_2d4299"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int Cube 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %21 = OpConstantNull %uint
+      %v2int = OpTypeVector %int 2
+      %v3int = OpTypeVector %int 3
+%_ptr_Function_v2int = OpTypePointer Function %v2int
+         %30 = OpConstantNull %v2int
+         %31 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_2d4299 = OpFunction %void None %13
+         %16 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_uint Function %21
+        %res = OpVariable %_ptr_Function_v2int Function %30
+               OpStore %arg_1 %uint_1
+         %26 = OpLoad %11 %arg_0
+         %27 = OpLoad %uint %arg_1
+         %24 = OpImageQuerySizeLod %v3int %26 %27
+         %22 = OpVectorShuffle %v2int %24 %24 0 1
+               OpStore %res %22
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %31
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %textureDimensions_2d4299
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %36 = OpLabel
+         %37 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %37
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %textureDimensions_2d4299
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %43 = OpLabel
+         %44 = OpFunctionCall %void %textureDimensions_2d4299
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/2d4299.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/2d4299.wgsl.expected.wgsl
new file mode 100644
index 0000000..8ae3821
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/2d4299.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+@group(1) @binding(0) var arg_0 : texture_cube_array<i32>;
+
+fn textureDimensions_2d4299() {
+  var arg_1 = 1u;
+  var res : vec2<i32> = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_2d4299();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_2d4299();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_2d4299();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/4d42cf.wgsl b/test/tint/builtins/gen/var/textureDimensions/4d42cf.wgsl
new file mode 100644
index 0000000..8878859
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/4d42cf.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_2d<i32>;
+
+// fn textureDimensions(texture: texture_2d<i32>, level: u32) -> vec2<i32>
+fn textureDimensions_4d42cf() {
+  var arg_1 = 1u;
+  var res: vec2<i32> = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_4d42cf();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_4d42cf();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_4d42cf();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/4d42cf.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/4d42cf.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..ffe5165
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/4d42cf.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture2D<int4> arg_0 : register(t0, space1);
+
+void textureDimensions_4d42cf() {
+  uint arg_1 = 1u;
+  int3 tint_tmp;
+  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  int2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_4d42cf();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_4d42cf();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_4d42cf();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/4d42cf.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/4d42cf.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..ffe5165
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/4d42cf.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture2D<int4> arg_0 : register(t0, space1);
+
+void textureDimensions_4d42cf() {
+  uint arg_1 = 1u;
+  int3 tint_tmp;
+  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  int2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_4d42cf();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_4d42cf();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_4d42cf();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/4d42cf.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/4d42cf.wgsl.expected.glsl
new file mode 100644
index 0000000..80a93e1
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/4d42cf.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+
+uniform highp isampler2D arg_0_1;
+void textureDimensions_4d42cf() {
+  uint arg_1 = 1u;
+  ivec2 res = textureSize(arg_0_1, int(arg_1));
+}
+
+vec4 vertex_main() {
+  textureDimensions_4d42cf();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp isampler2D arg_0_1;
+void textureDimensions_4d42cf() {
+  uint arg_1 = 1u;
+  ivec2 res = textureSize(arg_0_1, int(arg_1));
+}
+
+void fragment_main() {
+  textureDimensions_4d42cf();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp isampler2D arg_0_1;
+void textureDimensions_4d42cf() {
+  uint arg_1 = 1u;
+  ivec2 res = textureSize(arg_0_1, int(arg_1));
+}
+
+void compute_main() {
+  textureDimensions_4d42cf();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/4d42cf.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/4d42cf.wgsl.expected.msl
new file mode 100644
index 0000000..3876b26
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/4d42cf.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_4d42cf(texture2d<int, access::sample> tint_symbol_1) {
+  uint arg_1 = 1u;
+  int2 res = int2(tint_symbol_1.get_width(arg_1), tint_symbol_1.get_height(arg_1));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<int, access::sample> tint_symbol_2) {
+  textureDimensions_4d42cf(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<int, access::sample> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<int, access::sample> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_4d42cf(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d<int, access::sample> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_4d42cf(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/4d42cf.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/4d42cf.wgsl.expected.spvasm
new file mode 100644
index 0000000..60daa9b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/4d42cf.wgsl.expected.spvasm
@@ -0,0 +1,83 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 43
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_4d42cf "textureDimensions_4d42cf"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 2D 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %21 = OpConstantNull %uint
+      %v2int = OpTypeVector %int 2
+%_ptr_Function_v2int = OpTypePointer Function %v2int
+         %28 = OpConstantNull %v2int
+         %29 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_4d42cf = OpFunction %void None %13
+         %16 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_uint Function %21
+        %res = OpVariable %_ptr_Function_v2int Function %28
+               OpStore %arg_1 %uint_1
+         %24 = OpLoad %11 %arg_0
+         %25 = OpLoad %uint %arg_1
+         %22 = OpImageQuerySizeLod %v2int %24 %25
+               OpStore %res %22
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %29
+         %31 = OpLabel
+         %32 = OpFunctionCall %void %textureDimensions_4d42cf
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %34 = OpLabel
+         %35 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %35
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %38 = OpLabel
+         %39 = OpFunctionCall %void %textureDimensions_4d42cf
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %41 = OpLabel
+         %42 = OpFunctionCall %void %textureDimensions_4d42cf
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/4d42cf.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/4d42cf.wgsl.expected.wgsl
new file mode 100644
index 0000000..46f0072
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/4d42cf.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+@group(1) @binding(0) var arg_0 : texture_2d<i32>;
+
+fn textureDimensions_4d42cf() {
+  var arg_1 = 1u;
+  var res : vec2<i32> = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_4d42cf();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_4d42cf();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_4d42cf();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/5331e0.wgsl b/test/tint/builtins/gen/var/textureDimensions/5331e0.wgsl
new file mode 100644
index 0000000..f4fd35d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/5331e0.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_2d<f32>;
+
+// fn textureDimensions(texture: texture_2d<f32>, level: u32) -> vec2<i32>
+fn textureDimensions_5331e0() {
+  var arg_1 = 1u;
+  var res: vec2<i32> = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_5331e0();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_5331e0();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_5331e0();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/5331e0.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/5331e0.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..2a72144
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/5331e0.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture2D<float4> arg_0 : register(t0, space1);
+
+void textureDimensions_5331e0() {
+  uint arg_1 = 1u;
+  int3 tint_tmp;
+  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  int2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_5331e0();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_5331e0();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_5331e0();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/5331e0.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/5331e0.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..2a72144
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/5331e0.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture2D<float4> arg_0 : register(t0, space1);
+
+void textureDimensions_5331e0() {
+  uint arg_1 = 1u;
+  int3 tint_tmp;
+  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  int2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_5331e0();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_5331e0();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_5331e0();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/5331e0.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/5331e0.wgsl.expected.glsl
new file mode 100644
index 0000000..4d19c59
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/5331e0.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+
+uniform highp sampler2D arg_0_1;
+void textureDimensions_5331e0() {
+  uint arg_1 = 1u;
+  ivec2 res = textureSize(arg_0_1, int(arg_1));
+}
+
+vec4 vertex_main() {
+  textureDimensions_5331e0();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2D arg_0_1;
+void textureDimensions_5331e0() {
+  uint arg_1 = 1u;
+  ivec2 res = textureSize(arg_0_1, int(arg_1));
+}
+
+void fragment_main() {
+  textureDimensions_5331e0();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp sampler2D arg_0_1;
+void textureDimensions_5331e0() {
+  uint arg_1 = 1u;
+  ivec2 res = textureSize(arg_0_1, int(arg_1));
+}
+
+void compute_main() {
+  textureDimensions_5331e0();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/5331e0.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/5331e0.wgsl.expected.msl
new file mode 100644
index 0000000..4b62c26
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/5331e0.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_5331e0(texture2d<float, access::sample> tint_symbol_1) {
+  uint arg_1 = 1u;
+  int2 res = int2(tint_symbol_1.get_width(arg_1), tint_symbol_1.get_height(arg_1));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<float, access::sample> tint_symbol_2) {
+  textureDimensions_5331e0(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<float, access::sample> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<float, access::sample> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_5331e0(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d<float, access::sample> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_5331e0(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/5331e0.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/5331e0.wgsl.expected.spvasm
new file mode 100644
index 0000000..57f4f74
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/5331e0.wgsl.expected.spvasm
@@ -0,0 +1,83 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 43
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_5331e0 "textureDimensions_5331e0"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %12 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %20 = OpConstantNull %uint
+        %int = OpTypeInt 32 1
+      %v2int = OpTypeVector %int 2
+%_ptr_Function_v2int = OpTypePointer Function %v2int
+         %28 = OpConstantNull %v2int
+         %29 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_5331e0 = OpFunction %void None %12
+         %15 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_uint Function %20
+        %res = OpVariable %_ptr_Function_v2int Function %28
+               OpStore %arg_1 %uint_1
+         %24 = OpLoad %11 %arg_0
+         %25 = OpLoad %uint %arg_1
+         %21 = OpImageQuerySizeLod %v2int %24 %25
+               OpStore %res %21
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %29
+         %31 = OpLabel
+         %32 = OpFunctionCall %void %textureDimensions_5331e0
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+         %34 = OpLabel
+         %35 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %35
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+         %38 = OpLabel
+         %39 = OpFunctionCall %void %textureDimensions_5331e0
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %12
+         %41 = OpLabel
+         %42 = OpFunctionCall %void %textureDimensions_5331e0
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/5331e0.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/5331e0.wgsl.expected.wgsl
new file mode 100644
index 0000000..632c211
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/5331e0.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+@group(1) @binding(0) var arg_0 : texture_2d<f32>;
+
+fn textureDimensions_5331e0() {
+  var arg_1 = 1u;
+  var res : vec2<i32> = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_5331e0();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_5331e0();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_5331e0();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/647386.wgsl b/test/tint/builtins/gen/var/textureDimensions/647386.wgsl
new file mode 100644
index 0000000..aa317c2
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/647386.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_depth_cube;
+
+// fn textureDimensions(texture: texture_depth_cube, level: u32) -> vec2<i32>
+fn textureDimensions_647386() {
+  var arg_1 = 1u;
+  var res: vec2<i32> = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_647386();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_647386();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_647386();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/647386.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/647386.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..0c55003
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/647386.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+TextureCube arg_0 : register(t0, space1);
+
+void textureDimensions_647386() {
+  uint arg_1 = 1u;
+  int3 tint_tmp;
+  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  int2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_647386();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_647386();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_647386();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/647386.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/647386.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..0c55003
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/647386.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+TextureCube arg_0 : register(t0, space1);
+
+void textureDimensions_647386() {
+  uint arg_1 = 1u;
+  int3 tint_tmp;
+  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  int2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_647386();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_647386();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_647386();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/647386.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/647386.wgsl.expected.glsl
new file mode 100644
index 0000000..f8b6013
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/647386.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+
+uniform highp samplerCube arg_0_1;
+void textureDimensions_647386() {
+  uint arg_1 = 1u;
+  ivec2 res = textureSize(arg_0_1, int(arg_1));
+}
+
+vec4 vertex_main() {
+  textureDimensions_647386();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp samplerCube arg_0_1;
+void textureDimensions_647386() {
+  uint arg_1 = 1u;
+  ivec2 res = textureSize(arg_0_1, int(arg_1));
+}
+
+void fragment_main() {
+  textureDimensions_647386();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp samplerCube arg_0_1;
+void textureDimensions_647386() {
+  uint arg_1 = 1u;
+  ivec2 res = textureSize(arg_0_1, int(arg_1));
+}
+
+void compute_main() {
+  textureDimensions_647386();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/647386.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/647386.wgsl.expected.msl
new file mode 100644
index 0000000..c2d57d1
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/647386.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_647386(depthcube<float, access::sample> tint_symbol_1) {
+  uint arg_1 = 1u;
+  int2 res = int2(tint_symbol_1.get_width(arg_1), tint_symbol_1.get_height(arg_1));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(depthcube<float, access::sample> tint_symbol_2) {
+  textureDimensions_647386(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(depthcube<float, access::sample> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(depthcube<float, access::sample> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_647386(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(depthcube<float, access::sample> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_647386(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/647386.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/647386.wgsl.expected.spvasm
new file mode 100644
index 0000000..9421e4c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/647386.wgsl.expected.spvasm
@@ -0,0 +1,83 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 43
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_647386 "textureDimensions_647386"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float Cube 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %12 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %20 = OpConstantNull %uint
+        %int = OpTypeInt 32 1
+      %v2int = OpTypeVector %int 2
+%_ptr_Function_v2int = OpTypePointer Function %v2int
+         %28 = OpConstantNull %v2int
+         %29 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_647386 = OpFunction %void None %12
+         %15 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_uint Function %20
+        %res = OpVariable %_ptr_Function_v2int Function %28
+               OpStore %arg_1 %uint_1
+         %24 = OpLoad %11 %arg_0
+         %25 = OpLoad %uint %arg_1
+         %21 = OpImageQuerySizeLod %v2int %24 %25
+               OpStore %res %21
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %29
+         %31 = OpLabel
+         %32 = OpFunctionCall %void %textureDimensions_647386
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+         %34 = OpLabel
+         %35 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %35
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+         %38 = OpLabel
+         %39 = OpFunctionCall %void %textureDimensions_647386
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %12
+         %41 = OpLabel
+         %42 = OpFunctionCall %void %textureDimensions_647386
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/647386.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/647386.wgsl.expected.wgsl
new file mode 100644
index 0000000..291fd11
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/647386.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+@group(1) @binding(0) var arg_0 : texture_depth_cube;
+
+fn textureDimensions_647386() {
+  var arg_1 = 1u;
+  var res : vec2<i32> = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_647386();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_647386();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_647386();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/6eae7f.wgsl b/test/tint/builtins/gen/var/textureDimensions/6eae7f.wgsl
new file mode 100644
index 0000000..62b84fd
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/6eae7f.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_cube<i32>;
+
+// fn textureDimensions(texture: texture_cube<i32>, level: u32) -> vec2<i32>
+fn textureDimensions_6eae7f() {
+  var arg_1 = 1u;
+  var res: vec2<i32> = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_6eae7f();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_6eae7f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_6eae7f();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/6eae7f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/6eae7f.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..b39d4cc
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/6eae7f.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+TextureCube<int4> arg_0 : register(t0, space1);
+
+void textureDimensions_6eae7f() {
+  uint arg_1 = 1u;
+  int3 tint_tmp;
+  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  int2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_6eae7f();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_6eae7f();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_6eae7f();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/6eae7f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/6eae7f.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..b39d4cc
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/6eae7f.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+TextureCube<int4> arg_0 : register(t0, space1);
+
+void textureDimensions_6eae7f() {
+  uint arg_1 = 1u;
+  int3 tint_tmp;
+  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  int2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_6eae7f();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_6eae7f();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_6eae7f();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/6eae7f.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/6eae7f.wgsl.expected.glsl
new file mode 100644
index 0000000..d9dbf803
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/6eae7f.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+
+uniform highp isamplerCube arg_0_1;
+void textureDimensions_6eae7f() {
+  uint arg_1 = 1u;
+  ivec2 res = textureSize(arg_0_1, int(arg_1));
+}
+
+vec4 vertex_main() {
+  textureDimensions_6eae7f();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp isamplerCube arg_0_1;
+void textureDimensions_6eae7f() {
+  uint arg_1 = 1u;
+  ivec2 res = textureSize(arg_0_1, int(arg_1));
+}
+
+void fragment_main() {
+  textureDimensions_6eae7f();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp isamplerCube arg_0_1;
+void textureDimensions_6eae7f() {
+  uint arg_1 = 1u;
+  ivec2 res = textureSize(arg_0_1, int(arg_1));
+}
+
+void compute_main() {
+  textureDimensions_6eae7f();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/6eae7f.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/6eae7f.wgsl.expected.msl
new file mode 100644
index 0000000..7560fd6
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/6eae7f.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_6eae7f(texturecube<int, access::sample> tint_symbol_1) {
+  uint arg_1 = 1u;
+  int2 res = int2(tint_symbol_1.get_width(arg_1), tint_symbol_1.get_height(arg_1));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texturecube<int, access::sample> tint_symbol_2) {
+  textureDimensions_6eae7f(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texturecube<int, access::sample> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texturecube<int, access::sample> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_6eae7f(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texturecube<int, access::sample> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_6eae7f(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/6eae7f.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/6eae7f.wgsl.expected.spvasm
new file mode 100644
index 0000000..b794707
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/6eae7f.wgsl.expected.spvasm
@@ -0,0 +1,83 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 43
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_6eae7f "textureDimensions_6eae7f"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int Cube 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %21 = OpConstantNull %uint
+      %v2int = OpTypeVector %int 2
+%_ptr_Function_v2int = OpTypePointer Function %v2int
+         %28 = OpConstantNull %v2int
+         %29 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_6eae7f = OpFunction %void None %13
+         %16 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_uint Function %21
+        %res = OpVariable %_ptr_Function_v2int Function %28
+               OpStore %arg_1 %uint_1
+         %24 = OpLoad %11 %arg_0
+         %25 = OpLoad %uint %arg_1
+         %22 = OpImageQuerySizeLod %v2int %24 %25
+               OpStore %res %22
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %29
+         %31 = OpLabel
+         %32 = OpFunctionCall %void %textureDimensions_6eae7f
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %34 = OpLabel
+         %35 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %35
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %38 = OpLabel
+         %39 = OpFunctionCall %void %textureDimensions_6eae7f
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %41 = OpLabel
+         %42 = OpFunctionCall %void %textureDimensions_6eae7f
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/6eae7f.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/6eae7f.wgsl.expected.wgsl
new file mode 100644
index 0000000..8205d78
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/6eae7f.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+@group(1) @binding(0) var arg_0 : texture_cube<i32>;
+
+fn textureDimensions_6eae7f() {
+  var arg_1 = 1u;
+  var res : vec2<i32> = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_6eae7f();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_6eae7f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_6eae7f();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/71b9f4.wgsl b/test/tint/builtins/gen/var/textureDimensions/71b9f4.wgsl
new file mode 100644
index 0000000..623c316
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/71b9f4.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_3d<i32>;
+
+// fn textureDimensions(texture: texture_3d<i32>, level: u32) -> vec3<i32>
+fn textureDimensions_71b9f4() {
+  var arg_1 = 1u;
+  var res: vec3<i32> = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_71b9f4();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_71b9f4();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_71b9f4();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/71b9f4.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/71b9f4.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..407d300
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/71b9f4.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture3D<int4> arg_0 : register(t0, space1);
+
+void textureDimensions_71b9f4() {
+  uint arg_1 = 1u;
+  int4 tint_tmp;
+  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
+  int3 res = tint_tmp.xyz;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_71b9f4();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_71b9f4();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_71b9f4();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/71b9f4.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/71b9f4.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..407d300
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/71b9f4.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture3D<int4> arg_0 : register(t0, space1);
+
+void textureDimensions_71b9f4() {
+  uint arg_1 = 1u;
+  int4 tint_tmp;
+  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
+  int3 res = tint_tmp.xyz;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_71b9f4();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_71b9f4();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_71b9f4();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/71b9f4.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/71b9f4.wgsl.expected.glsl
new file mode 100644
index 0000000..6294f19
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/71b9f4.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+
+uniform highp isampler3D arg_0_1;
+void textureDimensions_71b9f4() {
+  uint arg_1 = 1u;
+  ivec3 res = textureSize(arg_0_1, int(arg_1));
+}
+
+vec4 vertex_main() {
+  textureDimensions_71b9f4();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp isampler3D arg_0_1;
+void textureDimensions_71b9f4() {
+  uint arg_1 = 1u;
+  ivec3 res = textureSize(arg_0_1, int(arg_1));
+}
+
+void fragment_main() {
+  textureDimensions_71b9f4();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp isampler3D arg_0_1;
+void textureDimensions_71b9f4() {
+  uint arg_1 = 1u;
+  ivec3 res = textureSize(arg_0_1, int(arg_1));
+}
+
+void compute_main() {
+  textureDimensions_71b9f4();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/71b9f4.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/71b9f4.wgsl.expected.msl
new file mode 100644
index 0000000..21a0b0a
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/71b9f4.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_71b9f4(texture3d<int, access::sample> tint_symbol_1) {
+  uint arg_1 = 1u;
+  int3 res = int3(tint_symbol_1.get_width(arg_1), tint_symbol_1.get_height(arg_1), tint_symbol_1.get_depth(arg_1));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<int, access::sample> tint_symbol_2) {
+  textureDimensions_71b9f4(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<int, access::sample> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture3d<int, access::sample> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_71b9f4(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture3d<int, access::sample> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_71b9f4(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/71b9f4.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/71b9f4.wgsl.expected.spvasm
new file mode 100644
index 0000000..d48fdbf
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/71b9f4.wgsl.expected.spvasm
@@ -0,0 +1,83 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 43
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_71b9f4 "textureDimensions_71b9f4"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 3D 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %21 = OpConstantNull %uint
+      %v3int = OpTypeVector %int 3
+%_ptr_Function_v3int = OpTypePointer Function %v3int
+         %28 = OpConstantNull %v3int
+         %29 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_71b9f4 = OpFunction %void None %13
+         %16 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_uint Function %21
+        %res = OpVariable %_ptr_Function_v3int Function %28
+               OpStore %arg_1 %uint_1
+         %24 = OpLoad %11 %arg_0
+         %25 = OpLoad %uint %arg_1
+         %22 = OpImageQuerySizeLod %v3int %24 %25
+               OpStore %res %22
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %29
+         %31 = OpLabel
+         %32 = OpFunctionCall %void %textureDimensions_71b9f4
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %34 = OpLabel
+         %35 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %35
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %38 = OpLabel
+         %39 = OpFunctionCall %void %textureDimensions_71b9f4
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %41 = OpLabel
+         %42 = OpFunctionCall %void %textureDimensions_71b9f4
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/71b9f4.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/71b9f4.wgsl.expected.wgsl
new file mode 100644
index 0000000..816599d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/71b9f4.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+@group(1) @binding(0) var arg_0 : texture_3d<i32>;
+
+fn textureDimensions_71b9f4() {
+  var arg_1 = 1u;
+  var res : vec3<i32> = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_71b9f4();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_71b9f4();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_71b9f4();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/7c8821.wgsl b/test/tint/builtins/gen/var/textureDimensions/7c8821.wgsl
new file mode 100644
index 0000000..1ced4d8
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/7c8821.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_2d_array<i32>;
+
+// fn textureDimensions(texture: texture_2d_array<i32>, level: u32) -> vec2<i32>
+fn textureDimensions_7c8821() {
+  var arg_1 = 1u;
+  var res: vec2<i32> = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_7c8821();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_7c8821();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_7c8821();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/7c8821.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/7c8821.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..f7ce2e2
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/7c8821.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture2DArray<int4> arg_0 : register(t0, space1);
+
+void textureDimensions_7c8821() {
+  uint arg_1 = 1u;
+  int4 tint_tmp;
+  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
+  int2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_7c8821();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_7c8821();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_7c8821();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/7c8821.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/7c8821.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..f7ce2e2
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/7c8821.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture2DArray<int4> arg_0 : register(t0, space1);
+
+void textureDimensions_7c8821() {
+  uint arg_1 = 1u;
+  int4 tint_tmp;
+  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
+  int2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_7c8821();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_7c8821();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_7c8821();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/7c8821.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/7c8821.wgsl.expected.glsl
new file mode 100644
index 0000000..bbb0144
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/7c8821.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+
+uniform highp isampler2DArray arg_0_1;
+void textureDimensions_7c8821() {
+  uint arg_1 = 1u;
+  ivec2 res = textureSize(arg_0_1, int(arg_1)).xy;
+}
+
+vec4 vertex_main() {
+  textureDimensions_7c8821();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp isampler2DArray arg_0_1;
+void textureDimensions_7c8821() {
+  uint arg_1 = 1u;
+  ivec2 res = textureSize(arg_0_1, int(arg_1)).xy;
+}
+
+void fragment_main() {
+  textureDimensions_7c8821();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp isampler2DArray arg_0_1;
+void textureDimensions_7c8821() {
+  uint arg_1 = 1u;
+  ivec2 res = textureSize(arg_0_1, int(arg_1)).xy;
+}
+
+void compute_main() {
+  textureDimensions_7c8821();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/7c8821.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/7c8821.wgsl.expected.msl
new file mode 100644
index 0000000..e8839a3
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/7c8821.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_7c8821(texture2d_array<int, access::sample> tint_symbol_1) {
+  uint arg_1 = 1u;
+  int2 res = int2(tint_symbol_1.get_width(arg_1), tint_symbol_1.get_height(arg_1));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<int, access::sample> tint_symbol_2) {
+  textureDimensions_7c8821(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<int, access::sample> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<int, access::sample> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_7c8821(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d_array<int, access::sample> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_7c8821(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/7c8821.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/7c8821.wgsl.expected.spvasm
new file mode 100644
index 0000000..33509d2
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/7c8821.wgsl.expected.spvasm
@@ -0,0 +1,85 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 45
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_7c8821 "textureDimensions_7c8821"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %21 = OpConstantNull %uint
+      %v2int = OpTypeVector %int 2
+      %v3int = OpTypeVector %int 3
+%_ptr_Function_v2int = OpTypePointer Function %v2int
+         %30 = OpConstantNull %v2int
+         %31 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_7c8821 = OpFunction %void None %13
+         %16 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_uint Function %21
+        %res = OpVariable %_ptr_Function_v2int Function %30
+               OpStore %arg_1 %uint_1
+         %26 = OpLoad %11 %arg_0
+         %27 = OpLoad %uint %arg_1
+         %24 = OpImageQuerySizeLod %v3int %26 %27
+         %22 = OpVectorShuffle %v2int %24 %24 0 1
+               OpStore %res %22
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %31
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %textureDimensions_7c8821
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %36 = OpLabel
+         %37 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %37
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %textureDimensions_7c8821
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %43 = OpLabel
+         %44 = OpFunctionCall %void %textureDimensions_7c8821
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/7c8821.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/7c8821.wgsl.expected.wgsl
new file mode 100644
index 0000000..9baa51c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/7c8821.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+@group(1) @binding(0) var arg_0 : texture_2d_array<i32>;
+
+fn textureDimensions_7c8821() {
+  var arg_1 = 1u;
+  var res : vec2<i32> = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_7c8821();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_7c8821();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_7c8821();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/8d87ed.wgsl b/test/tint/builtins/gen/var/textureDimensions/8d87ed.wgsl
new file mode 100644
index 0000000..3ea127b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/8d87ed.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_cube<u32>;
+
+// fn textureDimensions(texture: texture_cube<u32>, level: u32) -> vec2<i32>
+fn textureDimensions_8d87ed() {
+  var arg_1 = 1u;
+  var res: vec2<i32> = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_8d87ed();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_8d87ed();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_8d87ed();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/8d87ed.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/8d87ed.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..29572e5
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/8d87ed.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+TextureCube<uint4> arg_0 : register(t0, space1);
+
+void textureDimensions_8d87ed() {
+  uint arg_1 = 1u;
+  int3 tint_tmp;
+  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  int2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_8d87ed();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_8d87ed();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_8d87ed();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/8d87ed.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/8d87ed.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..29572e5
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/8d87ed.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+TextureCube<uint4> arg_0 : register(t0, space1);
+
+void textureDimensions_8d87ed() {
+  uint arg_1 = 1u;
+  int3 tint_tmp;
+  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  int2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_8d87ed();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_8d87ed();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_8d87ed();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/8d87ed.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/8d87ed.wgsl.expected.glsl
new file mode 100644
index 0000000..bbfcd7a
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/8d87ed.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+
+uniform highp usamplerCube arg_0_1;
+void textureDimensions_8d87ed() {
+  uint arg_1 = 1u;
+  ivec2 res = textureSize(arg_0_1, int(arg_1));
+}
+
+vec4 vertex_main() {
+  textureDimensions_8d87ed();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp usamplerCube arg_0_1;
+void textureDimensions_8d87ed() {
+  uint arg_1 = 1u;
+  ivec2 res = textureSize(arg_0_1, int(arg_1));
+}
+
+void fragment_main() {
+  textureDimensions_8d87ed();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp usamplerCube arg_0_1;
+void textureDimensions_8d87ed() {
+  uint arg_1 = 1u;
+  ivec2 res = textureSize(arg_0_1, int(arg_1));
+}
+
+void compute_main() {
+  textureDimensions_8d87ed();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/8d87ed.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/8d87ed.wgsl.expected.msl
new file mode 100644
index 0000000..9569829
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/8d87ed.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_8d87ed(texturecube<uint, access::sample> tint_symbol_1) {
+  uint arg_1 = 1u;
+  int2 res = int2(tint_symbol_1.get_width(arg_1), tint_symbol_1.get_height(arg_1));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texturecube<uint, access::sample> tint_symbol_2) {
+  textureDimensions_8d87ed(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texturecube<uint, access::sample> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texturecube<uint, access::sample> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_8d87ed(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texturecube<uint, access::sample> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_8d87ed(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/8d87ed.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/8d87ed.wgsl.expected.spvasm
new file mode 100644
index 0000000..d8f2408
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/8d87ed.wgsl.expected.spvasm
@@ -0,0 +1,83 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 43
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_8d87ed "textureDimensions_8d87ed"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint Cube 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %20 = OpConstantNull %uint
+        %int = OpTypeInt 32 1
+      %v2int = OpTypeVector %int 2
+%_ptr_Function_v2int = OpTypePointer Function %v2int
+         %28 = OpConstantNull %v2int
+         %29 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_8d87ed = OpFunction %void None %13
+         %16 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_uint Function %20
+        %res = OpVariable %_ptr_Function_v2int Function %28
+               OpStore %arg_1 %uint_1
+         %24 = OpLoad %11 %arg_0
+         %25 = OpLoad %uint %arg_1
+         %21 = OpImageQuerySizeLod %v2int %24 %25
+               OpStore %res %21
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %29
+         %31 = OpLabel
+         %32 = OpFunctionCall %void %textureDimensions_8d87ed
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %34 = OpLabel
+         %35 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %35
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %38 = OpLabel
+         %39 = OpFunctionCall %void %textureDimensions_8d87ed
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %41 = OpLabel
+         %42 = OpFunctionCall %void %textureDimensions_8d87ed
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/8d87ed.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/8d87ed.wgsl.expected.wgsl
new file mode 100644
index 0000000..8b60de3
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/8d87ed.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+@group(1) @binding(0) var arg_0 : texture_cube<u32>;
+
+fn textureDimensions_8d87ed() {
+  var arg_1 = 1u;
+  var res : vec2<i32> = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_8d87ed();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_8d87ed();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_8d87ed();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/941d6e.wgsl b/test/tint/builtins/gen/var/textureDimensions/941d6e.wgsl
new file mode 100644
index 0000000..55c8637
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/941d6e.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_depth_2d;
+
+// fn textureDimensions(texture: texture_depth_2d, level: u32) -> vec2<i32>
+fn textureDimensions_941d6e() {
+  var arg_1 = 1u;
+  var res: vec2<i32> = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_941d6e();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_941d6e();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_941d6e();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/941d6e.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/941d6e.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..3288317
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/941d6e.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture2D arg_0 : register(t0, space1);
+
+void textureDimensions_941d6e() {
+  uint arg_1 = 1u;
+  int3 tint_tmp;
+  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  int2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_941d6e();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_941d6e();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_941d6e();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/941d6e.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/941d6e.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..3288317
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/941d6e.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture2D arg_0 : register(t0, space1);
+
+void textureDimensions_941d6e() {
+  uint arg_1 = 1u;
+  int3 tint_tmp;
+  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  int2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_941d6e();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_941d6e();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_941d6e();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/941d6e.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/941d6e.wgsl.expected.glsl
new file mode 100644
index 0000000..596c594
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/941d6e.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+
+uniform highp sampler2D arg_0_1;
+void textureDimensions_941d6e() {
+  uint arg_1 = 1u;
+  ivec2 res = textureSize(arg_0_1, int(arg_1));
+}
+
+vec4 vertex_main() {
+  textureDimensions_941d6e();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2D arg_0_1;
+void textureDimensions_941d6e() {
+  uint arg_1 = 1u;
+  ivec2 res = textureSize(arg_0_1, int(arg_1));
+}
+
+void fragment_main() {
+  textureDimensions_941d6e();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp sampler2D arg_0_1;
+void textureDimensions_941d6e() {
+  uint arg_1 = 1u;
+  ivec2 res = textureSize(arg_0_1, int(arg_1));
+}
+
+void compute_main() {
+  textureDimensions_941d6e();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/941d6e.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/941d6e.wgsl.expected.msl
new file mode 100644
index 0000000..23a2e59
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/941d6e.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_941d6e(depth2d<float, access::sample> tint_symbol_1) {
+  uint arg_1 = 1u;
+  int2 res = int2(tint_symbol_1.get_width(arg_1), tint_symbol_1.get_height(arg_1));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(depth2d<float, access::sample> tint_symbol_2) {
+  textureDimensions_941d6e(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(depth2d<float, access::sample> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(depth2d<float, access::sample> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_941d6e(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(depth2d<float, access::sample> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_941d6e(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/941d6e.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/941d6e.wgsl.expected.spvasm
new file mode 100644
index 0000000..3742022
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/941d6e.wgsl.expected.spvasm
@@ -0,0 +1,83 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 43
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_941d6e "textureDimensions_941d6e"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %12 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %20 = OpConstantNull %uint
+        %int = OpTypeInt 32 1
+      %v2int = OpTypeVector %int 2
+%_ptr_Function_v2int = OpTypePointer Function %v2int
+         %28 = OpConstantNull %v2int
+         %29 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_941d6e = OpFunction %void None %12
+         %15 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_uint Function %20
+        %res = OpVariable %_ptr_Function_v2int Function %28
+               OpStore %arg_1 %uint_1
+         %24 = OpLoad %11 %arg_0
+         %25 = OpLoad %uint %arg_1
+         %21 = OpImageQuerySizeLod %v2int %24 %25
+               OpStore %res %21
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %29
+         %31 = OpLabel
+         %32 = OpFunctionCall %void %textureDimensions_941d6e
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+         %34 = OpLabel
+         %35 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %35
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+         %38 = OpLabel
+         %39 = OpFunctionCall %void %textureDimensions_941d6e
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %12
+         %41 = OpLabel
+         %42 = OpFunctionCall %void %textureDimensions_941d6e
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/941d6e.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/941d6e.wgsl.expected.wgsl
new file mode 100644
index 0000000..28c022e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/941d6e.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+@group(1) @binding(0) var arg_0 : texture_depth_2d;
+
+fn textureDimensions_941d6e() {
+  var arg_1 = 1u;
+  var res : vec2<i32> = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_941d6e();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_941d6e();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_941d6e();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/95b2db.wgsl b/test/tint/builtins/gen/var/textureDimensions/95b2db.wgsl
new file mode 100644
index 0000000..f13a2e0
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/95b2db.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_cube<f32>;
+
+// fn textureDimensions(texture: texture_cube<f32>, level: u32) -> vec2<i32>
+fn textureDimensions_95b2db() {
+  var arg_1 = 1u;
+  var res: vec2<i32> = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_95b2db();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_95b2db();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_95b2db();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/95b2db.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/95b2db.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..08889aa
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/95b2db.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+TextureCube<float4> arg_0 : register(t0, space1);
+
+void textureDimensions_95b2db() {
+  uint arg_1 = 1u;
+  int3 tint_tmp;
+  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  int2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_95b2db();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_95b2db();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_95b2db();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/95b2db.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/95b2db.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..08889aa
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/95b2db.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+TextureCube<float4> arg_0 : register(t0, space1);
+
+void textureDimensions_95b2db() {
+  uint arg_1 = 1u;
+  int3 tint_tmp;
+  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  int2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_95b2db();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_95b2db();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_95b2db();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/95b2db.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/95b2db.wgsl.expected.glsl
new file mode 100644
index 0000000..6fe419a
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/95b2db.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+
+uniform highp samplerCube arg_0_1;
+void textureDimensions_95b2db() {
+  uint arg_1 = 1u;
+  ivec2 res = textureSize(arg_0_1, int(arg_1));
+}
+
+vec4 vertex_main() {
+  textureDimensions_95b2db();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp samplerCube arg_0_1;
+void textureDimensions_95b2db() {
+  uint arg_1 = 1u;
+  ivec2 res = textureSize(arg_0_1, int(arg_1));
+}
+
+void fragment_main() {
+  textureDimensions_95b2db();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp samplerCube arg_0_1;
+void textureDimensions_95b2db() {
+  uint arg_1 = 1u;
+  ivec2 res = textureSize(arg_0_1, int(arg_1));
+}
+
+void compute_main() {
+  textureDimensions_95b2db();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/95b2db.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/95b2db.wgsl.expected.msl
new file mode 100644
index 0000000..da2b344
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/95b2db.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_95b2db(texturecube<float, access::sample> tint_symbol_1) {
+  uint arg_1 = 1u;
+  int2 res = int2(tint_symbol_1.get_width(arg_1), tint_symbol_1.get_height(arg_1));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texturecube<float, access::sample> tint_symbol_2) {
+  textureDimensions_95b2db(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texturecube<float, access::sample> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texturecube<float, access::sample> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_95b2db(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texturecube<float, access::sample> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_95b2db(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/95b2db.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/95b2db.wgsl.expected.spvasm
new file mode 100644
index 0000000..bd03b31
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/95b2db.wgsl.expected.spvasm
@@ -0,0 +1,83 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 43
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_95b2db "textureDimensions_95b2db"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float Cube 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %12 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %20 = OpConstantNull %uint
+        %int = OpTypeInt 32 1
+      %v2int = OpTypeVector %int 2
+%_ptr_Function_v2int = OpTypePointer Function %v2int
+         %28 = OpConstantNull %v2int
+         %29 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_95b2db = OpFunction %void None %12
+         %15 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_uint Function %20
+        %res = OpVariable %_ptr_Function_v2int Function %28
+               OpStore %arg_1 %uint_1
+         %24 = OpLoad %11 %arg_0
+         %25 = OpLoad %uint %arg_1
+         %21 = OpImageQuerySizeLod %v2int %24 %25
+               OpStore %res %21
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %29
+         %31 = OpLabel
+         %32 = OpFunctionCall %void %textureDimensions_95b2db
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+         %34 = OpLabel
+         %35 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %35
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+         %38 = OpLabel
+         %39 = OpFunctionCall %void %textureDimensions_95b2db
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %12
+         %41 = OpLabel
+         %42 = OpFunctionCall %void %textureDimensions_95b2db
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/95b2db.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/95b2db.wgsl.expected.wgsl
new file mode 100644
index 0000000..401bfba
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/95b2db.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+@group(1) @binding(0) var arg_0 : texture_cube<f32>;
+
+fn textureDimensions_95b2db() {
+  var arg_1 = 1u;
+  var res : vec2<i32> = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_95b2db();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_95b2db();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_95b2db();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/d1a23d.wgsl b/test/tint/builtins/gen/var/textureDimensions/d1a23d.wgsl
new file mode 100644
index 0000000..a82b951
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/d1a23d.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_depth_cube_array;
+
+// fn textureDimensions(texture: texture_depth_cube_array, level: u32) -> vec2<i32>
+fn textureDimensions_d1a23d() {
+  var arg_1 = 1u;
+  var res: vec2<i32> = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_d1a23d();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_d1a23d();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_d1a23d();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/d1a23d.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/d1a23d.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..5d05a16
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/d1a23d.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+TextureCubeArray arg_0 : register(t0, space1);
+
+void textureDimensions_d1a23d() {
+  uint arg_1 = 1u;
+  int4 tint_tmp;
+  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
+  int2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_d1a23d();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_d1a23d();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_d1a23d();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/d1a23d.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/d1a23d.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..5d05a16
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/d1a23d.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+TextureCubeArray arg_0 : register(t0, space1);
+
+void textureDimensions_d1a23d() {
+  uint arg_1 = 1u;
+  int4 tint_tmp;
+  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
+  int2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_d1a23d();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_d1a23d();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_d1a23d();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/d1a23d.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/d1a23d.wgsl.expected.glsl
new file mode 100644
index 0000000..acd0609
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/d1a23d.wgsl.expected.glsl
@@ -0,0 +1,78 @@
+SKIP: FAILED
+
+#version 310 es
+
+uniform highp samplerCubeArray arg_0_1;
+void textureDimensions_d1a23d() {
+  uint arg_1 = 1u;
+  ivec2 res = textureSize(arg_0_1, int(arg_1)).xy;
+}
+
+vec4 vertex_main() {
+  textureDimensions_d1a23d();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'samplerCubeArray' : Reserved word. 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+uniform highp samplerCubeArray arg_0_1;
+void textureDimensions_d1a23d() {
+  uint arg_1 = 1u;
+  ivec2 res = textureSize(arg_0_1, int(arg_1)).xy;
+}
+
+void fragment_main() {
+  textureDimensions_d1a23d();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'samplerCubeArray' : Reserved word. 
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+uniform highp samplerCubeArray arg_0_1;
+void textureDimensions_d1a23d() {
+  uint arg_1 = 1u;
+  ivec2 res = textureSize(arg_0_1, int(arg_1)).xy;
+}
+
+void compute_main() {
+  textureDimensions_d1a23d();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'samplerCubeArray' : Reserved word. 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/d1a23d.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/d1a23d.wgsl.expected.msl
new file mode 100644
index 0000000..d24c988
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/d1a23d.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_d1a23d(depthcube_array<float, access::sample> tint_symbol_1) {
+  uint arg_1 = 1u;
+  int2 res = int2(tint_symbol_1.get_width(arg_1), tint_symbol_1.get_height(arg_1));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(depthcube_array<float, access::sample> tint_symbol_2) {
+  textureDimensions_d1a23d(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(depthcube_array<float, access::sample> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(depthcube_array<float, access::sample> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_d1a23d(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(depthcube_array<float, access::sample> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_d1a23d(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/d1a23d.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/d1a23d.wgsl.expected.spvasm
new file mode 100644
index 0000000..ea98181
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/d1a23d.wgsl.expected.spvasm
@@ -0,0 +1,86 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 45
+; Schema: 0
+               OpCapability Shader
+               OpCapability SampledCubeArray
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_d1a23d "textureDimensions_d1a23d"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float Cube 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %12 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %20 = OpConstantNull %uint
+        %int = OpTypeInt 32 1
+      %v2int = OpTypeVector %int 2
+      %v3int = OpTypeVector %int 3
+%_ptr_Function_v2int = OpTypePointer Function %v2int
+         %30 = OpConstantNull %v2int
+         %31 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_d1a23d = OpFunction %void None %12
+         %15 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_uint Function %20
+        %res = OpVariable %_ptr_Function_v2int Function %30
+               OpStore %arg_1 %uint_1
+         %26 = OpLoad %11 %arg_0
+         %27 = OpLoad %uint %arg_1
+         %24 = OpImageQuerySizeLod %v3int %26 %27
+         %21 = OpVectorShuffle %v2int %24 %24 0 1
+               OpStore %res %21
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %31
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %textureDimensions_d1a23d
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+         %36 = OpLabel
+         %37 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %37
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %textureDimensions_d1a23d
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %12
+         %43 = OpLabel
+         %44 = OpFunctionCall %void %textureDimensions_d1a23d
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/d1a23d.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/d1a23d.wgsl.expected.wgsl
new file mode 100644
index 0000000..291f42f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/d1a23d.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+@group(1) @binding(0) var arg_0 : texture_depth_cube_array;
+
+fn textureDimensions_d1a23d() {
+  var arg_1 = 1u;
+  var res : vec2<i32> = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_d1a23d();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_d1a23d();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_d1a23d();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/dc7798.wgsl b/test/tint/builtins/gen/var/textureDimensions/dc7798.wgsl
new file mode 100644
index 0000000..c027716
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/dc7798.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_2d_array<u32>;
+
+// fn textureDimensions(texture: texture_2d_array<u32>, level: u32) -> vec2<i32>
+fn textureDimensions_dc7798() {
+  var arg_1 = 1u;
+  var res: vec2<i32> = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_dc7798();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_dc7798();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_dc7798();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/dc7798.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/dc7798.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..b1b5d48
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/dc7798.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture2DArray<uint4> arg_0 : register(t0, space1);
+
+void textureDimensions_dc7798() {
+  uint arg_1 = 1u;
+  int4 tint_tmp;
+  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
+  int2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_dc7798();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_dc7798();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_dc7798();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/dc7798.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/dc7798.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..b1b5d48
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/dc7798.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture2DArray<uint4> arg_0 : register(t0, space1);
+
+void textureDimensions_dc7798() {
+  uint arg_1 = 1u;
+  int4 tint_tmp;
+  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
+  int2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_dc7798();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_dc7798();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_dc7798();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/dc7798.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/dc7798.wgsl.expected.glsl
new file mode 100644
index 0000000..030e852
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/dc7798.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+
+uniform highp usampler2DArray arg_0_1;
+void textureDimensions_dc7798() {
+  uint arg_1 = 1u;
+  ivec2 res = textureSize(arg_0_1, int(arg_1)).xy;
+}
+
+vec4 vertex_main() {
+  textureDimensions_dc7798();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp usampler2DArray arg_0_1;
+void textureDimensions_dc7798() {
+  uint arg_1 = 1u;
+  ivec2 res = textureSize(arg_0_1, int(arg_1)).xy;
+}
+
+void fragment_main() {
+  textureDimensions_dc7798();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp usampler2DArray arg_0_1;
+void textureDimensions_dc7798() {
+  uint arg_1 = 1u;
+  ivec2 res = textureSize(arg_0_1, int(arg_1)).xy;
+}
+
+void compute_main() {
+  textureDimensions_dc7798();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/dc7798.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/dc7798.wgsl.expected.msl
new file mode 100644
index 0000000..7b30672
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/dc7798.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_dc7798(texture2d_array<uint, access::sample> tint_symbol_1) {
+  uint arg_1 = 1u;
+  int2 res = int2(tint_symbol_1.get_width(arg_1), tint_symbol_1.get_height(arg_1));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<uint, access::sample> tint_symbol_2) {
+  textureDimensions_dc7798(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<uint, access::sample> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<uint, access::sample> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_dc7798(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d_array<uint, access::sample> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_dc7798(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/dc7798.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/dc7798.wgsl.expected.spvasm
new file mode 100644
index 0000000..433c03e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/dc7798.wgsl.expected.spvasm
@@ -0,0 +1,85 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 45
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_dc7798 "textureDimensions_dc7798"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %20 = OpConstantNull %uint
+        %int = OpTypeInt 32 1
+      %v2int = OpTypeVector %int 2
+      %v3int = OpTypeVector %int 3
+%_ptr_Function_v2int = OpTypePointer Function %v2int
+         %30 = OpConstantNull %v2int
+         %31 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_dc7798 = OpFunction %void None %13
+         %16 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_uint Function %20
+        %res = OpVariable %_ptr_Function_v2int Function %30
+               OpStore %arg_1 %uint_1
+         %26 = OpLoad %11 %arg_0
+         %27 = OpLoad %uint %arg_1
+         %24 = OpImageQuerySizeLod %v3int %26 %27
+         %21 = OpVectorShuffle %v2int %24 %24 0 1
+               OpStore %res %21
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %31
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %textureDimensions_dc7798
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %36 = OpLabel
+         %37 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %37
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %textureDimensions_dc7798
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %43 = OpLabel
+         %44 = OpFunctionCall %void %textureDimensions_dc7798
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/dc7798.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/dc7798.wgsl.expected.wgsl
new file mode 100644
index 0000000..f584475
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/dc7798.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+@group(1) @binding(0) var arg_0 : texture_2d_array<u32>;
+
+fn textureDimensions_dc7798() {
+  var arg_1 = 1u;
+  var res : vec2<i32> = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_dc7798();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_dc7798();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_dc7798();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/e17db8.wgsl b/test/tint/builtins/gen/var/textureDimensions/e17db8.wgsl
new file mode 100644
index 0000000..6f4b6a7
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/e17db8.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_cube_array<u32>;
+
+// fn textureDimensions(texture: texture_cube_array<u32>, level: u32) -> vec2<i32>
+fn textureDimensions_e17db8() {
+  var arg_1 = 1u;
+  var res: vec2<i32> = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_e17db8();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_e17db8();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_e17db8();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/e17db8.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/e17db8.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..dbcc16e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/e17db8.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+TextureCubeArray<uint4> arg_0 : register(t0, space1);
+
+void textureDimensions_e17db8() {
+  uint arg_1 = 1u;
+  int4 tint_tmp;
+  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
+  int2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_e17db8();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_e17db8();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_e17db8();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/e17db8.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/e17db8.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..dbcc16e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/e17db8.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+TextureCubeArray<uint4> arg_0 : register(t0, space1);
+
+void textureDimensions_e17db8() {
+  uint arg_1 = 1u;
+  int4 tint_tmp;
+  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
+  int2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_e17db8();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_e17db8();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_e17db8();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/e17db8.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/e17db8.wgsl.expected.glsl
new file mode 100644
index 0000000..bf89199
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/e17db8.wgsl.expected.glsl
@@ -0,0 +1,78 @@
+SKIP: FAILED
+
+#version 310 es
+
+uniform highp usamplerCubeArray arg_0_1;
+void textureDimensions_e17db8() {
+  uint arg_1 = 1u;
+  ivec2 res = textureSize(arg_0_1, int(arg_1)).xy;
+}
+
+vec4 vertex_main() {
+  textureDimensions_e17db8();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'usamplerCubeArray' : Reserved word. 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+uniform highp usamplerCubeArray arg_0_1;
+void textureDimensions_e17db8() {
+  uint arg_1 = 1u;
+  ivec2 res = textureSize(arg_0_1, int(arg_1)).xy;
+}
+
+void fragment_main() {
+  textureDimensions_e17db8();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'usamplerCubeArray' : Reserved word. 
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+uniform highp usamplerCubeArray arg_0_1;
+void textureDimensions_e17db8() {
+  uint arg_1 = 1u;
+  ivec2 res = textureSize(arg_0_1, int(arg_1)).xy;
+}
+
+void compute_main() {
+  textureDimensions_e17db8();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'usamplerCubeArray' : Reserved word. 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/e17db8.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/e17db8.wgsl.expected.msl
new file mode 100644
index 0000000..e6437ed
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/e17db8.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_e17db8(texturecube_array<uint, access::sample> tint_symbol_1) {
+  uint arg_1 = 1u;
+  int2 res = int2(tint_symbol_1.get_width(arg_1), tint_symbol_1.get_height(arg_1));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texturecube_array<uint, access::sample> tint_symbol_2) {
+  textureDimensions_e17db8(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texturecube_array<uint, access::sample> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texturecube_array<uint, access::sample> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_e17db8(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texturecube_array<uint, access::sample> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_e17db8(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/e17db8.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/e17db8.wgsl.expected.spvasm
new file mode 100644
index 0000000..a04c591
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/e17db8.wgsl.expected.spvasm
@@ -0,0 +1,86 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 45
+; Schema: 0
+               OpCapability Shader
+               OpCapability SampledCubeArray
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_e17db8 "textureDimensions_e17db8"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint Cube 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %20 = OpConstantNull %uint
+        %int = OpTypeInt 32 1
+      %v2int = OpTypeVector %int 2
+      %v3int = OpTypeVector %int 3
+%_ptr_Function_v2int = OpTypePointer Function %v2int
+         %30 = OpConstantNull %v2int
+         %31 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_e17db8 = OpFunction %void None %13
+         %16 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_uint Function %20
+        %res = OpVariable %_ptr_Function_v2int Function %30
+               OpStore %arg_1 %uint_1
+         %26 = OpLoad %11 %arg_0
+         %27 = OpLoad %uint %arg_1
+         %24 = OpImageQuerySizeLod %v3int %26 %27
+         %21 = OpVectorShuffle %v2int %24 %24 0 1
+               OpStore %res %21
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %31
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %textureDimensions_e17db8
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %36 = OpLabel
+         %37 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %37
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %textureDimensions_e17db8
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %43 = OpLabel
+         %44 = OpFunctionCall %void %textureDimensions_e17db8
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/e17db8.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/e17db8.wgsl.expected.wgsl
new file mode 100644
index 0000000..b1a7a1b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/e17db8.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+@group(1) @binding(0) var arg_0 : texture_cube_array<u32>;
+
+fn textureDimensions_e17db8() {
+  var arg_1 = 1u;
+  var res : vec2<i32> = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_e17db8();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_e17db8();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_e17db8();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/f32242.wgsl b/test/tint/builtins/gen/var/textureDimensions/f32242.wgsl
new file mode 100644
index 0000000..08e0d0c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/f32242.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_3d<u32>;
+
+// fn textureDimensions(texture: texture_3d<u32>, level: u32) -> vec3<i32>
+fn textureDimensions_f32242() {
+  var arg_1 = 1u;
+  var res: vec3<i32> = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_f32242();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_f32242();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_f32242();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/f32242.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/f32242.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..bf7de13
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/f32242.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture3D<uint4> arg_0 : register(t0, space1);
+
+void textureDimensions_f32242() {
+  uint arg_1 = 1u;
+  int4 tint_tmp;
+  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
+  int3 res = tint_tmp.xyz;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_f32242();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_f32242();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_f32242();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/f32242.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/f32242.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..bf7de13
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/f32242.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture3D<uint4> arg_0 : register(t0, space1);
+
+void textureDimensions_f32242() {
+  uint arg_1 = 1u;
+  int4 tint_tmp;
+  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
+  int3 res = tint_tmp.xyz;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_f32242();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_f32242();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_f32242();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/f32242.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/f32242.wgsl.expected.glsl
new file mode 100644
index 0000000..85cceb2
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/f32242.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+
+uniform highp usampler3D arg_0_1;
+void textureDimensions_f32242() {
+  uint arg_1 = 1u;
+  ivec3 res = textureSize(arg_0_1, int(arg_1));
+}
+
+vec4 vertex_main() {
+  textureDimensions_f32242();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp usampler3D arg_0_1;
+void textureDimensions_f32242() {
+  uint arg_1 = 1u;
+  ivec3 res = textureSize(arg_0_1, int(arg_1));
+}
+
+void fragment_main() {
+  textureDimensions_f32242();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp usampler3D arg_0_1;
+void textureDimensions_f32242() {
+  uint arg_1 = 1u;
+  ivec3 res = textureSize(arg_0_1, int(arg_1));
+}
+
+void compute_main() {
+  textureDimensions_f32242();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/f32242.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/f32242.wgsl.expected.msl
new file mode 100644
index 0000000..77b6336
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/f32242.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_f32242(texture3d<uint, access::sample> tint_symbol_1) {
+  uint arg_1 = 1u;
+  int3 res = int3(tint_symbol_1.get_width(arg_1), tint_symbol_1.get_height(arg_1), tint_symbol_1.get_depth(arg_1));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<uint, access::sample> tint_symbol_2) {
+  textureDimensions_f32242(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<uint, access::sample> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture3d<uint, access::sample> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_f32242(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture3d<uint, access::sample> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_f32242(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/f32242.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/f32242.wgsl.expected.spvasm
new file mode 100644
index 0000000..614e908
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/f32242.wgsl.expected.spvasm
@@ -0,0 +1,83 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 43
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_f32242 "textureDimensions_f32242"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 3D 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %20 = OpConstantNull %uint
+        %int = OpTypeInt 32 1
+      %v3int = OpTypeVector %int 3
+%_ptr_Function_v3int = OpTypePointer Function %v3int
+         %28 = OpConstantNull %v3int
+         %29 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_f32242 = OpFunction %void None %13
+         %16 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_uint Function %20
+        %res = OpVariable %_ptr_Function_v3int Function %28
+               OpStore %arg_1 %uint_1
+         %24 = OpLoad %11 %arg_0
+         %25 = OpLoad %uint %arg_1
+         %21 = OpImageQuerySizeLod %v3int %24 %25
+               OpStore %res %21
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %29
+         %31 = OpLabel
+         %32 = OpFunctionCall %void %textureDimensions_f32242
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %34 = OpLabel
+         %35 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %35
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %38 = OpLabel
+         %39 = OpFunctionCall %void %textureDimensions_f32242
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %41 = OpLabel
+         %42 = OpFunctionCall %void %textureDimensions_f32242
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/f32242.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/f32242.wgsl.expected.wgsl
new file mode 100644
index 0000000..a9d3ca1
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/f32242.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+@group(1) @binding(0) var arg_0 : texture_3d<u32>;
+
+fn textureDimensions_f32242() {
+  var arg_1 = 1u;
+  var res : vec3<i32> = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_f32242();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_f32242();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_f32242();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/fbdfb6.wgsl b/test/tint/builtins/gen/var/textureDimensions/fbdfb6.wgsl
new file mode 100644
index 0000000..31013b6
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/fbdfb6.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_3d<f32>;
+
+// fn textureDimensions(texture: texture_3d<f32>, level: u32) -> vec3<i32>
+fn textureDimensions_fbdfb6() {
+  var arg_1 = 1u;
+  var res: vec3<i32> = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_fbdfb6();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_fbdfb6();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_fbdfb6();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/fbdfb6.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/fbdfb6.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..d6b9fe2
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/fbdfb6.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture3D<float4> arg_0 : register(t0, space1);
+
+void textureDimensions_fbdfb6() {
+  uint arg_1 = 1u;
+  int4 tint_tmp;
+  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
+  int3 res = tint_tmp.xyz;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_fbdfb6();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_fbdfb6();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_fbdfb6();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/fbdfb6.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/fbdfb6.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..d6b9fe2
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/fbdfb6.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture3D<float4> arg_0 : register(t0, space1);
+
+void textureDimensions_fbdfb6() {
+  uint arg_1 = 1u;
+  int4 tint_tmp;
+  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
+  int3 res = tint_tmp.xyz;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_fbdfb6();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_fbdfb6();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_fbdfb6();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/fbdfb6.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/fbdfb6.wgsl.expected.glsl
new file mode 100644
index 0000000..62b4cbb
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/fbdfb6.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+
+uniform highp sampler3D arg_0_1;
+void textureDimensions_fbdfb6() {
+  uint arg_1 = 1u;
+  ivec3 res = textureSize(arg_0_1, int(arg_1));
+}
+
+vec4 vertex_main() {
+  textureDimensions_fbdfb6();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp sampler3D arg_0_1;
+void textureDimensions_fbdfb6() {
+  uint arg_1 = 1u;
+  ivec3 res = textureSize(arg_0_1, int(arg_1));
+}
+
+void fragment_main() {
+  textureDimensions_fbdfb6();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp sampler3D arg_0_1;
+void textureDimensions_fbdfb6() {
+  uint arg_1 = 1u;
+  ivec3 res = textureSize(arg_0_1, int(arg_1));
+}
+
+void compute_main() {
+  textureDimensions_fbdfb6();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/fbdfb6.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/fbdfb6.wgsl.expected.msl
new file mode 100644
index 0000000..a9b385d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/fbdfb6.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_fbdfb6(texture3d<float, access::sample> tint_symbol_1) {
+  uint arg_1 = 1u;
+  int3 res = int3(tint_symbol_1.get_width(arg_1), tint_symbol_1.get_height(arg_1), tint_symbol_1.get_depth(arg_1));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<float, access::sample> tint_symbol_2) {
+  textureDimensions_fbdfb6(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<float, access::sample> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture3d<float, access::sample> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_fbdfb6(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture3d<float, access::sample> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_fbdfb6(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/fbdfb6.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/fbdfb6.wgsl.expected.spvasm
new file mode 100644
index 0000000..cb182db
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/fbdfb6.wgsl.expected.spvasm
@@ -0,0 +1,83 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 43
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_fbdfb6 "textureDimensions_fbdfb6"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 3D 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %12 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %20 = OpConstantNull %uint
+        %int = OpTypeInt 32 1
+      %v3int = OpTypeVector %int 3
+%_ptr_Function_v3int = OpTypePointer Function %v3int
+         %28 = OpConstantNull %v3int
+         %29 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_fbdfb6 = OpFunction %void None %12
+         %15 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_uint Function %20
+        %res = OpVariable %_ptr_Function_v3int Function %28
+               OpStore %arg_1 %uint_1
+         %24 = OpLoad %11 %arg_0
+         %25 = OpLoad %uint %arg_1
+         %21 = OpImageQuerySizeLod %v3int %24 %25
+               OpStore %res %21
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %29
+         %31 = OpLabel
+         %32 = OpFunctionCall %void %textureDimensions_fbdfb6
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+         %34 = OpLabel
+         %35 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %35
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+         %38 = OpLabel
+         %39 = OpFunctionCall %void %textureDimensions_fbdfb6
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %12
+         %41 = OpLabel
+         %42 = OpFunctionCall %void %textureDimensions_fbdfb6
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/fbdfb6.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/fbdfb6.wgsl.expected.wgsl
new file mode 100644
index 0000000..2b1a31e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/fbdfb6.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+@group(1) @binding(0) var arg_0 : texture_3d<f32>;
+
+fn textureDimensions_fbdfb6() {
+  var arg_1 = 1u;
+  var res : vec3<i32> = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_fbdfb6();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_fbdfb6();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_fbdfb6();
+}
diff --git a/test/tint/builtins/gen/var/textureGather/0166ec.wgsl b/test/tint/builtins/gen/var/textureGather/0166ec.wgsl
new file mode 100644
index 0000000..472ed0e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/0166ec.wgsl
@@ -0,0 +1,47 @@
+// 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(1) var arg_1: texture_cube<i32>;
+@group(1) @binding(2) var arg_2: sampler;
+
+// fn textureGather(@const component: u32, texture: texture_cube<i32>, sampler: sampler, coords: vec3<f32>) -> vec4<i32>
+fn textureGather_0166ec() {
+  const arg_0 = 1u;
+  var arg_3 = vec3<f32>();
+  var res: vec4<i32> = textureGather(arg_0, arg_1, arg_2, arg_3);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGather_0166ec();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureGather_0166ec();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureGather_0166ec();
+}
diff --git a/test/tint/builtins/gen/var/textureGather/0166ec.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/0166ec.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..d0981dd
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/0166ec.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+TextureCube<int4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_0166ec() {
+  float3 arg_3 = (0.0f).xxx;
+  int4 res = arg_1.GatherGreen(arg_2, arg_3);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureGather_0166ec();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureGather_0166ec();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureGather_0166ec();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/0166ec.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/0166ec.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..d0981dd
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/0166ec.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+TextureCube<int4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_0166ec() {
+  float3 arg_3 = (0.0f).xxx;
+  int4 res = arg_1.GatherGreen(arg_2, arg_3);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureGather_0166ec();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureGather_0166ec();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureGather_0166ec();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/0166ec.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGather/0166ec.wgsl.expected.glsl
new file mode 100644
index 0000000..0968a8e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/0166ec.wgsl.expected.glsl
@@ -0,0 +1,58 @@
+#version 310 es
+
+uniform highp isamplerCube arg_1_arg_2;
+
+void textureGather_0166ec() {
+  vec3 arg_3 = vec3(0.0f);
+  ivec4 res = textureGather(arg_1_arg_2, arg_3, int(1u));
+}
+
+vec4 vertex_main() {
+  textureGather_0166ec();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp isamplerCube arg_1_arg_2;
+
+void textureGather_0166ec() {
+  vec3 arg_3 = vec3(0.0f);
+  ivec4 res = textureGather(arg_1_arg_2, arg_3, int(1u));
+}
+
+void fragment_main() {
+  textureGather_0166ec();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp isamplerCube arg_1_arg_2;
+
+void textureGather_0166ec() {
+  vec3 arg_3 = vec3(0.0f);
+  ivec4 res = textureGather(arg_1_arg_2, arg_3, int(1u));
+}
+
+void compute_main() {
+  textureGather_0166ec();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/0166ec.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/0166ec.wgsl.expected.msl
new file mode 100644
index 0000000..c58d5a4
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/0166ec.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureGather_0166ec(texturecube<int, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+  float3 arg_3 = float3(0.0f);
+  int4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, component::y);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texturecube<int, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+  textureGather_0166ec(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texturecube<int, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texturecube<int, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+  textureGather_0166ec(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texturecube<int, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+  textureGather_0166ec(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureGather/0166ec.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/0166ec.wgsl.expected.spvasm
new file mode 100644
index 0000000..d5f7045
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/0166ec.wgsl.expected.spvasm
@@ -0,0 +1,92 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 50
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %textureGather_0166ec "textureGather_0166ec"
+               OpName %arg_3 "arg_3"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_1 DescriptorSet 1
+               OpDecorate %arg_1 Binding 1
+               OpDecorate %arg_2 DescriptorSet 1
+               OpDecorate %arg_2 Binding 2
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int Cube 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_1 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+         %15 = OpTypeSampler
+%_ptr_UniformConstant_15 = OpTypePointer UniformConstant %15
+      %arg_2 = OpVariable %_ptr_UniformConstant_15 UniformConstant
+       %void = OpTypeVoid
+         %16 = OpTypeFunction %void
+    %v3float = OpTypeVector %float 3
+         %21 = OpConstantNull %v3float
+%_ptr_Function_v3float = OpTypePointer Function %v3float
+      %v4int = OpTypeVector %int 4
+         %28 = OpTypeSampledImage %11
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+         %35 = OpConstantNull %v4int
+         %36 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureGather_0166ec = OpFunction %void None %16
+         %19 = OpLabel
+      %arg_3 = OpVariable %_ptr_Function_v3float Function %21
+        %res = OpVariable %_ptr_Function_v4int Function %35
+               OpStore %arg_3 %21
+         %26 = OpLoad %15 %arg_2
+         %27 = OpLoad %11 %arg_1
+         %29 = OpSampledImage %28 %27 %26
+         %30 = OpLoad %v3float %arg_3
+         %24 = OpImageGather %v4int %29 %30 %uint_1
+               OpStore %res %24
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %36
+         %38 = OpLabel
+         %39 = OpFunctionCall %void %textureGather_0166ec
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %16
+         %41 = OpLabel
+         %42 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %42
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %16
+         %45 = OpLabel
+         %46 = OpFunctionCall %void %textureGather_0166ec
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %16
+         %48 = OpLabel
+         %49 = OpFunctionCall %void %textureGather_0166ec
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureGather/0166ec.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/0166ec.wgsl.expected.wgsl
new file mode 100644
index 0000000..fca6c70
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/0166ec.wgsl.expected.wgsl
@@ -0,0 +1,25 @@
+@group(1) @binding(1) var arg_1 : texture_cube<i32>;
+
+@group(1) @binding(2) var arg_2 : sampler;
+
+fn textureGather_0166ec() {
+  const arg_0 = 1u;
+  var arg_3 = vec3<f32>();
+  var res : vec4<i32> = textureGather(arg_0, arg_1, arg_2, arg_3);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGather_0166ec();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureGather_0166ec();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureGather_0166ec();
+}
diff --git a/test/tint/builtins/gen/var/textureGather/04fa78.wgsl b/test/tint/builtins/gen/var/textureGather/04fa78.wgsl
new file mode 100644
index 0000000..e7aeacf
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/04fa78.wgsl
@@ -0,0 +1,48 @@
+// 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(1) var arg_1: texture_cube_array<i32>;
+@group(1) @binding(2) var arg_2: sampler;
+
+// fn textureGather(@const component: u32, texture: texture_cube_array<i32>, sampler: sampler, coords: vec3<f32>, array_index: u32) -> vec4<i32>
+fn textureGather_04fa78() {
+  const arg_0 = 1u;
+  var arg_3 = vec3<f32>();
+  var arg_4 = 1u;
+  var res: vec4<i32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGather_04fa78();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureGather_04fa78();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureGather_04fa78();
+}
diff --git a/test/tint/builtins/gen/var/textureGather/04fa78.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/04fa78.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..9297a9c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/04fa78.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+TextureCubeArray<int4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_04fa78() {
+  float3 arg_3 = (0.0f).xxx;
+  uint arg_4 = 1u;
+  int4 res = arg_1.GatherGreen(arg_2, float4(arg_3, float(arg_4)));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureGather_04fa78();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureGather_04fa78();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureGather_04fa78();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/04fa78.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/04fa78.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..9297a9c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/04fa78.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+TextureCubeArray<int4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_04fa78() {
+  float3 arg_3 = (0.0f).xxx;
+  uint arg_4 = 1u;
+  int4 res = arg_1.GatherGreen(arg_2, float4(arg_3, float(arg_4)));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureGather_04fa78();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureGather_04fa78();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureGather_04fa78();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/04fa78.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGather/04fa78.wgsl.expected.glsl
new file mode 100644
index 0000000..ae9e2a0
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/04fa78.wgsl.expected.glsl
@@ -0,0 +1,84 @@
+SKIP: FAILED
+
+#version 310 es
+
+uniform highp isamplerCubeArray arg_1_arg_2;
+
+void textureGather_04fa78() {
+  vec3 arg_3 = vec3(0.0f);
+  uint arg_4 = 1u;
+  ivec4 res = textureGather(arg_1_arg_2, vec4(arg_3, float(arg_4)), int(1u));
+}
+
+vec4 vertex_main() {
+  textureGather_04fa78();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'isamplerCubeArray' : Reserved word. 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+uniform highp isamplerCubeArray arg_1_arg_2;
+
+void textureGather_04fa78() {
+  vec3 arg_3 = vec3(0.0f);
+  uint arg_4 = 1u;
+  ivec4 res = textureGather(arg_1_arg_2, vec4(arg_3, float(arg_4)), int(1u));
+}
+
+void fragment_main() {
+  textureGather_04fa78();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'isamplerCubeArray' : Reserved word. 
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+uniform highp isamplerCubeArray arg_1_arg_2;
+
+void textureGather_04fa78() {
+  vec3 arg_3 = vec3(0.0f);
+  uint arg_4 = 1u;
+  ivec4 res = textureGather(arg_1_arg_2, vec4(arg_3, float(arg_4)), int(1u));
+}
+
+void compute_main() {
+  textureGather_04fa78();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'isamplerCubeArray' : Reserved word. 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureGather/04fa78.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/04fa78.wgsl.expected.msl
new file mode 100644
index 0000000..4a1a248
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/04fa78.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureGather_04fa78(texturecube_array<int, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+  float3 arg_3 = float3(0.0f);
+  uint arg_4 = 1u;
+  int4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, arg_4, component::y);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texturecube_array<int, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+  textureGather_04fa78(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texturecube_array<int, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texturecube_array<int, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+  textureGather_04fa78(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texturecube_array<int, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+  textureGather_04fa78(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureGather/04fa78.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/04fa78.wgsl.expected.spvasm
new file mode 100644
index 0000000..e3140b5
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/04fa78.wgsl.expected.spvasm
@@ -0,0 +1,104 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 59
+; Schema: 0
+               OpCapability Shader
+               OpCapability SampledCubeArray
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %textureGather_04fa78 "textureGather_04fa78"
+               OpName %arg_3 "arg_3"
+               OpName %arg_4 "arg_4"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_1 DescriptorSet 1
+               OpDecorate %arg_1 Binding 1
+               OpDecorate %arg_2 DescriptorSet 1
+               OpDecorate %arg_2 Binding 2
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int Cube 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_1 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+         %15 = OpTypeSampler
+%_ptr_UniformConstant_15 = OpTypePointer UniformConstant %15
+      %arg_2 = OpVariable %_ptr_UniformConstant_15 UniformConstant
+       %void = OpTypeVoid
+         %16 = OpTypeFunction %void
+    %v3float = OpTypeVector %float 3
+         %21 = OpConstantNull %v3float
+%_ptr_Function_v3float = OpTypePointer Function %v3float
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %28 = OpConstantNull %uint
+      %v4int = OpTypeVector %int 4
+         %33 = OpTypeSampledImage %11
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+         %44 = OpConstantNull %v4int
+         %45 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureGather_04fa78 = OpFunction %void None %16
+         %19 = OpLabel
+      %arg_3 = OpVariable %_ptr_Function_v3float Function %21
+      %arg_4 = OpVariable %_ptr_Function_uint Function %28
+        %res = OpVariable %_ptr_Function_v4int Function %44
+               OpStore %arg_3 %21
+               OpStore %arg_4 %uint_1
+         %31 = OpLoad %15 %arg_2
+         %32 = OpLoad %11 %arg_1
+         %34 = OpSampledImage %33 %32 %31
+         %35 = OpLoad %v3float %arg_3
+         %36 = OpCompositeExtract %float %35 0
+         %37 = OpCompositeExtract %float %35 1
+         %38 = OpCompositeExtract %float %35 2
+         %40 = OpLoad %uint %arg_4
+         %39 = OpConvertUToF %float %40
+         %41 = OpCompositeConstruct %v4float %36 %37 %38 %39
+         %29 = OpImageGather %v4int %34 %41 %uint_1
+               OpStore %res %29
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %45
+         %47 = OpLabel
+         %48 = OpFunctionCall %void %textureGather_04fa78
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %16
+         %50 = OpLabel
+         %51 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %51
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %16
+         %54 = OpLabel
+         %55 = OpFunctionCall %void %textureGather_04fa78
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %16
+         %57 = OpLabel
+         %58 = OpFunctionCall %void %textureGather_04fa78
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureGather/04fa78.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/04fa78.wgsl.expected.wgsl
new file mode 100644
index 0000000..de2c50b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/04fa78.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+@group(1) @binding(1) var arg_1 : texture_cube_array<i32>;
+
+@group(1) @binding(2) var arg_2 : sampler;
+
+fn textureGather_04fa78() {
+  const arg_0 = 1u;
+  var arg_3 = vec3<f32>();
+  var arg_4 = 1u;
+  var res : vec4<i32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGather_04fa78();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureGather_04fa78();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureGather_04fa78();
+}
diff --git a/test/tint/builtins/gen/var/textureGather/11b2db.wgsl b/test/tint/builtins/gen/var/textureGather/11b2db.wgsl
new file mode 100644
index 0000000..65736b0
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/11b2db.wgsl
@@ -0,0 +1,47 @@
+// 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(1) var arg_1: texture_cube<f32>;
+@group(1) @binding(2) var arg_2: sampler;
+
+// fn textureGather(@const component: u32, texture: texture_cube<f32>, sampler: sampler, coords: vec3<f32>) -> vec4<f32>
+fn textureGather_11b2db() {
+  const arg_0 = 1u;
+  var arg_3 = vec3<f32>();
+  var res: vec4<f32> = textureGather(arg_0, arg_1, arg_2, arg_3);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGather_11b2db();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureGather_11b2db();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureGather_11b2db();
+}
diff --git a/test/tint/builtins/gen/var/textureGather/11b2db.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/11b2db.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..5638aaa
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/11b2db.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+TextureCube<float4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_11b2db() {
+  float3 arg_3 = (0.0f).xxx;
+  float4 res = arg_1.GatherGreen(arg_2, arg_3);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureGather_11b2db();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureGather_11b2db();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureGather_11b2db();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/11b2db.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/11b2db.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..5638aaa
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/11b2db.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+TextureCube<float4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_11b2db() {
+  float3 arg_3 = (0.0f).xxx;
+  float4 res = arg_1.GatherGreen(arg_2, arg_3);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureGather_11b2db();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureGather_11b2db();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureGather_11b2db();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/11b2db.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGather/11b2db.wgsl.expected.glsl
new file mode 100644
index 0000000..dc0f613
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/11b2db.wgsl.expected.glsl
@@ -0,0 +1,58 @@
+#version 310 es
+
+uniform highp samplerCube arg_1_arg_2;
+
+void textureGather_11b2db() {
+  vec3 arg_3 = vec3(0.0f);
+  vec4 res = textureGather(arg_1_arg_2, arg_3, int(1u));
+}
+
+vec4 vertex_main() {
+  textureGather_11b2db();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp samplerCube arg_1_arg_2;
+
+void textureGather_11b2db() {
+  vec3 arg_3 = vec3(0.0f);
+  vec4 res = textureGather(arg_1_arg_2, arg_3, int(1u));
+}
+
+void fragment_main() {
+  textureGather_11b2db();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp samplerCube arg_1_arg_2;
+
+void textureGather_11b2db() {
+  vec3 arg_3 = vec3(0.0f);
+  vec4 res = textureGather(arg_1_arg_2, arg_3, int(1u));
+}
+
+void compute_main() {
+  textureGather_11b2db();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/11b2db.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/11b2db.wgsl.expected.msl
new file mode 100644
index 0000000..d99c749
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/11b2db.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureGather_11b2db(texturecube<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+  float3 arg_3 = float3(0.0f);
+  float4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, component::y);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texturecube<float, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+  textureGather_11b2db(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texturecube<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texturecube<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+  textureGather_11b2db(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texturecube<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+  textureGather_11b2db(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureGather/11b2db.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/11b2db.wgsl.expected.spvasm
new file mode 100644
index 0000000..0e70b08
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/11b2db.wgsl.expected.spvasm
@@ -0,0 +1,89 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 47
+; 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_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %textureGather_11b2db "textureGather_11b2db"
+               OpName %arg_3 "arg_3"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_1 DescriptorSet 1
+               OpDecorate %arg_1 Binding 1
+               OpDecorate %arg_2 DescriptorSet 1
+               OpDecorate %arg_2 Binding 2
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float Cube 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_1 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+         %14 = OpTypeSampler
+%_ptr_UniformConstant_14 = OpTypePointer UniformConstant %14
+      %arg_2 = OpVariable %_ptr_UniformConstant_14 UniformConstant
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+    %v3float = OpTypeVector %float 3
+         %20 = OpConstantNull %v3float
+%_ptr_Function_v3float = OpTypePointer Function %v3float
+         %26 = OpTypeSampledImage %11
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+         %33 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureGather_11b2db = OpFunction %void None %15
+         %18 = OpLabel
+      %arg_3 = OpVariable %_ptr_Function_v3float Function %20
+        %res = OpVariable %_ptr_Function_v4float Function %5
+               OpStore %arg_3 %20
+         %24 = OpLoad %14 %arg_2
+         %25 = OpLoad %11 %arg_1
+         %27 = OpSampledImage %26 %25 %24
+         %28 = OpLoad %v3float %arg_3
+         %23 = OpImageGather %v4float %27 %28 %uint_1
+               OpStore %res %23
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %33
+         %35 = OpLabel
+         %36 = OpFunctionCall %void %textureGather_11b2db
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %38 = OpLabel
+         %39 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %39
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %42 = OpLabel
+         %43 = OpFunctionCall %void %textureGather_11b2db
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %45 = OpLabel
+         %46 = OpFunctionCall %void %textureGather_11b2db
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureGather/11b2db.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/11b2db.wgsl.expected.wgsl
new file mode 100644
index 0000000..90c1647
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/11b2db.wgsl.expected.wgsl
@@ -0,0 +1,25 @@
+@group(1) @binding(1) var arg_1 : texture_cube<f32>;
+
+@group(1) @binding(2) var arg_2 : sampler;
+
+fn textureGather_11b2db() {
+  const arg_0 = 1u;
+  var arg_3 = vec3<f32>();
+  var res : vec4<f32> = textureGather(arg_0, arg_1, arg_2, arg_3);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGather_11b2db();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureGather_11b2db();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureGather_11b2db();
+}
diff --git a/test/tint/builtins/gen/var/textureGather/17baac.wgsl b/test/tint/builtins/gen/var/textureGather/17baac.wgsl
new file mode 100644
index 0000000..7888218
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/17baac.wgsl
@@ -0,0 +1,48 @@
+// 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(1) var arg_1: texture_2d_array<f32>;
+@group(1) @binding(2) var arg_2: sampler;
+
+// fn textureGather(@const component: i32, texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: u32) -> vec4<f32>
+fn textureGather_17baac() {
+  const arg_0 = 1;
+  var arg_3 = vec2<f32>();
+  var arg_4 = 1u;
+  var res: vec4<f32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGather_17baac();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureGather_17baac();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureGather_17baac();
+}
diff --git a/test/tint/builtins/gen/var/textureGather/17baac.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/17baac.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..9002334
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/17baac.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture2DArray<float4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_17baac() {
+  float2 arg_3 = (0.0f).xx;
+  uint arg_4 = 1u;
+  float4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureGather_17baac();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureGather_17baac();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureGather_17baac();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/17baac.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/17baac.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..9002334
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/17baac.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture2DArray<float4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_17baac() {
+  float2 arg_3 = (0.0f).xx;
+  uint arg_4 = 1u;
+  float4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureGather_17baac();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureGather_17baac();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureGather_17baac();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/17baac.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGather/17baac.wgsl.expected.glsl
new file mode 100644
index 0000000..d40ca8d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/17baac.wgsl.expected.glsl
@@ -0,0 +1,61 @@
+#version 310 es
+
+uniform highp sampler2DArray arg_1_arg_2;
+
+void textureGather_17baac() {
+  vec2 arg_3 = vec2(0.0f);
+  uint arg_4 = 1u;
+  vec4 res = textureGather(arg_1_arg_2, vec3(arg_3, float(arg_4)), int(1u));
+}
+
+vec4 vertex_main() {
+  textureGather_17baac();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2DArray arg_1_arg_2;
+
+void textureGather_17baac() {
+  vec2 arg_3 = vec2(0.0f);
+  uint arg_4 = 1u;
+  vec4 res = textureGather(arg_1_arg_2, vec3(arg_3, float(arg_4)), int(1u));
+}
+
+void fragment_main() {
+  textureGather_17baac();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp sampler2DArray arg_1_arg_2;
+
+void textureGather_17baac() {
+  vec2 arg_3 = vec2(0.0f);
+  uint arg_4 = 1u;
+  vec4 res = textureGather(arg_1_arg_2, vec3(arg_3, float(arg_4)), int(1u));
+}
+
+void compute_main() {
+  textureGather_17baac();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/17baac.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/17baac.wgsl.expected.msl
new file mode 100644
index 0000000..8843160
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/17baac.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureGather_17baac(texture2d_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+  float2 arg_3 = float2(0.0f);
+  uint arg_4 = 1u;
+  float4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, arg_4, int2(0), component::y);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<float, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+  textureGather_17baac(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+  textureGather_17baac(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+  textureGather_17baac(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureGather/17baac.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/17baac.wgsl.expected.spvasm
new file mode 100644
index 0000000..fa0a7ea
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/17baac.wgsl.expected.spvasm
@@ -0,0 +1,100 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 56
+; 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_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %textureGather_17baac "textureGather_17baac"
+               OpName %arg_3 "arg_3"
+               OpName %arg_4 "arg_4"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_1 DescriptorSet 1
+               OpDecorate %arg_1 Binding 1
+               OpDecorate %arg_2 DescriptorSet 1
+               OpDecorate %arg_2 Binding 2
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_1 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+         %14 = OpTypeSampler
+%_ptr_UniformConstant_14 = OpTypePointer UniformConstant %14
+      %arg_2 = OpVariable %_ptr_UniformConstant_14 UniformConstant
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+    %v2float = OpTypeVector %float 2
+         %20 = OpConstantNull %v2float
+%_ptr_Function_v2float = OpTypePointer Function %v2float
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %27 = OpConstantNull %uint
+         %31 = OpTypeSampledImage %11
+    %v3float = OpTypeVector %float 3
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+         %42 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureGather_17baac = OpFunction %void None %15
+         %18 = OpLabel
+      %arg_3 = OpVariable %_ptr_Function_v2float Function %20
+      %arg_4 = OpVariable %_ptr_Function_uint Function %27
+        %res = OpVariable %_ptr_Function_v4float Function %5
+               OpStore %arg_3 %20
+               OpStore %arg_4 %uint_1
+         %29 = OpLoad %14 %arg_2
+         %30 = OpLoad %11 %arg_1
+         %32 = OpSampledImage %31 %30 %29
+         %34 = OpLoad %v2float %arg_3
+         %35 = OpCompositeExtract %float %34 0
+         %36 = OpCompositeExtract %float %34 1
+         %38 = OpLoad %uint %arg_4
+         %37 = OpConvertUToF %float %38
+         %39 = OpCompositeConstruct %v3float %35 %36 %37
+         %28 = OpImageGather %v4float %32 %39 %uint_1
+               OpStore %res %28
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %42
+         %44 = OpLabel
+         %45 = OpFunctionCall %void %textureGather_17baac
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %47 = OpLabel
+         %48 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %48
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %51 = OpLabel
+         %52 = OpFunctionCall %void %textureGather_17baac
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %54 = OpLabel
+         %55 = OpFunctionCall %void %textureGather_17baac
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureGather/17baac.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/17baac.wgsl.expected.wgsl
new file mode 100644
index 0000000..708b14f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/17baac.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+@group(1) @binding(1) var arg_1 : texture_2d_array<f32>;
+
+@group(1) @binding(2) var arg_2 : sampler;
+
+fn textureGather_17baac() {
+  const arg_0 = 1;
+  var arg_3 = vec2<f32>();
+  var arg_4 = 1u;
+  var res : vec4<f32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGather_17baac();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureGather_17baac();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureGather_17baac();
+}
diff --git a/test/tint/builtins/gen/var/textureGather/1bf0ab.wgsl b/test/tint/builtins/gen/var/textureGather/1bf0ab.wgsl
new file mode 100644
index 0000000..a58858c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/1bf0ab.wgsl
@@ -0,0 +1,48 @@
+// 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(1) var arg_1: texture_2d_array<u32>;
+@group(1) @binding(2) var arg_2: sampler;
+
+// fn textureGather(@const component: u32, texture: texture_2d_array<u32>, sampler: sampler, coords: vec2<f32>, array_index: u32) -> vec4<u32>
+fn textureGather_1bf0ab() {
+  const arg_0 = 1u;
+  var arg_3 = vec2<f32>();
+  var arg_4 = 1u;
+  var res: vec4<u32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGather_1bf0ab();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureGather_1bf0ab();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureGather_1bf0ab();
+}
diff --git a/test/tint/builtins/gen/var/textureGather/1bf0ab.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/1bf0ab.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..4f5b1e3
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/1bf0ab.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture2DArray<uint4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_1bf0ab() {
+  float2 arg_3 = (0.0f).xx;
+  uint arg_4 = 1u;
+  uint4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureGather_1bf0ab();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureGather_1bf0ab();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureGather_1bf0ab();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/1bf0ab.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/1bf0ab.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..4f5b1e3
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/1bf0ab.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture2DArray<uint4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_1bf0ab() {
+  float2 arg_3 = (0.0f).xx;
+  uint arg_4 = 1u;
+  uint4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureGather_1bf0ab();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureGather_1bf0ab();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureGather_1bf0ab();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/1bf0ab.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGather/1bf0ab.wgsl.expected.glsl
new file mode 100644
index 0000000..e7f08f3
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/1bf0ab.wgsl.expected.glsl
@@ -0,0 +1,61 @@
+#version 310 es
+
+uniform highp usampler2DArray arg_1_arg_2;
+
+void textureGather_1bf0ab() {
+  vec2 arg_3 = vec2(0.0f);
+  uint arg_4 = 1u;
+  uvec4 res = textureGather(arg_1_arg_2, vec3(arg_3, float(arg_4)), int(1u));
+}
+
+vec4 vertex_main() {
+  textureGather_1bf0ab();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp usampler2DArray arg_1_arg_2;
+
+void textureGather_1bf0ab() {
+  vec2 arg_3 = vec2(0.0f);
+  uint arg_4 = 1u;
+  uvec4 res = textureGather(arg_1_arg_2, vec3(arg_3, float(arg_4)), int(1u));
+}
+
+void fragment_main() {
+  textureGather_1bf0ab();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp usampler2DArray arg_1_arg_2;
+
+void textureGather_1bf0ab() {
+  vec2 arg_3 = vec2(0.0f);
+  uint arg_4 = 1u;
+  uvec4 res = textureGather(arg_1_arg_2, vec3(arg_3, float(arg_4)), int(1u));
+}
+
+void compute_main() {
+  textureGather_1bf0ab();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/1bf0ab.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/1bf0ab.wgsl.expected.msl
new file mode 100644
index 0000000..5040fe0
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/1bf0ab.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureGather_1bf0ab(texture2d_array<uint, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+  float2 arg_3 = float2(0.0f);
+  uint arg_4 = 1u;
+  uint4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, arg_4, int2(0), component::y);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<uint, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+  textureGather_1bf0ab(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<uint, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<uint, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+  textureGather_1bf0ab(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<uint, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+  textureGather_1bf0ab(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureGather/1bf0ab.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/1bf0ab.wgsl.expected.spvasm
new file mode 100644
index 0000000..44eaae6
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/1bf0ab.wgsl.expected.spvasm
@@ -0,0 +1,102 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 58
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %textureGather_1bf0ab "textureGather_1bf0ab"
+               OpName %arg_3 "arg_3"
+               OpName %arg_4 "arg_4"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_1 DescriptorSet 1
+               OpDecorate %arg_1 Binding 1
+               OpDecorate %arg_2 DescriptorSet 1
+               OpDecorate %arg_2 Binding 2
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_1 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+         %15 = OpTypeSampler
+%_ptr_UniformConstant_15 = OpTypePointer UniformConstant %15
+      %arg_2 = OpVariable %_ptr_UniformConstant_15 UniformConstant
+       %void = OpTypeVoid
+         %16 = OpTypeFunction %void
+    %v2float = OpTypeVector %float 2
+         %21 = OpConstantNull %v2float
+%_ptr_Function_v2float = OpTypePointer Function %v2float
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %27 = OpConstantNull %uint
+     %v4uint = OpTypeVector %uint 4
+         %32 = OpTypeSampledImage %11
+    %v3float = OpTypeVector %float 3
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+         %43 = OpConstantNull %v4uint
+         %44 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureGather_1bf0ab = OpFunction %void None %16
+         %19 = OpLabel
+      %arg_3 = OpVariable %_ptr_Function_v2float Function %21
+      %arg_4 = OpVariable %_ptr_Function_uint Function %27
+        %res = OpVariable %_ptr_Function_v4uint Function %43
+               OpStore %arg_3 %21
+               OpStore %arg_4 %uint_1
+         %30 = OpLoad %15 %arg_2
+         %31 = OpLoad %11 %arg_1
+         %33 = OpSampledImage %32 %31 %30
+         %35 = OpLoad %v2float %arg_3
+         %36 = OpCompositeExtract %float %35 0
+         %37 = OpCompositeExtract %float %35 1
+         %39 = OpLoad %uint %arg_4
+         %38 = OpConvertUToF %float %39
+         %40 = OpCompositeConstruct %v3float %36 %37 %38
+         %28 = OpImageGather %v4uint %33 %40 %uint_1
+               OpStore %res %28
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %44
+         %46 = OpLabel
+         %47 = OpFunctionCall %void %textureGather_1bf0ab
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %16
+         %49 = OpLabel
+         %50 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %50
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %16
+         %53 = OpLabel
+         %54 = OpFunctionCall %void %textureGather_1bf0ab
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %16
+         %56 = OpLabel
+         %57 = OpFunctionCall %void %textureGather_1bf0ab
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureGather/1bf0ab.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/1bf0ab.wgsl.expected.wgsl
new file mode 100644
index 0000000..75e5f39
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/1bf0ab.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+@group(1) @binding(1) var arg_1 : texture_2d_array<u32>;
+
+@group(1) @binding(2) var arg_2 : sampler;
+
+fn textureGather_1bf0ab() {
+  const arg_0 = 1u;
+  var arg_3 = vec2<f32>();
+  var arg_4 = 1u;
+  var res : vec4<u32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGather_1bf0ab();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureGather_1bf0ab();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureGather_1bf0ab();
+}
diff --git a/test/tint/builtins/gen/var/textureGather/238ec4.wgsl b/test/tint/builtins/gen/var/textureGather/238ec4.wgsl
new file mode 100644
index 0000000..44f52d8
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/238ec4.wgsl
@@ -0,0 +1,49 @@
+// 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(1) var arg_1: texture_2d_array<f32>;
+@group(1) @binding(2) var arg_2: sampler;
+
+// fn textureGather(@const component: u32, texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: u32, @const offset: vec2<i32>) -> vec4<f32>
+fn textureGather_238ec4() {
+  const arg_0 = 1u;
+  var arg_3 = vec2<f32>();
+  var arg_4 = 1u;
+  const arg_5 = vec2<i32>();
+  var res: vec4<f32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGather_238ec4();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureGather_238ec4();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureGather_238ec4();
+}
diff --git a/test/tint/builtins/gen/var/textureGather/238ec4.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/238ec4.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..e49c257
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/238ec4.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture2DArray<float4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_238ec4() {
+  float2 arg_3 = (0.0f).xx;
+  uint arg_4 = 1u;
+  float4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)), (0).xx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureGather_238ec4();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureGather_238ec4();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureGather_238ec4();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/238ec4.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/238ec4.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..e49c257
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/238ec4.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture2DArray<float4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_238ec4() {
+  float2 arg_3 = (0.0f).xx;
+  uint arg_4 = 1u;
+  float4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)), (0).xx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureGather_238ec4();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureGather_238ec4();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureGather_238ec4();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/238ec4.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGather/238ec4.wgsl.expected.glsl
new file mode 100644
index 0000000..680cf42
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/238ec4.wgsl.expected.glsl
@@ -0,0 +1,61 @@
+#version 310 es
+
+uniform highp sampler2DArray arg_1_arg_2;
+
+void textureGather_238ec4() {
+  vec2 arg_3 = vec2(0.0f);
+  uint arg_4 = 1u;
+  vec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(0), int(1u));
+}
+
+vec4 vertex_main() {
+  textureGather_238ec4();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2DArray arg_1_arg_2;
+
+void textureGather_238ec4() {
+  vec2 arg_3 = vec2(0.0f);
+  uint arg_4 = 1u;
+  vec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(0), int(1u));
+}
+
+void fragment_main() {
+  textureGather_238ec4();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp sampler2DArray arg_1_arg_2;
+
+void textureGather_238ec4() {
+  vec2 arg_3 = vec2(0.0f);
+  uint arg_4 = 1u;
+  vec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(0), int(1u));
+}
+
+void compute_main() {
+  textureGather_238ec4();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/238ec4.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/238ec4.wgsl.expected.msl
new file mode 100644
index 0000000..eeeca6f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/238ec4.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureGather_238ec4(texture2d_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+  float2 arg_3 = float2(0.0f);
+  uint arg_4 = 1u;
+  float4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, arg_4, int2(0), component::y);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<float, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+  textureGather_238ec4(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+  textureGather_238ec4(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+  textureGather_238ec4(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureGather/238ec4.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/238ec4.wgsl.expected.spvasm
new file mode 100644
index 0000000..16698c1
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/238ec4.wgsl.expected.spvasm
@@ -0,0 +1,103 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 59
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %textureGather_238ec4 "textureGather_238ec4"
+               OpName %arg_3 "arg_3"
+               OpName %arg_4 "arg_4"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_1 DescriptorSet 1
+               OpDecorate %arg_1 Binding 1
+               OpDecorate %arg_2 DescriptorSet 1
+               OpDecorate %arg_2 Binding 2
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_1 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+         %14 = OpTypeSampler
+%_ptr_UniformConstant_14 = OpTypePointer UniformConstant %14
+      %arg_2 = OpVariable %_ptr_UniformConstant_14 UniformConstant
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+    %v2float = OpTypeVector %float 2
+         %20 = OpConstantNull %v2float
+%_ptr_Function_v2float = OpTypePointer Function %v2float
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %27 = OpConstantNull %uint
+         %31 = OpTypeSampledImage %11
+    %v3float = OpTypeVector %float 3
+        %int = OpTypeInt 32 1
+      %v2int = OpTypeVector %int 2
+         %42 = OpConstantNull %v2int
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+         %45 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureGather_238ec4 = OpFunction %void None %15
+         %18 = OpLabel
+      %arg_3 = OpVariable %_ptr_Function_v2float Function %20
+      %arg_4 = OpVariable %_ptr_Function_uint Function %27
+        %res = OpVariable %_ptr_Function_v4float Function %5
+               OpStore %arg_3 %20
+               OpStore %arg_4 %uint_1
+         %29 = OpLoad %14 %arg_2
+         %30 = OpLoad %11 %arg_1
+         %32 = OpSampledImage %31 %30 %29
+         %34 = OpLoad %v2float %arg_3
+         %35 = OpCompositeExtract %float %34 0
+         %36 = OpCompositeExtract %float %34 1
+         %38 = OpLoad %uint %arg_4
+         %37 = OpConvertUToF %float %38
+         %39 = OpCompositeConstruct %v3float %35 %36 %37
+         %28 = OpImageGather %v4float %32 %39 %uint_1 ConstOffset %42
+               OpStore %res %28
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %45
+         %47 = OpLabel
+         %48 = OpFunctionCall %void %textureGather_238ec4
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %50 = OpLabel
+         %51 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %51
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %54 = OpLabel
+         %55 = OpFunctionCall %void %textureGather_238ec4
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %57 = OpLabel
+         %58 = OpFunctionCall %void %textureGather_238ec4
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureGather/238ec4.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/238ec4.wgsl.expected.wgsl
new file mode 100644
index 0000000..1e41345
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/238ec4.wgsl.expected.wgsl
@@ -0,0 +1,27 @@
+@group(1) @binding(1) var arg_1 : texture_2d_array<f32>;
+
+@group(1) @binding(2) var arg_2 : sampler;
+
+fn textureGather_238ec4() {
+  const arg_0 = 1u;
+  var arg_3 = vec2<f32>();
+  var arg_4 = 1u;
+  const arg_5 = vec2<i32>();
+  var res : vec4<f32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGather_238ec4();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureGather_238ec4();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureGather_238ec4();
+}
diff --git a/test/tint/builtins/gen/var/textureGather/269250.wgsl b/test/tint/builtins/gen/var/textureGather/269250.wgsl
new file mode 100644
index 0000000..8297c39
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/269250.wgsl
@@ -0,0 +1,48 @@
+// 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(1) var arg_1: texture_2d_array<i32>;
+@group(1) @binding(2) var arg_2: sampler;
+
+// fn textureGather(@const component: u32, texture: texture_2d_array<i32>, sampler: sampler, coords: vec2<f32>, array_index: u32) -> vec4<i32>
+fn textureGather_269250() {
+  const arg_0 = 1u;
+  var arg_3 = vec2<f32>();
+  var arg_4 = 1u;
+  var res: vec4<i32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGather_269250();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureGather_269250();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureGather_269250();
+}
diff --git a/test/tint/builtins/gen/var/textureGather/269250.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/269250.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..6559297
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/269250.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture2DArray<int4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_269250() {
+  float2 arg_3 = (0.0f).xx;
+  uint arg_4 = 1u;
+  int4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureGather_269250();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureGather_269250();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureGather_269250();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/269250.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/269250.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..6559297
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/269250.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture2DArray<int4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_269250() {
+  float2 arg_3 = (0.0f).xx;
+  uint arg_4 = 1u;
+  int4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureGather_269250();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureGather_269250();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureGather_269250();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/269250.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGather/269250.wgsl.expected.glsl
new file mode 100644
index 0000000..f3f577a
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/269250.wgsl.expected.glsl
@@ -0,0 +1,61 @@
+#version 310 es
+
+uniform highp isampler2DArray arg_1_arg_2;
+
+void textureGather_269250() {
+  vec2 arg_3 = vec2(0.0f);
+  uint arg_4 = 1u;
+  ivec4 res = textureGather(arg_1_arg_2, vec3(arg_3, float(arg_4)), int(1u));
+}
+
+vec4 vertex_main() {
+  textureGather_269250();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp isampler2DArray arg_1_arg_2;
+
+void textureGather_269250() {
+  vec2 arg_3 = vec2(0.0f);
+  uint arg_4 = 1u;
+  ivec4 res = textureGather(arg_1_arg_2, vec3(arg_3, float(arg_4)), int(1u));
+}
+
+void fragment_main() {
+  textureGather_269250();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp isampler2DArray arg_1_arg_2;
+
+void textureGather_269250() {
+  vec2 arg_3 = vec2(0.0f);
+  uint arg_4 = 1u;
+  ivec4 res = textureGather(arg_1_arg_2, vec3(arg_3, float(arg_4)), int(1u));
+}
+
+void compute_main() {
+  textureGather_269250();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/269250.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/269250.wgsl.expected.msl
new file mode 100644
index 0000000..1e8f39c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/269250.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureGather_269250(texture2d_array<int, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+  float2 arg_3 = float2(0.0f);
+  uint arg_4 = 1u;
+  int4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, arg_4, int2(0), component::y);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<int, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+  textureGather_269250(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<int, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<int, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+  textureGather_269250(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<int, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+  textureGather_269250(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureGather/269250.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/269250.wgsl.expected.spvasm
new file mode 100644
index 0000000..36bdfab
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/269250.wgsl.expected.spvasm
@@ -0,0 +1,103 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 59
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %textureGather_269250 "textureGather_269250"
+               OpName %arg_3 "arg_3"
+               OpName %arg_4 "arg_4"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_1 DescriptorSet 1
+               OpDecorate %arg_1 Binding 1
+               OpDecorate %arg_2 DescriptorSet 1
+               OpDecorate %arg_2 Binding 2
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_1 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+         %15 = OpTypeSampler
+%_ptr_UniformConstant_15 = OpTypePointer UniformConstant %15
+      %arg_2 = OpVariable %_ptr_UniformConstant_15 UniformConstant
+       %void = OpTypeVoid
+         %16 = OpTypeFunction %void
+    %v2float = OpTypeVector %float 2
+         %21 = OpConstantNull %v2float
+%_ptr_Function_v2float = OpTypePointer Function %v2float
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %28 = OpConstantNull %uint
+      %v4int = OpTypeVector %int 4
+         %33 = OpTypeSampledImage %11
+    %v3float = OpTypeVector %float 3
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+         %44 = OpConstantNull %v4int
+         %45 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureGather_269250 = OpFunction %void None %16
+         %19 = OpLabel
+      %arg_3 = OpVariable %_ptr_Function_v2float Function %21
+      %arg_4 = OpVariable %_ptr_Function_uint Function %28
+        %res = OpVariable %_ptr_Function_v4int Function %44
+               OpStore %arg_3 %21
+               OpStore %arg_4 %uint_1
+         %31 = OpLoad %15 %arg_2
+         %32 = OpLoad %11 %arg_1
+         %34 = OpSampledImage %33 %32 %31
+         %36 = OpLoad %v2float %arg_3
+         %37 = OpCompositeExtract %float %36 0
+         %38 = OpCompositeExtract %float %36 1
+         %40 = OpLoad %uint %arg_4
+         %39 = OpConvertUToF %float %40
+         %41 = OpCompositeConstruct %v3float %37 %38 %39
+         %29 = OpImageGather %v4int %34 %41 %uint_1
+               OpStore %res %29
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %45
+         %47 = OpLabel
+         %48 = OpFunctionCall %void %textureGather_269250
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %16
+         %50 = OpLabel
+         %51 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %51
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %16
+         %54 = OpLabel
+         %55 = OpFunctionCall %void %textureGather_269250
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %16
+         %57 = OpLabel
+         %58 = OpFunctionCall %void %textureGather_269250
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureGather/269250.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/269250.wgsl.expected.wgsl
new file mode 100644
index 0000000..e2c82c1
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/269250.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+@group(1) @binding(1) var arg_1 : texture_2d_array<i32>;
+
+@group(1) @binding(2) var arg_2 : sampler;
+
+fn textureGather_269250() {
+  const arg_0 = 1u;
+  var arg_3 = vec2<f32>();
+  var arg_4 = 1u;
+  var res : vec4<i32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGather_269250();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureGather_269250();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureGather_269250();
+}
diff --git a/test/tint/builtins/gen/var/textureGather/2a4f40.wgsl b/test/tint/builtins/gen/var/textureGather/2a4f40.wgsl
new file mode 100644
index 0000000..c2be9ee
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/2a4f40.wgsl
@@ -0,0 +1,47 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_depth_2d_array;
+@group(1) @binding(1) var arg_1: sampler;
+
+// fn textureGather(texture: texture_depth_2d_array, sampler: sampler, coords: vec2<f32>, array_index: u32) -> vec4<f32>
+fn textureGather_2a4f40() {
+  var arg_2 = vec2<f32>();
+  var arg_3 = 1u;
+  var res: vec4<f32> = textureGather(arg_0, arg_1, arg_2, arg_3);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGather_2a4f40();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureGather_2a4f40();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureGather_2a4f40();
+}
diff --git a/test/tint/builtins/gen/var/textureGather/2a4f40.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/2a4f40.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..1b3539d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/2a4f40.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture2DArray arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureGather_2a4f40() {
+  float2 arg_2 = (0.0f).xx;
+  uint arg_3 = 1u;
+  float4 res = arg_0.Gather(arg_1, float3(arg_2, float(arg_3)));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureGather_2a4f40();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureGather_2a4f40();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureGather_2a4f40();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/2a4f40.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/2a4f40.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..1b3539d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/2a4f40.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture2DArray arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureGather_2a4f40() {
+  float2 arg_2 = (0.0f).xx;
+  uint arg_3 = 1u;
+  float4 res = arg_0.Gather(arg_1, float3(arg_2, float(arg_3)));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureGather_2a4f40();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureGather_2a4f40();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureGather_2a4f40();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/2a4f40.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGather/2a4f40.wgsl.expected.glsl
new file mode 100644
index 0000000..bdf959d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/2a4f40.wgsl.expected.glsl
@@ -0,0 +1,61 @@
+#version 310 es
+
+uniform highp sampler2DArrayShadow arg_0_arg_1;
+
+void textureGather_2a4f40() {
+  vec2 arg_2 = vec2(0.0f);
+  uint arg_3 = 1u;
+  vec4 res = textureGather(arg_0_arg_1, vec3(arg_2, float(arg_3)), 0.0);
+}
+
+vec4 vertex_main() {
+  textureGather_2a4f40();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2DArrayShadow arg_0_arg_1;
+
+void textureGather_2a4f40() {
+  vec2 arg_2 = vec2(0.0f);
+  uint arg_3 = 1u;
+  vec4 res = textureGather(arg_0_arg_1, vec3(arg_2, float(arg_3)), 0.0);
+}
+
+void fragment_main() {
+  textureGather_2a4f40();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp sampler2DArrayShadow arg_0_arg_1;
+
+void textureGather_2a4f40() {
+  vec2 arg_2 = vec2(0.0f);
+  uint arg_3 = 1u;
+  vec4 res = textureGather(arg_0_arg_1, vec3(arg_2, float(arg_3)), 0.0);
+}
+
+void compute_main() {
+  textureGather_2a4f40();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/2a4f40.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/2a4f40.wgsl.expected.msl
new file mode 100644
index 0000000..e29dd88
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/2a4f40.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureGather_2a4f40(depth2d_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+  float2 arg_2 = float2(0.0f);
+  uint arg_3 = 1u;
+  float4 res = tint_symbol_1.gather(tint_symbol_2, arg_2, arg_3);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(depth2d_array<float, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+  textureGather_2a4f40(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(depth2d_array<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(depth2d_array<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+  textureGather_2a4f40(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(depth2d_array<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+  textureGather_2a4f40(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureGather/2a4f40.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/2a4f40.wgsl.expected.spvasm
new file mode 100644
index 0000000..f21c774
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/2a4f40.wgsl.expected.spvasm
@@ -0,0 +1,102 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 58
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %arg_1 "arg_1"
+               OpName %textureGather_2a4f40 "textureGather_2a4f40"
+               OpName %arg_2 "arg_2"
+               OpName %arg_3 "arg_3"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %arg_1 DescriptorSet 1
+               OpDecorate %arg_1 Binding 1
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+         %14 = OpTypeSampler
+%_ptr_UniformConstant_14 = OpTypePointer UniformConstant %14
+      %arg_1 = OpVariable %_ptr_UniformConstant_14 UniformConstant
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+    %v2float = OpTypeVector %float 2
+         %20 = OpConstantNull %v2float
+%_ptr_Function_v2float = OpTypePointer Function %v2float
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %27 = OpConstantNull %uint
+         %31 = OpTypeSampledImage %11
+    %v3float = OpTypeVector %float 3
+        %int = OpTypeInt 32 1
+      %int_0 = OpConstant %int 0
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+         %44 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureGather_2a4f40 = OpFunction %void None %15
+         %18 = OpLabel
+      %arg_2 = OpVariable %_ptr_Function_v2float Function %20
+      %arg_3 = OpVariable %_ptr_Function_uint Function %27
+        %res = OpVariable %_ptr_Function_v4float Function %5
+               OpStore %arg_2 %20
+               OpStore %arg_3 %uint_1
+         %29 = OpLoad %14 %arg_1
+         %30 = OpLoad %11 %arg_0
+         %32 = OpSampledImage %31 %30 %29
+         %34 = OpLoad %v2float %arg_2
+         %35 = OpCompositeExtract %float %34 0
+         %36 = OpCompositeExtract %float %34 1
+         %38 = OpLoad %uint %arg_3
+         %37 = OpConvertUToF %float %38
+         %39 = OpCompositeConstruct %v3float %35 %36 %37
+         %28 = OpImageGather %v4float %32 %39 %int_0
+               OpStore %res %28
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %44
+         %46 = OpLabel
+         %47 = OpFunctionCall %void %textureGather_2a4f40
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %49 = OpLabel
+         %50 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %50
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %53 = OpLabel
+         %54 = OpFunctionCall %void %textureGather_2a4f40
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %56 = OpLabel
+         %57 = OpFunctionCall %void %textureGather_2a4f40
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureGather/2a4f40.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/2a4f40.wgsl.expected.wgsl
new file mode 100644
index 0000000..2b827fd
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/2a4f40.wgsl.expected.wgsl
@@ -0,0 +1,25 @@
+@group(1) @binding(0) var arg_0 : texture_depth_2d_array;
+
+@group(1) @binding(1) var arg_1 : sampler;
+
+fn textureGather_2a4f40() {
+  var arg_2 = vec2<f32>();
+  var arg_3 = 1u;
+  var res : vec4<f32> = textureGather(arg_0, arg_1, arg_2, arg_3);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGather_2a4f40();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureGather_2a4f40();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureGather_2a4f40();
+}
diff --git a/test/tint/builtins/gen/var/textureGather/4e8ac5.wgsl b/test/tint/builtins/gen/var/textureGather/4e8ac5.wgsl
new file mode 100644
index 0000000..6ca2fff
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/4e8ac5.wgsl
@@ -0,0 +1,48 @@
+// 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(1) var arg_1: texture_2d_array<i32>;
+@group(1) @binding(2) var arg_2: sampler;
+
+// fn textureGather(@const component: i32, texture: texture_2d_array<i32>, sampler: sampler, coords: vec2<f32>, array_index: u32) -> vec4<i32>
+fn textureGather_4e8ac5() {
+  const arg_0 = 1;
+  var arg_3 = vec2<f32>();
+  var arg_4 = 1u;
+  var res: vec4<i32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGather_4e8ac5();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureGather_4e8ac5();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureGather_4e8ac5();
+}
diff --git a/test/tint/builtins/gen/var/textureGather/4e8ac5.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/4e8ac5.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..b7cd247
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/4e8ac5.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture2DArray<int4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_4e8ac5() {
+  float2 arg_3 = (0.0f).xx;
+  uint arg_4 = 1u;
+  int4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureGather_4e8ac5();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureGather_4e8ac5();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureGather_4e8ac5();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/4e8ac5.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/4e8ac5.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..b7cd247
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/4e8ac5.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture2DArray<int4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_4e8ac5() {
+  float2 arg_3 = (0.0f).xx;
+  uint arg_4 = 1u;
+  int4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureGather_4e8ac5();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureGather_4e8ac5();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureGather_4e8ac5();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/4e8ac5.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGather/4e8ac5.wgsl.expected.glsl
new file mode 100644
index 0000000..6e29086
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/4e8ac5.wgsl.expected.glsl
@@ -0,0 +1,61 @@
+#version 310 es
+
+uniform highp isampler2DArray arg_1_arg_2;
+
+void textureGather_4e8ac5() {
+  vec2 arg_3 = vec2(0.0f);
+  uint arg_4 = 1u;
+  ivec4 res = textureGather(arg_1_arg_2, vec3(arg_3, float(arg_4)), int(1u));
+}
+
+vec4 vertex_main() {
+  textureGather_4e8ac5();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp isampler2DArray arg_1_arg_2;
+
+void textureGather_4e8ac5() {
+  vec2 arg_3 = vec2(0.0f);
+  uint arg_4 = 1u;
+  ivec4 res = textureGather(arg_1_arg_2, vec3(arg_3, float(arg_4)), int(1u));
+}
+
+void fragment_main() {
+  textureGather_4e8ac5();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp isampler2DArray arg_1_arg_2;
+
+void textureGather_4e8ac5() {
+  vec2 arg_3 = vec2(0.0f);
+  uint arg_4 = 1u;
+  ivec4 res = textureGather(arg_1_arg_2, vec3(arg_3, float(arg_4)), int(1u));
+}
+
+void compute_main() {
+  textureGather_4e8ac5();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/4e8ac5.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/4e8ac5.wgsl.expected.msl
new file mode 100644
index 0000000..da3939b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/4e8ac5.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureGather_4e8ac5(texture2d_array<int, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+  float2 arg_3 = float2(0.0f);
+  uint arg_4 = 1u;
+  int4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, arg_4, int2(0), component::y);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<int, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+  textureGather_4e8ac5(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<int, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<int, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+  textureGather_4e8ac5(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<int, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+  textureGather_4e8ac5(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureGather/4e8ac5.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/4e8ac5.wgsl.expected.spvasm
new file mode 100644
index 0000000..32feb91
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/4e8ac5.wgsl.expected.spvasm
@@ -0,0 +1,103 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 59
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %textureGather_4e8ac5 "textureGather_4e8ac5"
+               OpName %arg_3 "arg_3"
+               OpName %arg_4 "arg_4"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_1 DescriptorSet 1
+               OpDecorate %arg_1 Binding 1
+               OpDecorate %arg_2 DescriptorSet 1
+               OpDecorate %arg_2 Binding 2
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_1 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+         %15 = OpTypeSampler
+%_ptr_UniformConstant_15 = OpTypePointer UniformConstant %15
+      %arg_2 = OpVariable %_ptr_UniformConstant_15 UniformConstant
+       %void = OpTypeVoid
+         %16 = OpTypeFunction %void
+    %v2float = OpTypeVector %float 2
+         %21 = OpConstantNull %v2float
+%_ptr_Function_v2float = OpTypePointer Function %v2float
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %28 = OpConstantNull %uint
+      %v4int = OpTypeVector %int 4
+         %33 = OpTypeSampledImage %11
+    %v3float = OpTypeVector %float 3
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+         %44 = OpConstantNull %v4int
+         %45 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureGather_4e8ac5 = OpFunction %void None %16
+         %19 = OpLabel
+      %arg_3 = OpVariable %_ptr_Function_v2float Function %21
+      %arg_4 = OpVariable %_ptr_Function_uint Function %28
+        %res = OpVariable %_ptr_Function_v4int Function %44
+               OpStore %arg_3 %21
+               OpStore %arg_4 %uint_1
+         %31 = OpLoad %15 %arg_2
+         %32 = OpLoad %11 %arg_1
+         %34 = OpSampledImage %33 %32 %31
+         %36 = OpLoad %v2float %arg_3
+         %37 = OpCompositeExtract %float %36 0
+         %38 = OpCompositeExtract %float %36 1
+         %40 = OpLoad %uint %arg_4
+         %39 = OpConvertUToF %float %40
+         %41 = OpCompositeConstruct %v3float %37 %38 %39
+         %29 = OpImageGather %v4int %34 %41 %uint_1
+               OpStore %res %29
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %45
+         %47 = OpLabel
+         %48 = OpFunctionCall %void %textureGather_4e8ac5
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %16
+         %50 = OpLabel
+         %51 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %51
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %16
+         %54 = OpLabel
+         %55 = OpFunctionCall %void %textureGather_4e8ac5
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %16
+         %57 = OpLabel
+         %58 = OpFunctionCall %void %textureGather_4e8ac5
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureGather/4e8ac5.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/4e8ac5.wgsl.expected.wgsl
new file mode 100644
index 0000000..cb06b2a
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/4e8ac5.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+@group(1) @binding(1) var arg_1 : texture_2d_array<i32>;
+
+@group(1) @binding(2) var arg_2 : sampler;
+
+fn textureGather_4e8ac5() {
+  const arg_0 = 1;
+  var arg_3 = vec2<f32>();
+  var arg_4 = 1u;
+  var res : vec4<i32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGather_4e8ac5();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureGather_4e8ac5();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureGather_4e8ac5();
+}
diff --git a/test/tint/builtins/gen/var/textureGather/59372a.wgsl b/test/tint/builtins/gen/var/textureGather/59372a.wgsl
new file mode 100644
index 0000000..c3bb248
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/59372a.wgsl
@@ -0,0 +1,49 @@
+// 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(1) var arg_1: texture_2d_array<f32>;
+@group(1) @binding(2) var arg_2: sampler;
+
+// fn textureGather(@const component: i32, texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: u32, @const offset: vec2<i32>) -> vec4<f32>
+fn textureGather_59372a() {
+  const arg_0 = 1;
+  var arg_3 = vec2<f32>();
+  var arg_4 = 1u;
+  const arg_5 = vec2<i32>();
+  var res: vec4<f32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGather_59372a();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureGather_59372a();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureGather_59372a();
+}
diff --git a/test/tint/builtins/gen/var/textureGather/59372a.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/59372a.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..9e2af14
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/59372a.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture2DArray<float4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_59372a() {
+  float2 arg_3 = (0.0f).xx;
+  uint arg_4 = 1u;
+  float4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)), (0).xx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureGather_59372a();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureGather_59372a();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureGather_59372a();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/59372a.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/59372a.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..9e2af14
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/59372a.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture2DArray<float4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_59372a() {
+  float2 arg_3 = (0.0f).xx;
+  uint arg_4 = 1u;
+  float4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)), (0).xx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureGather_59372a();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureGather_59372a();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureGather_59372a();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/59372a.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGather/59372a.wgsl.expected.glsl
new file mode 100644
index 0000000..e93d50d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/59372a.wgsl.expected.glsl
@@ -0,0 +1,61 @@
+#version 310 es
+
+uniform highp sampler2DArray arg_1_arg_2;
+
+void textureGather_59372a() {
+  vec2 arg_3 = vec2(0.0f);
+  uint arg_4 = 1u;
+  vec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(0), int(1u));
+}
+
+vec4 vertex_main() {
+  textureGather_59372a();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2DArray arg_1_arg_2;
+
+void textureGather_59372a() {
+  vec2 arg_3 = vec2(0.0f);
+  uint arg_4 = 1u;
+  vec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(0), int(1u));
+}
+
+void fragment_main() {
+  textureGather_59372a();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp sampler2DArray arg_1_arg_2;
+
+void textureGather_59372a() {
+  vec2 arg_3 = vec2(0.0f);
+  uint arg_4 = 1u;
+  vec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(0), int(1u));
+}
+
+void compute_main() {
+  textureGather_59372a();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/59372a.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/59372a.wgsl.expected.msl
new file mode 100644
index 0000000..2299af0
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/59372a.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureGather_59372a(texture2d_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+  float2 arg_3 = float2(0.0f);
+  uint arg_4 = 1u;
+  float4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, arg_4, int2(0), component::y);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<float, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+  textureGather_59372a(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+  textureGather_59372a(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+  textureGather_59372a(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureGather/59372a.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/59372a.wgsl.expected.spvasm
new file mode 100644
index 0000000..b38cf1a
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/59372a.wgsl.expected.spvasm
@@ -0,0 +1,103 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 59
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %textureGather_59372a "textureGather_59372a"
+               OpName %arg_3 "arg_3"
+               OpName %arg_4 "arg_4"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_1 DescriptorSet 1
+               OpDecorate %arg_1 Binding 1
+               OpDecorate %arg_2 DescriptorSet 1
+               OpDecorate %arg_2 Binding 2
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_1 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+         %14 = OpTypeSampler
+%_ptr_UniformConstant_14 = OpTypePointer UniformConstant %14
+      %arg_2 = OpVariable %_ptr_UniformConstant_14 UniformConstant
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+    %v2float = OpTypeVector %float 2
+         %20 = OpConstantNull %v2float
+%_ptr_Function_v2float = OpTypePointer Function %v2float
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %27 = OpConstantNull %uint
+         %31 = OpTypeSampledImage %11
+    %v3float = OpTypeVector %float 3
+        %int = OpTypeInt 32 1
+      %v2int = OpTypeVector %int 2
+         %42 = OpConstantNull %v2int
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+         %45 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureGather_59372a = OpFunction %void None %15
+         %18 = OpLabel
+      %arg_3 = OpVariable %_ptr_Function_v2float Function %20
+      %arg_4 = OpVariable %_ptr_Function_uint Function %27
+        %res = OpVariable %_ptr_Function_v4float Function %5
+               OpStore %arg_3 %20
+               OpStore %arg_4 %uint_1
+         %29 = OpLoad %14 %arg_2
+         %30 = OpLoad %11 %arg_1
+         %32 = OpSampledImage %31 %30 %29
+         %34 = OpLoad %v2float %arg_3
+         %35 = OpCompositeExtract %float %34 0
+         %36 = OpCompositeExtract %float %34 1
+         %38 = OpLoad %uint %arg_4
+         %37 = OpConvertUToF %float %38
+         %39 = OpCompositeConstruct %v3float %35 %36 %37
+         %28 = OpImageGather %v4float %32 %39 %uint_1 ConstOffset %42
+               OpStore %res %28
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %45
+         %47 = OpLabel
+         %48 = OpFunctionCall %void %textureGather_59372a
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %50 = OpLabel
+         %51 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %51
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %54 = OpLabel
+         %55 = OpFunctionCall %void %textureGather_59372a
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %57 = OpLabel
+         %58 = OpFunctionCall %void %textureGather_59372a
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureGather/59372a.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/59372a.wgsl.expected.wgsl
new file mode 100644
index 0000000..84e71d5
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/59372a.wgsl.expected.wgsl
@@ -0,0 +1,27 @@
+@group(1) @binding(1) var arg_1 : texture_2d_array<f32>;
+
+@group(1) @binding(2) var arg_2 : sampler;
+
+fn textureGather_59372a() {
+  const arg_0 = 1;
+  var arg_3 = vec2<f32>();
+  var arg_4 = 1u;
+  const arg_5 = vec2<i32>();
+  var res : vec4<f32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGather_59372a();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureGather_59372a();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureGather_59372a();
+}
diff --git a/test/tint/builtins/gen/var/textureGather/6b7b74.wgsl b/test/tint/builtins/gen/var/textureGather/6b7b74.wgsl
new file mode 100644
index 0000000..b47e75e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/6b7b74.wgsl
@@ -0,0 +1,49 @@
+// 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(1) var arg_1: texture_2d_array<u32>;
+@group(1) @binding(2) var arg_2: sampler;
+
+// fn textureGather(@const component: u32, texture: texture_2d_array<u32>, sampler: sampler, coords: vec2<f32>, array_index: u32, @const offset: vec2<i32>) -> vec4<u32>
+fn textureGather_6b7b74() {
+  const arg_0 = 1u;
+  var arg_3 = vec2<f32>();
+  var arg_4 = 1u;
+  const arg_5 = vec2<i32>();
+  var res: vec4<u32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGather_6b7b74();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureGather_6b7b74();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureGather_6b7b74();
+}
diff --git a/test/tint/builtins/gen/var/textureGather/6b7b74.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/6b7b74.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..691fd8d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/6b7b74.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture2DArray<uint4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_6b7b74() {
+  float2 arg_3 = (0.0f).xx;
+  uint arg_4 = 1u;
+  uint4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)), (0).xx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureGather_6b7b74();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureGather_6b7b74();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureGather_6b7b74();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/6b7b74.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/6b7b74.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..691fd8d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/6b7b74.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture2DArray<uint4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_6b7b74() {
+  float2 arg_3 = (0.0f).xx;
+  uint arg_4 = 1u;
+  uint4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)), (0).xx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureGather_6b7b74();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureGather_6b7b74();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureGather_6b7b74();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/6b7b74.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGather/6b7b74.wgsl.expected.glsl
new file mode 100644
index 0000000..bb9053c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/6b7b74.wgsl.expected.glsl
@@ -0,0 +1,61 @@
+#version 310 es
+
+uniform highp usampler2DArray arg_1_arg_2;
+
+void textureGather_6b7b74() {
+  vec2 arg_3 = vec2(0.0f);
+  uint arg_4 = 1u;
+  uvec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(0), int(1u));
+}
+
+vec4 vertex_main() {
+  textureGather_6b7b74();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp usampler2DArray arg_1_arg_2;
+
+void textureGather_6b7b74() {
+  vec2 arg_3 = vec2(0.0f);
+  uint arg_4 = 1u;
+  uvec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(0), int(1u));
+}
+
+void fragment_main() {
+  textureGather_6b7b74();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp usampler2DArray arg_1_arg_2;
+
+void textureGather_6b7b74() {
+  vec2 arg_3 = vec2(0.0f);
+  uint arg_4 = 1u;
+  uvec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(0), int(1u));
+}
+
+void compute_main() {
+  textureGather_6b7b74();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/6b7b74.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/6b7b74.wgsl.expected.msl
new file mode 100644
index 0000000..188a667
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/6b7b74.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureGather_6b7b74(texture2d_array<uint, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+  float2 arg_3 = float2(0.0f);
+  uint arg_4 = 1u;
+  uint4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, arg_4, int2(0), component::y);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<uint, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+  textureGather_6b7b74(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<uint, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<uint, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+  textureGather_6b7b74(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<uint, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+  textureGather_6b7b74(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureGather/6b7b74.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/6b7b74.wgsl.expected.spvasm
new file mode 100644
index 0000000..dcb03e7
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/6b7b74.wgsl.expected.spvasm
@@ -0,0 +1,105 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 61
+; 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_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %textureGather_6b7b74 "textureGather_6b7b74"
+               OpName %arg_3 "arg_3"
+               OpName %arg_4 "arg_4"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_1 DescriptorSet 1
+               OpDecorate %arg_1 Binding 1
+               OpDecorate %arg_2 DescriptorSet 1
+               OpDecorate %arg_2 Binding 2
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_1 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+         %15 = OpTypeSampler
+%_ptr_UniformConstant_15 = OpTypePointer UniformConstant %15
+      %arg_2 = OpVariable %_ptr_UniformConstant_15 UniformConstant
+       %void = OpTypeVoid
+         %16 = OpTypeFunction %void
+    %v2float = OpTypeVector %float 2
+         %21 = OpConstantNull %v2float
+%_ptr_Function_v2float = OpTypePointer Function %v2float
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %27 = OpConstantNull %uint
+     %v4uint = OpTypeVector %uint 4
+         %32 = OpTypeSampledImage %11
+    %v3float = OpTypeVector %float 3
+        %int = OpTypeInt 32 1
+      %v2int = OpTypeVector %int 2
+         %43 = OpConstantNull %v2int
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+         %46 = OpConstantNull %v4uint
+         %47 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureGather_6b7b74 = OpFunction %void None %16
+         %19 = OpLabel
+      %arg_3 = OpVariable %_ptr_Function_v2float Function %21
+      %arg_4 = OpVariable %_ptr_Function_uint Function %27
+        %res = OpVariable %_ptr_Function_v4uint Function %46
+               OpStore %arg_3 %21
+               OpStore %arg_4 %uint_1
+         %30 = OpLoad %15 %arg_2
+         %31 = OpLoad %11 %arg_1
+         %33 = OpSampledImage %32 %31 %30
+         %35 = OpLoad %v2float %arg_3
+         %36 = OpCompositeExtract %float %35 0
+         %37 = OpCompositeExtract %float %35 1
+         %39 = OpLoad %uint %arg_4
+         %38 = OpConvertUToF %float %39
+         %40 = OpCompositeConstruct %v3float %36 %37 %38
+         %28 = OpImageGather %v4uint %33 %40 %uint_1 ConstOffset %43
+               OpStore %res %28
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %47
+         %49 = OpLabel
+         %50 = OpFunctionCall %void %textureGather_6b7b74
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %16
+         %52 = OpLabel
+         %53 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %53
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %16
+         %56 = OpLabel
+         %57 = OpFunctionCall %void %textureGather_6b7b74
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %16
+         %59 = OpLabel
+         %60 = OpFunctionCall %void %textureGather_6b7b74
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureGather/6b7b74.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/6b7b74.wgsl.expected.wgsl
new file mode 100644
index 0000000..62867d7
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/6b7b74.wgsl.expected.wgsl
@@ -0,0 +1,27 @@
+@group(1) @binding(1) var arg_1 : texture_2d_array<u32>;
+
+@group(1) @binding(2) var arg_2 : sampler;
+
+fn textureGather_6b7b74() {
+  const arg_0 = 1u;
+  var arg_3 = vec2<f32>();
+  var arg_4 = 1u;
+  const arg_5 = vec2<i32>();
+  var res : vec4<u32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGather_6b7b74();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureGather_6b7b74();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureGather_6b7b74();
+}
diff --git a/test/tint/builtins/gen/var/textureGather/788010.wgsl b/test/tint/builtins/gen/var/textureGather/788010.wgsl
new file mode 100644
index 0000000..ac0b32b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/788010.wgsl
@@ -0,0 +1,48 @@
+// 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(1) var arg_1: texture_cube_array<i32>;
+@group(1) @binding(2) var arg_2: sampler;
+
+// fn textureGather(@const component: i32, texture: texture_cube_array<i32>, sampler: sampler, coords: vec3<f32>, array_index: u32) -> vec4<i32>
+fn textureGather_788010() {
+  const arg_0 = 1;
+  var arg_3 = vec3<f32>();
+  var arg_4 = 1u;
+  var res: vec4<i32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGather_788010();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureGather_788010();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureGather_788010();
+}
diff --git a/test/tint/builtins/gen/var/textureGather/788010.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/788010.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..130a99e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/788010.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+TextureCubeArray<int4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_788010() {
+  float3 arg_3 = (0.0f).xxx;
+  uint arg_4 = 1u;
+  int4 res = arg_1.GatherGreen(arg_2, float4(arg_3, float(arg_4)));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureGather_788010();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureGather_788010();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureGather_788010();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/788010.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/788010.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..130a99e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/788010.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+TextureCubeArray<int4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_788010() {
+  float3 arg_3 = (0.0f).xxx;
+  uint arg_4 = 1u;
+  int4 res = arg_1.GatherGreen(arg_2, float4(arg_3, float(arg_4)));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureGather_788010();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureGather_788010();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureGather_788010();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/788010.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGather/788010.wgsl.expected.glsl
new file mode 100644
index 0000000..ab20a08
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/788010.wgsl.expected.glsl
@@ -0,0 +1,84 @@
+SKIP: FAILED
+
+#version 310 es
+
+uniform highp isamplerCubeArray arg_1_arg_2;
+
+void textureGather_788010() {
+  vec3 arg_3 = vec3(0.0f);
+  uint arg_4 = 1u;
+  ivec4 res = textureGather(arg_1_arg_2, vec4(arg_3, float(arg_4)), int(1u));
+}
+
+vec4 vertex_main() {
+  textureGather_788010();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'isamplerCubeArray' : Reserved word. 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+uniform highp isamplerCubeArray arg_1_arg_2;
+
+void textureGather_788010() {
+  vec3 arg_3 = vec3(0.0f);
+  uint arg_4 = 1u;
+  ivec4 res = textureGather(arg_1_arg_2, vec4(arg_3, float(arg_4)), int(1u));
+}
+
+void fragment_main() {
+  textureGather_788010();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'isamplerCubeArray' : Reserved word. 
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+uniform highp isamplerCubeArray arg_1_arg_2;
+
+void textureGather_788010() {
+  vec3 arg_3 = vec3(0.0f);
+  uint arg_4 = 1u;
+  ivec4 res = textureGather(arg_1_arg_2, vec4(arg_3, float(arg_4)), int(1u));
+}
+
+void compute_main() {
+  textureGather_788010();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'isamplerCubeArray' : Reserved word. 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureGather/788010.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/788010.wgsl.expected.msl
new file mode 100644
index 0000000..2c80712
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/788010.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureGather_788010(texturecube_array<int, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+  float3 arg_3 = float3(0.0f);
+  uint arg_4 = 1u;
+  int4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, arg_4, component::y);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texturecube_array<int, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+  textureGather_788010(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texturecube_array<int, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texturecube_array<int, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+  textureGather_788010(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texturecube_array<int, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+  textureGather_788010(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureGather/788010.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/788010.wgsl.expected.spvasm
new file mode 100644
index 0000000..d1df655
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/788010.wgsl.expected.spvasm
@@ -0,0 +1,104 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 59
+; Schema: 0
+               OpCapability Shader
+               OpCapability SampledCubeArray
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %textureGather_788010 "textureGather_788010"
+               OpName %arg_3 "arg_3"
+               OpName %arg_4 "arg_4"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_1 DescriptorSet 1
+               OpDecorate %arg_1 Binding 1
+               OpDecorate %arg_2 DescriptorSet 1
+               OpDecorate %arg_2 Binding 2
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int Cube 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_1 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+         %15 = OpTypeSampler
+%_ptr_UniformConstant_15 = OpTypePointer UniformConstant %15
+      %arg_2 = OpVariable %_ptr_UniformConstant_15 UniformConstant
+       %void = OpTypeVoid
+         %16 = OpTypeFunction %void
+    %v3float = OpTypeVector %float 3
+         %21 = OpConstantNull %v3float
+%_ptr_Function_v3float = OpTypePointer Function %v3float
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %28 = OpConstantNull %uint
+      %v4int = OpTypeVector %int 4
+         %33 = OpTypeSampledImage %11
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+         %44 = OpConstantNull %v4int
+         %45 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureGather_788010 = OpFunction %void None %16
+         %19 = OpLabel
+      %arg_3 = OpVariable %_ptr_Function_v3float Function %21
+      %arg_4 = OpVariable %_ptr_Function_uint Function %28
+        %res = OpVariable %_ptr_Function_v4int Function %44
+               OpStore %arg_3 %21
+               OpStore %arg_4 %uint_1
+         %31 = OpLoad %15 %arg_2
+         %32 = OpLoad %11 %arg_1
+         %34 = OpSampledImage %33 %32 %31
+         %35 = OpLoad %v3float %arg_3
+         %36 = OpCompositeExtract %float %35 0
+         %37 = OpCompositeExtract %float %35 1
+         %38 = OpCompositeExtract %float %35 2
+         %40 = OpLoad %uint %arg_4
+         %39 = OpConvertUToF %float %40
+         %41 = OpCompositeConstruct %v4float %36 %37 %38 %39
+         %29 = OpImageGather %v4int %34 %41 %uint_1
+               OpStore %res %29
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %45
+         %47 = OpLabel
+         %48 = OpFunctionCall %void %textureGather_788010
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %16
+         %50 = OpLabel
+         %51 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %51
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %16
+         %54 = OpLabel
+         %55 = OpFunctionCall %void %textureGather_788010
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %16
+         %57 = OpLabel
+         %58 = OpFunctionCall %void %textureGather_788010
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureGather/788010.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/788010.wgsl.expected.wgsl
new file mode 100644
index 0000000..da05951
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/788010.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+@group(1) @binding(1) var arg_1 : texture_cube_array<i32>;
+
+@group(1) @binding(2) var arg_2 : sampler;
+
+fn textureGather_788010() {
+  const arg_0 = 1;
+  var arg_3 = vec3<f32>();
+  var arg_4 = 1u;
+  var res : vec4<i32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGather_788010();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureGather_788010();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureGather_788010();
+}
diff --git a/test/tint/builtins/gen/var/textureGather/7dd226.wgsl b/test/tint/builtins/gen/var/textureGather/7dd226.wgsl
new file mode 100644
index 0000000..b781710
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/7dd226.wgsl
@@ -0,0 +1,47 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_depth_cube_array;
+@group(1) @binding(1) var arg_1: sampler;
+
+// fn textureGather(texture: texture_depth_cube_array, sampler: sampler, coords: vec3<f32>, array_index: u32) -> vec4<f32>
+fn textureGather_7dd226() {
+  var arg_2 = vec3<f32>();
+  var arg_3 = 1u;
+  var res: vec4<f32> = textureGather(arg_0, arg_1, arg_2, arg_3);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGather_7dd226();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureGather_7dd226();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureGather_7dd226();
+}
diff --git a/test/tint/builtins/gen/var/textureGather/7dd226.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/7dd226.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..13f7566
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/7dd226.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+TextureCubeArray arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureGather_7dd226() {
+  float3 arg_2 = (0.0f).xxx;
+  uint arg_3 = 1u;
+  float4 res = arg_0.Gather(arg_1, float4(arg_2, float(arg_3)));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureGather_7dd226();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureGather_7dd226();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureGather_7dd226();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/7dd226.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/7dd226.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..13f7566
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/7dd226.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+TextureCubeArray arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureGather_7dd226() {
+  float3 arg_2 = (0.0f).xxx;
+  uint arg_3 = 1u;
+  float4 res = arg_0.Gather(arg_1, float4(arg_2, float(arg_3)));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureGather_7dd226();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureGather_7dd226();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureGather_7dd226();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/7dd226.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGather/7dd226.wgsl.expected.glsl
new file mode 100644
index 0000000..d7fca45
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/7dd226.wgsl.expected.glsl
@@ -0,0 +1,84 @@
+SKIP: FAILED
+
+#version 310 es
+
+uniform highp samplerCubeArrayShadow arg_0_arg_1;
+
+void textureGather_7dd226() {
+  vec3 arg_2 = vec3(0.0f);
+  uint arg_3 = 1u;
+  vec4 res = textureGather(arg_0_arg_1, vec4(arg_2, float(arg_3)), 0.0);
+}
+
+vec4 vertex_main() {
+  textureGather_7dd226();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  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: 'samplerCubeArrayShadow' : Reserved word. 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+uniform highp samplerCubeArrayShadow arg_0_arg_1;
+
+void textureGather_7dd226() {
+  vec3 arg_2 = vec3(0.0f);
+  uint arg_3 = 1u;
+  vec4 res = textureGather(arg_0_arg_1, vec4(arg_2, float(arg_3)), 0.0);
+}
+
+void fragment_main() {
+  textureGather_7dd226();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'samplerCubeArrayShadow' : Reserved word. 
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+uniform highp samplerCubeArrayShadow arg_0_arg_1;
+
+void textureGather_7dd226() {
+  vec3 arg_2 = vec3(0.0f);
+  uint arg_3 = 1u;
+  vec4 res = textureGather(arg_0_arg_1, vec4(arg_2, float(arg_3)), 0.0);
+}
+
+void compute_main() {
+  textureGather_7dd226();
+}
+
+layout(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: 'samplerCubeArrayShadow' : Reserved word. 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureGather/7dd226.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/7dd226.wgsl.expected.msl
new file mode 100644
index 0000000..1c7b39b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/7dd226.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureGather_7dd226(depthcube_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+  float3 arg_2 = float3(0.0f);
+  uint arg_3 = 1u;
+  float4 res = tint_symbol_1.gather(tint_symbol_2, arg_2, arg_3);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(depthcube_array<float, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+  textureGather_7dd226(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(depthcube_array<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(depthcube_array<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+  textureGather_7dd226(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(depthcube_array<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+  textureGather_7dd226(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureGather/7dd226.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/7dd226.wgsl.expected.spvasm
new file mode 100644
index 0000000..dc42b14
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/7dd226.wgsl.expected.spvasm
@@ -0,0 +1,103 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 58
+; Schema: 0
+               OpCapability Shader
+               OpCapability SampledCubeArray
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %arg_1 "arg_1"
+               OpName %textureGather_7dd226 "textureGather_7dd226"
+               OpName %arg_2 "arg_2"
+               OpName %arg_3 "arg_3"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %arg_1 DescriptorSet 1
+               OpDecorate %arg_1 Binding 1
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float Cube 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+         %14 = OpTypeSampler
+%_ptr_UniformConstant_14 = OpTypePointer UniformConstant %14
+      %arg_1 = OpVariable %_ptr_UniformConstant_14 UniformConstant
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+    %v3float = OpTypeVector %float 3
+         %20 = OpConstantNull %v3float
+%_ptr_Function_v3float = OpTypePointer Function %v3float
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %27 = OpConstantNull %uint
+         %31 = OpTypeSampledImage %11
+        %int = OpTypeInt 32 1
+      %int_0 = OpConstant %int 0
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+         %44 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureGather_7dd226 = OpFunction %void None %15
+         %18 = OpLabel
+      %arg_2 = OpVariable %_ptr_Function_v3float Function %20
+      %arg_3 = OpVariable %_ptr_Function_uint Function %27
+        %res = OpVariable %_ptr_Function_v4float Function %5
+               OpStore %arg_2 %20
+               OpStore %arg_3 %uint_1
+         %29 = OpLoad %14 %arg_1
+         %30 = OpLoad %11 %arg_0
+         %32 = OpSampledImage %31 %30 %29
+         %33 = OpLoad %v3float %arg_2
+         %34 = OpCompositeExtract %float %33 0
+         %35 = OpCompositeExtract %float %33 1
+         %36 = OpCompositeExtract %float %33 2
+         %38 = OpLoad %uint %arg_3
+         %37 = OpConvertUToF %float %38
+         %39 = OpCompositeConstruct %v4float %34 %35 %36 %37
+         %28 = OpImageGather %v4float %32 %39 %int_0
+               OpStore %res %28
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %44
+         %46 = OpLabel
+         %47 = OpFunctionCall %void %textureGather_7dd226
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %49 = OpLabel
+         %50 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %50
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %53 = OpLabel
+         %54 = OpFunctionCall %void %textureGather_7dd226
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %56 = OpLabel
+         %57 = OpFunctionCall %void %textureGather_7dd226
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureGather/7dd226.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/7dd226.wgsl.expected.wgsl
new file mode 100644
index 0000000..0e0eb90
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/7dd226.wgsl.expected.wgsl
@@ -0,0 +1,25 @@
+@group(1) @binding(0) var arg_0 : texture_depth_cube_array;
+
+@group(1) @binding(1) var arg_1 : sampler;
+
+fn textureGather_7dd226() {
+  var arg_2 = vec3<f32>();
+  var arg_3 = 1u;
+  var res : vec4<f32> = textureGather(arg_0, arg_1, arg_2, arg_3);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGather_7dd226();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureGather_7dd226();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureGather_7dd226();
+}
diff --git a/test/tint/builtins/gen/var/textureGather/829357.wgsl b/test/tint/builtins/gen/var/textureGather/829357.wgsl
new file mode 100644
index 0000000..fdb7381
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/829357.wgsl
@@ -0,0 +1,48 @@
+// 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(1) var arg_1: texture_cube_array<f32>;
+@group(1) @binding(2) var arg_2: sampler;
+
+// fn textureGather(@const component: i32, texture: texture_cube_array<f32>, sampler: sampler, coords: vec3<f32>, array_index: u32) -> vec4<f32>
+fn textureGather_829357() {
+  const arg_0 = 1;
+  var arg_3 = vec3<f32>();
+  var arg_4 = 1u;
+  var res: vec4<f32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGather_829357();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureGather_829357();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureGather_829357();
+}
diff --git a/test/tint/builtins/gen/var/textureGather/829357.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/829357.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..77abe9b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/829357.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+TextureCubeArray<float4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_829357() {
+  float3 arg_3 = (0.0f).xxx;
+  uint arg_4 = 1u;
+  float4 res = arg_1.GatherGreen(arg_2, float4(arg_3, float(arg_4)));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureGather_829357();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureGather_829357();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureGather_829357();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/829357.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/829357.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..77abe9b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/829357.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+TextureCubeArray<float4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_829357() {
+  float3 arg_3 = (0.0f).xxx;
+  uint arg_4 = 1u;
+  float4 res = arg_1.GatherGreen(arg_2, float4(arg_3, float(arg_4)));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureGather_829357();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureGather_829357();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureGather_829357();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/829357.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGather/829357.wgsl.expected.glsl
new file mode 100644
index 0000000..ff8bc8a
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/829357.wgsl.expected.glsl
@@ -0,0 +1,84 @@
+SKIP: FAILED
+
+#version 310 es
+
+uniform highp samplerCubeArray arg_1_arg_2;
+
+void textureGather_829357() {
+  vec3 arg_3 = vec3(0.0f);
+  uint arg_4 = 1u;
+  vec4 res = textureGather(arg_1_arg_2, vec4(arg_3, float(arg_4)), int(1u));
+}
+
+vec4 vertex_main() {
+  textureGather_829357();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'samplerCubeArray' : Reserved word. 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+uniform highp samplerCubeArray arg_1_arg_2;
+
+void textureGather_829357() {
+  vec3 arg_3 = vec3(0.0f);
+  uint arg_4 = 1u;
+  vec4 res = textureGather(arg_1_arg_2, vec4(arg_3, float(arg_4)), int(1u));
+}
+
+void fragment_main() {
+  textureGather_829357();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'samplerCubeArray' : Reserved word. 
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+uniform highp samplerCubeArray arg_1_arg_2;
+
+void textureGather_829357() {
+  vec3 arg_3 = vec3(0.0f);
+  uint arg_4 = 1u;
+  vec4 res = textureGather(arg_1_arg_2, vec4(arg_3, float(arg_4)), int(1u));
+}
+
+void compute_main() {
+  textureGather_829357();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'samplerCubeArray' : Reserved word. 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureGather/829357.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/829357.wgsl.expected.msl
new file mode 100644
index 0000000..89c6bfb
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/829357.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureGather_829357(texturecube_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+  float3 arg_3 = float3(0.0f);
+  uint arg_4 = 1u;
+  float4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, arg_4, component::y);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texturecube_array<float, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+  textureGather_829357(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texturecube_array<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texturecube_array<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+  textureGather_829357(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texturecube_array<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+  textureGather_829357(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureGather/829357.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/829357.wgsl.expected.spvasm
new file mode 100644
index 0000000..0e85359
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/829357.wgsl.expected.spvasm
@@ -0,0 +1,101 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 56
+; Schema: 0
+               OpCapability Shader
+               OpCapability SampledCubeArray
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %textureGather_829357 "textureGather_829357"
+               OpName %arg_3 "arg_3"
+               OpName %arg_4 "arg_4"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_1 DescriptorSet 1
+               OpDecorate %arg_1 Binding 1
+               OpDecorate %arg_2 DescriptorSet 1
+               OpDecorate %arg_2 Binding 2
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float Cube 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_1 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+         %14 = OpTypeSampler
+%_ptr_UniformConstant_14 = OpTypePointer UniformConstant %14
+      %arg_2 = OpVariable %_ptr_UniformConstant_14 UniformConstant
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+    %v3float = OpTypeVector %float 3
+         %20 = OpConstantNull %v3float
+%_ptr_Function_v3float = OpTypePointer Function %v3float
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %27 = OpConstantNull %uint
+         %31 = OpTypeSampledImage %11
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+         %42 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureGather_829357 = OpFunction %void None %15
+         %18 = OpLabel
+      %arg_3 = OpVariable %_ptr_Function_v3float Function %20
+      %arg_4 = OpVariable %_ptr_Function_uint Function %27
+        %res = OpVariable %_ptr_Function_v4float Function %5
+               OpStore %arg_3 %20
+               OpStore %arg_4 %uint_1
+         %29 = OpLoad %14 %arg_2
+         %30 = OpLoad %11 %arg_1
+         %32 = OpSampledImage %31 %30 %29
+         %33 = OpLoad %v3float %arg_3
+         %34 = OpCompositeExtract %float %33 0
+         %35 = OpCompositeExtract %float %33 1
+         %36 = OpCompositeExtract %float %33 2
+         %38 = OpLoad %uint %arg_4
+         %37 = OpConvertUToF %float %38
+         %39 = OpCompositeConstruct %v4float %34 %35 %36 %37
+         %28 = OpImageGather %v4float %32 %39 %uint_1
+               OpStore %res %28
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %42
+         %44 = OpLabel
+         %45 = OpFunctionCall %void %textureGather_829357
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %47 = OpLabel
+         %48 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %48
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %51 = OpLabel
+         %52 = OpFunctionCall %void %textureGather_829357
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %54 = OpLabel
+         %55 = OpFunctionCall %void %textureGather_829357
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureGather/829357.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/829357.wgsl.expected.wgsl
new file mode 100644
index 0000000..cddda4f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/829357.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+@group(1) @binding(1) var arg_1 : texture_cube_array<f32>;
+
+@group(1) @binding(2) var arg_2 : sampler;
+
+fn textureGather_829357() {
+  const arg_0 = 1;
+  var arg_3 = vec3<f32>();
+  var arg_4 = 1u;
+  var res : vec4<f32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGather_829357();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureGather_829357();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureGather_829357();
+}
diff --git a/test/tint/builtins/gen/var/textureGather/8578bc.wgsl b/test/tint/builtins/gen/var/textureGather/8578bc.wgsl
new file mode 100644
index 0000000..44ac499
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/8578bc.wgsl
@@ -0,0 +1,48 @@
+// 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(1) var arg_1: texture_cube_array<f32>;
+@group(1) @binding(2) var arg_2: sampler;
+
+// fn textureGather(@const component: u32, texture: texture_cube_array<f32>, sampler: sampler, coords: vec3<f32>, array_index: u32) -> vec4<f32>
+fn textureGather_8578bc() {
+  const arg_0 = 1u;
+  var arg_3 = vec3<f32>();
+  var arg_4 = 1u;
+  var res: vec4<f32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGather_8578bc();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureGather_8578bc();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureGather_8578bc();
+}
diff --git a/test/tint/builtins/gen/var/textureGather/8578bc.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/8578bc.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..58ad0bd
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/8578bc.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+TextureCubeArray<float4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_8578bc() {
+  float3 arg_3 = (0.0f).xxx;
+  uint arg_4 = 1u;
+  float4 res = arg_1.GatherGreen(arg_2, float4(arg_3, float(arg_4)));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureGather_8578bc();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureGather_8578bc();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureGather_8578bc();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/8578bc.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/8578bc.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..58ad0bd
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/8578bc.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+TextureCubeArray<float4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_8578bc() {
+  float3 arg_3 = (0.0f).xxx;
+  uint arg_4 = 1u;
+  float4 res = arg_1.GatherGreen(arg_2, float4(arg_3, float(arg_4)));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureGather_8578bc();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureGather_8578bc();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureGather_8578bc();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/8578bc.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGather/8578bc.wgsl.expected.glsl
new file mode 100644
index 0000000..a3c29f8
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/8578bc.wgsl.expected.glsl
@@ -0,0 +1,84 @@
+SKIP: FAILED
+
+#version 310 es
+
+uniform highp samplerCubeArray arg_1_arg_2;
+
+void textureGather_8578bc() {
+  vec3 arg_3 = vec3(0.0f);
+  uint arg_4 = 1u;
+  vec4 res = textureGather(arg_1_arg_2, vec4(arg_3, float(arg_4)), int(1u));
+}
+
+vec4 vertex_main() {
+  textureGather_8578bc();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'samplerCubeArray' : Reserved word. 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+uniform highp samplerCubeArray arg_1_arg_2;
+
+void textureGather_8578bc() {
+  vec3 arg_3 = vec3(0.0f);
+  uint arg_4 = 1u;
+  vec4 res = textureGather(arg_1_arg_2, vec4(arg_3, float(arg_4)), int(1u));
+}
+
+void fragment_main() {
+  textureGather_8578bc();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'samplerCubeArray' : Reserved word. 
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+uniform highp samplerCubeArray arg_1_arg_2;
+
+void textureGather_8578bc() {
+  vec3 arg_3 = vec3(0.0f);
+  uint arg_4 = 1u;
+  vec4 res = textureGather(arg_1_arg_2, vec4(arg_3, float(arg_4)), int(1u));
+}
+
+void compute_main() {
+  textureGather_8578bc();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'samplerCubeArray' : Reserved word. 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureGather/8578bc.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/8578bc.wgsl.expected.msl
new file mode 100644
index 0000000..e802a9c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/8578bc.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureGather_8578bc(texturecube_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+  float3 arg_3 = float3(0.0f);
+  uint arg_4 = 1u;
+  float4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, arg_4, component::y);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texturecube_array<float, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+  textureGather_8578bc(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texturecube_array<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texturecube_array<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+  textureGather_8578bc(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texturecube_array<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+  textureGather_8578bc(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureGather/8578bc.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/8578bc.wgsl.expected.spvasm
new file mode 100644
index 0000000..2c1c930
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/8578bc.wgsl.expected.spvasm
@@ -0,0 +1,101 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 56
+; Schema: 0
+               OpCapability Shader
+               OpCapability SampledCubeArray
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %textureGather_8578bc "textureGather_8578bc"
+               OpName %arg_3 "arg_3"
+               OpName %arg_4 "arg_4"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_1 DescriptorSet 1
+               OpDecorate %arg_1 Binding 1
+               OpDecorate %arg_2 DescriptorSet 1
+               OpDecorate %arg_2 Binding 2
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float Cube 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_1 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+         %14 = OpTypeSampler
+%_ptr_UniformConstant_14 = OpTypePointer UniformConstant %14
+      %arg_2 = OpVariable %_ptr_UniformConstant_14 UniformConstant
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+    %v3float = OpTypeVector %float 3
+         %20 = OpConstantNull %v3float
+%_ptr_Function_v3float = OpTypePointer Function %v3float
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %27 = OpConstantNull %uint
+         %31 = OpTypeSampledImage %11
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+         %42 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureGather_8578bc = OpFunction %void None %15
+         %18 = OpLabel
+      %arg_3 = OpVariable %_ptr_Function_v3float Function %20
+      %arg_4 = OpVariable %_ptr_Function_uint Function %27
+        %res = OpVariable %_ptr_Function_v4float Function %5
+               OpStore %arg_3 %20
+               OpStore %arg_4 %uint_1
+         %29 = OpLoad %14 %arg_2
+         %30 = OpLoad %11 %arg_1
+         %32 = OpSampledImage %31 %30 %29
+         %33 = OpLoad %v3float %arg_3
+         %34 = OpCompositeExtract %float %33 0
+         %35 = OpCompositeExtract %float %33 1
+         %36 = OpCompositeExtract %float %33 2
+         %38 = OpLoad %uint %arg_4
+         %37 = OpConvertUToF %float %38
+         %39 = OpCompositeConstruct %v4float %34 %35 %36 %37
+         %28 = OpImageGather %v4float %32 %39 %uint_1
+               OpStore %res %28
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %42
+         %44 = OpLabel
+         %45 = OpFunctionCall %void %textureGather_8578bc
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %47 = OpLabel
+         %48 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %48
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %51 = OpLabel
+         %52 = OpFunctionCall %void %textureGather_8578bc
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %54 = OpLabel
+         %55 = OpFunctionCall %void %textureGather_8578bc
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureGather/8578bc.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/8578bc.wgsl.expected.wgsl
new file mode 100644
index 0000000..9a4dd4c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/8578bc.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+@group(1) @binding(1) var arg_1 : texture_cube_array<f32>;
+
+@group(1) @binding(2) var arg_2 : sampler;
+
+fn textureGather_8578bc() {
+  const arg_0 = 1u;
+  var arg_3 = vec3<f32>();
+  var arg_4 = 1u;
+  var res : vec4<f32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGather_8578bc();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureGather_8578bc();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureGather_8578bc();
+}
diff --git a/test/tint/builtins/gen/var/textureGather/89680f.wgsl b/test/tint/builtins/gen/var/textureGather/89680f.wgsl
new file mode 100644
index 0000000..c94c858
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/89680f.wgsl
@@ -0,0 +1,47 @@
+// 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(1) var arg_1: texture_cube<u32>;
+@group(1) @binding(2) var arg_2: sampler;
+
+// fn textureGather(@const component: u32, texture: texture_cube<u32>, sampler: sampler, coords: vec3<f32>) -> vec4<u32>
+fn textureGather_89680f() {
+  const arg_0 = 1u;
+  var arg_3 = vec3<f32>();
+  var res: vec4<u32> = textureGather(arg_0, arg_1, arg_2, arg_3);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGather_89680f();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureGather_89680f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureGather_89680f();
+}
diff --git a/test/tint/builtins/gen/var/textureGather/89680f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/89680f.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..a6d386c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/89680f.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+TextureCube<uint4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_89680f() {
+  float3 arg_3 = (0.0f).xxx;
+  uint4 res = arg_1.GatherGreen(arg_2, arg_3);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureGather_89680f();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureGather_89680f();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureGather_89680f();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/89680f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/89680f.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..a6d386c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/89680f.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+TextureCube<uint4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_89680f() {
+  float3 arg_3 = (0.0f).xxx;
+  uint4 res = arg_1.GatherGreen(arg_2, arg_3);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureGather_89680f();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureGather_89680f();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureGather_89680f();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/89680f.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGather/89680f.wgsl.expected.glsl
new file mode 100644
index 0000000..6f98fe0
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/89680f.wgsl.expected.glsl
@@ -0,0 +1,58 @@
+#version 310 es
+
+uniform highp usamplerCube arg_1_arg_2;
+
+void textureGather_89680f() {
+  vec3 arg_3 = vec3(0.0f);
+  uvec4 res = textureGather(arg_1_arg_2, arg_3, int(1u));
+}
+
+vec4 vertex_main() {
+  textureGather_89680f();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp usamplerCube arg_1_arg_2;
+
+void textureGather_89680f() {
+  vec3 arg_3 = vec3(0.0f);
+  uvec4 res = textureGather(arg_1_arg_2, arg_3, int(1u));
+}
+
+void fragment_main() {
+  textureGather_89680f();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp usamplerCube arg_1_arg_2;
+
+void textureGather_89680f() {
+  vec3 arg_3 = vec3(0.0f);
+  uvec4 res = textureGather(arg_1_arg_2, arg_3, int(1u));
+}
+
+void compute_main() {
+  textureGather_89680f();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/89680f.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/89680f.wgsl.expected.msl
new file mode 100644
index 0000000..e71f745
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/89680f.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureGather_89680f(texturecube<uint, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+  float3 arg_3 = float3(0.0f);
+  uint4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, component::y);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texturecube<uint, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+  textureGather_89680f(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texturecube<uint, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texturecube<uint, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+  textureGather_89680f(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texturecube<uint, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+  textureGather_89680f(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureGather/89680f.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/89680f.wgsl.expected.spvasm
new file mode 100644
index 0000000..700a3d0
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/89680f.wgsl.expected.spvasm
@@ -0,0 +1,91 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 49
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %textureGather_89680f "textureGather_89680f"
+               OpName %arg_3 "arg_3"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_1 DescriptorSet 1
+               OpDecorate %arg_1 Binding 1
+               OpDecorate %arg_2 DescriptorSet 1
+               OpDecorate %arg_2 Binding 2
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint Cube 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_1 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+         %15 = OpTypeSampler
+%_ptr_UniformConstant_15 = OpTypePointer UniformConstant %15
+      %arg_2 = OpVariable %_ptr_UniformConstant_15 UniformConstant
+       %void = OpTypeVoid
+         %16 = OpTypeFunction %void
+    %v3float = OpTypeVector %float 3
+         %21 = OpConstantNull %v3float
+%_ptr_Function_v3float = OpTypePointer Function %v3float
+     %v4uint = OpTypeVector %uint 4
+         %28 = OpTypeSampledImage %11
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+         %34 = OpConstantNull %v4uint
+         %35 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureGather_89680f = OpFunction %void None %16
+         %19 = OpLabel
+      %arg_3 = OpVariable %_ptr_Function_v3float Function %21
+        %res = OpVariable %_ptr_Function_v4uint Function %34
+               OpStore %arg_3 %21
+         %26 = OpLoad %15 %arg_2
+         %27 = OpLoad %11 %arg_1
+         %29 = OpSampledImage %28 %27 %26
+         %30 = OpLoad %v3float %arg_3
+         %24 = OpImageGather %v4uint %29 %30 %uint_1
+               OpStore %res %24
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %35
+         %37 = OpLabel
+         %38 = OpFunctionCall %void %textureGather_89680f
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %16
+         %40 = OpLabel
+         %41 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %41
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %16
+         %44 = OpLabel
+         %45 = OpFunctionCall %void %textureGather_89680f
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %16
+         %47 = OpLabel
+         %48 = OpFunctionCall %void %textureGather_89680f
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureGather/89680f.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/89680f.wgsl.expected.wgsl
new file mode 100644
index 0000000..47f8180
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/89680f.wgsl.expected.wgsl
@@ -0,0 +1,25 @@
+@group(1) @binding(1) var arg_1 : texture_cube<u32>;
+
+@group(1) @binding(2) var arg_2 : sampler;
+
+fn textureGather_89680f() {
+  const arg_0 = 1u;
+  var arg_3 = vec3<f32>();
+  var res : vec4<u32> = textureGather(arg_0, arg_1, arg_2, arg_3);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGather_89680f();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureGather_89680f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureGather_89680f();
+}
diff --git a/test/tint/builtins/gen/var/textureGather/8fae00.wgsl b/test/tint/builtins/gen/var/textureGather/8fae00.wgsl
new file mode 100644
index 0000000..0821f74
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/8fae00.wgsl
@@ -0,0 +1,47 @@
+// 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(1) var arg_1: texture_2d<u32>;
+@group(1) @binding(2) var arg_2: sampler;
+
+// fn textureGather(@const component: u32, texture: texture_2d<u32>, sampler: sampler, coords: vec2<f32>) -> vec4<u32>
+fn textureGather_8fae00() {
+  const arg_0 = 1u;
+  var arg_3 = vec2<f32>();
+  var res: vec4<u32> = textureGather(arg_0, arg_1, arg_2, arg_3);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGather_8fae00();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureGather_8fae00();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureGather_8fae00();
+}
diff --git a/test/tint/builtins/gen/var/textureGather/8fae00.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/8fae00.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..4f75e29
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/8fae00.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture2D<uint4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_8fae00() {
+  float2 arg_3 = (0.0f).xx;
+  uint4 res = arg_1.GatherGreen(arg_2, arg_3);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureGather_8fae00();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureGather_8fae00();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureGather_8fae00();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/8fae00.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/8fae00.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..4f75e29
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/8fae00.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture2D<uint4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_8fae00() {
+  float2 arg_3 = (0.0f).xx;
+  uint4 res = arg_1.GatherGreen(arg_2, arg_3);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureGather_8fae00();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureGather_8fae00();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureGather_8fae00();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/8fae00.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGather/8fae00.wgsl.expected.glsl
new file mode 100644
index 0000000..f787c2e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/8fae00.wgsl.expected.glsl
@@ -0,0 +1,58 @@
+#version 310 es
+
+uniform highp usampler2D arg_1_arg_2;
+
+void textureGather_8fae00() {
+  vec2 arg_3 = vec2(0.0f);
+  uvec4 res = textureGather(arg_1_arg_2, arg_3, int(1u));
+}
+
+vec4 vertex_main() {
+  textureGather_8fae00();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp usampler2D arg_1_arg_2;
+
+void textureGather_8fae00() {
+  vec2 arg_3 = vec2(0.0f);
+  uvec4 res = textureGather(arg_1_arg_2, arg_3, int(1u));
+}
+
+void fragment_main() {
+  textureGather_8fae00();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp usampler2D arg_1_arg_2;
+
+void textureGather_8fae00() {
+  vec2 arg_3 = vec2(0.0f);
+  uvec4 res = textureGather(arg_1_arg_2, arg_3, int(1u));
+}
+
+void compute_main() {
+  textureGather_8fae00();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/8fae00.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/8fae00.wgsl.expected.msl
new file mode 100644
index 0000000..55b262f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/8fae00.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureGather_8fae00(texture2d<uint, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+  float2 arg_3 = float2(0.0f);
+  uint4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, int2(0), component::y);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<uint, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+  textureGather_8fae00(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<uint, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<uint, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+  textureGather_8fae00(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d<uint, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+  textureGather_8fae00(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureGather/8fae00.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/8fae00.wgsl.expected.spvasm
new file mode 100644
index 0000000..1739fb4
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/8fae00.wgsl.expected.spvasm
@@ -0,0 +1,91 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 49
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %textureGather_8fae00 "textureGather_8fae00"
+               OpName %arg_3 "arg_3"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_1 DescriptorSet 1
+               OpDecorate %arg_1 Binding 1
+               OpDecorate %arg_2 DescriptorSet 1
+               OpDecorate %arg_2 Binding 2
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 2D 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_1 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+         %15 = OpTypeSampler
+%_ptr_UniformConstant_15 = OpTypePointer UniformConstant %15
+      %arg_2 = OpVariable %_ptr_UniformConstant_15 UniformConstant
+       %void = OpTypeVoid
+         %16 = OpTypeFunction %void
+    %v2float = OpTypeVector %float 2
+         %21 = OpConstantNull %v2float
+%_ptr_Function_v2float = OpTypePointer Function %v2float
+     %v4uint = OpTypeVector %uint 4
+         %28 = OpTypeSampledImage %11
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+         %34 = OpConstantNull %v4uint
+         %35 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureGather_8fae00 = OpFunction %void None %16
+         %19 = OpLabel
+      %arg_3 = OpVariable %_ptr_Function_v2float Function %21
+        %res = OpVariable %_ptr_Function_v4uint Function %34
+               OpStore %arg_3 %21
+         %26 = OpLoad %15 %arg_2
+         %27 = OpLoad %11 %arg_1
+         %29 = OpSampledImage %28 %27 %26
+         %30 = OpLoad %v2float %arg_3
+         %24 = OpImageGather %v4uint %29 %30 %uint_1
+               OpStore %res %24
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %35
+         %37 = OpLabel
+         %38 = OpFunctionCall %void %textureGather_8fae00
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %16
+         %40 = OpLabel
+         %41 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %41
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %16
+         %44 = OpLabel
+         %45 = OpFunctionCall %void %textureGather_8fae00
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %16
+         %47 = OpLabel
+         %48 = OpFunctionCall %void %textureGather_8fae00
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureGather/8fae00.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/8fae00.wgsl.expected.wgsl
new file mode 100644
index 0000000..69490b4
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/8fae00.wgsl.expected.wgsl
@@ -0,0 +1,25 @@
+@group(1) @binding(1) var arg_1 : texture_2d<u32>;
+
+@group(1) @binding(2) var arg_2 : sampler;
+
+fn textureGather_8fae00() {
+  const arg_0 = 1u;
+  var arg_3 = vec2<f32>();
+  var res : vec4<u32> = textureGather(arg_0, arg_1, arg_2, arg_3);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGather_8fae00();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureGather_8fae00();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureGather_8fae00();
+}
diff --git a/test/tint/builtins/gen/var/textureGather/986700.wgsl b/test/tint/builtins/gen/var/textureGather/986700.wgsl
new file mode 100644
index 0000000..86df23b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/986700.wgsl
@@ -0,0 +1,48 @@
+// 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(1) var arg_1: texture_2d<u32>;
+@group(1) @binding(2) var arg_2: sampler;
+
+// fn textureGather(@const component: u32, texture: texture_2d<u32>, sampler: sampler, coords: vec2<f32>, @const offset: vec2<i32>) -> vec4<u32>
+fn textureGather_986700() {
+  const arg_0 = 1u;
+  var arg_3 = vec2<f32>();
+  const arg_4 = vec2<i32>();
+  var res: vec4<u32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGather_986700();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureGather_986700();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureGather_986700();
+}
diff --git a/test/tint/builtins/gen/var/textureGather/986700.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/986700.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..740ed2b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/986700.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture2D<uint4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_986700() {
+  float2 arg_3 = (0.0f).xx;
+  uint4 res = arg_1.GatherGreen(arg_2, arg_3, (0).xx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureGather_986700();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureGather_986700();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureGather_986700();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/986700.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/986700.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..740ed2b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/986700.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture2D<uint4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_986700() {
+  float2 arg_3 = (0.0f).xx;
+  uint4 res = arg_1.GatherGreen(arg_2, arg_3, (0).xx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureGather_986700();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureGather_986700();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureGather_986700();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/986700.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGather/986700.wgsl.expected.glsl
new file mode 100644
index 0000000..10921e5
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/986700.wgsl.expected.glsl
@@ -0,0 +1,58 @@
+#version 310 es
+
+uniform highp usampler2D arg_1_arg_2;
+
+void textureGather_986700() {
+  vec2 arg_3 = vec2(0.0f);
+  uvec4 res = textureGatherOffset(arg_1_arg_2, arg_3, ivec2(0), int(1u));
+}
+
+vec4 vertex_main() {
+  textureGather_986700();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp usampler2D arg_1_arg_2;
+
+void textureGather_986700() {
+  vec2 arg_3 = vec2(0.0f);
+  uvec4 res = textureGatherOffset(arg_1_arg_2, arg_3, ivec2(0), int(1u));
+}
+
+void fragment_main() {
+  textureGather_986700();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp usampler2D arg_1_arg_2;
+
+void textureGather_986700() {
+  vec2 arg_3 = vec2(0.0f);
+  uvec4 res = textureGatherOffset(arg_1_arg_2, arg_3, ivec2(0), int(1u));
+}
+
+void compute_main() {
+  textureGather_986700();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/986700.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/986700.wgsl.expected.msl
new file mode 100644
index 0000000..024eebb
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/986700.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureGather_986700(texture2d<uint, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+  float2 arg_3 = float2(0.0f);
+  uint4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, int2(0), component::y);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<uint, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+  textureGather_986700(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<uint, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<uint, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+  textureGather_986700(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d<uint, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+  textureGather_986700(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureGather/986700.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/986700.wgsl.expected.spvasm
new file mode 100644
index 0000000..cca05f3
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/986700.wgsl.expected.spvasm
@@ -0,0 +1,94 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 52
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %textureGather_986700 "textureGather_986700"
+               OpName %arg_3 "arg_3"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_1 DescriptorSet 1
+               OpDecorate %arg_1 Binding 1
+               OpDecorate %arg_2 DescriptorSet 1
+               OpDecorate %arg_2 Binding 2
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 2D 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_1 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+         %15 = OpTypeSampler
+%_ptr_UniformConstant_15 = OpTypePointer UniformConstant %15
+      %arg_2 = OpVariable %_ptr_UniformConstant_15 UniformConstant
+       %void = OpTypeVoid
+         %16 = OpTypeFunction %void
+    %v2float = OpTypeVector %float 2
+         %21 = OpConstantNull %v2float
+%_ptr_Function_v2float = OpTypePointer Function %v2float
+     %v4uint = OpTypeVector %uint 4
+         %28 = OpTypeSampledImage %11
+     %uint_1 = OpConstant %uint 1
+        %int = OpTypeInt 32 1
+      %v2int = OpTypeVector %int 2
+         %34 = OpConstantNull %v2int
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+         %37 = OpConstantNull %v4uint
+         %38 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureGather_986700 = OpFunction %void None %16
+         %19 = OpLabel
+      %arg_3 = OpVariable %_ptr_Function_v2float Function %21
+        %res = OpVariable %_ptr_Function_v4uint Function %37
+               OpStore %arg_3 %21
+         %26 = OpLoad %15 %arg_2
+         %27 = OpLoad %11 %arg_1
+         %29 = OpSampledImage %28 %27 %26
+         %30 = OpLoad %v2float %arg_3
+         %24 = OpImageGather %v4uint %29 %30 %uint_1 ConstOffset %34
+               OpStore %res %24
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %38
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %textureGather_986700
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %16
+         %43 = OpLabel
+         %44 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %44
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %16
+         %47 = OpLabel
+         %48 = OpFunctionCall %void %textureGather_986700
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %16
+         %50 = OpLabel
+         %51 = OpFunctionCall %void %textureGather_986700
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureGather/986700.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/986700.wgsl.expected.wgsl
new file mode 100644
index 0000000..eb8526e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/986700.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+@group(1) @binding(1) var arg_1 : texture_2d<u32>;
+
+@group(1) @binding(2) var arg_2 : sampler;
+
+fn textureGather_986700() {
+  const arg_0 = 1u;
+  var arg_3 = vec2<f32>();
+  const arg_4 = vec2<i32>();
+  var res : vec4<u32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGather_986700();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureGather_986700();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureGather_986700();
+}
diff --git a/test/tint/builtins/gen/var/textureGather/a0372b.wgsl b/test/tint/builtins/gen/var/textureGather/a0372b.wgsl
new file mode 100644
index 0000000..37a6cb3
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/a0372b.wgsl
@@ -0,0 +1,48 @@
+// 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(1) var arg_1: texture_2d_array<u32>;
+@group(1) @binding(2) var arg_2: sampler;
+
+// fn textureGather(@const component: i32, texture: texture_2d_array<u32>, sampler: sampler, coords: vec2<f32>, array_index: u32) -> vec4<u32>
+fn textureGather_a0372b() {
+  const arg_0 = 1;
+  var arg_3 = vec2<f32>();
+  var arg_4 = 1u;
+  var res: vec4<u32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGather_a0372b();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureGather_a0372b();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureGather_a0372b();
+}
diff --git a/test/tint/builtins/gen/var/textureGather/a0372b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/a0372b.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..fb8e7d5
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/a0372b.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture2DArray<uint4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_a0372b() {
+  float2 arg_3 = (0.0f).xx;
+  uint arg_4 = 1u;
+  uint4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureGather_a0372b();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureGather_a0372b();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureGather_a0372b();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/a0372b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/a0372b.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..fb8e7d5
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/a0372b.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture2DArray<uint4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_a0372b() {
+  float2 arg_3 = (0.0f).xx;
+  uint arg_4 = 1u;
+  uint4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureGather_a0372b();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureGather_a0372b();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureGather_a0372b();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/a0372b.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGather/a0372b.wgsl.expected.glsl
new file mode 100644
index 0000000..4df8d22
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/a0372b.wgsl.expected.glsl
@@ -0,0 +1,61 @@
+#version 310 es
+
+uniform highp usampler2DArray arg_1_arg_2;
+
+void textureGather_a0372b() {
+  vec2 arg_3 = vec2(0.0f);
+  uint arg_4 = 1u;
+  uvec4 res = textureGather(arg_1_arg_2, vec3(arg_3, float(arg_4)), int(1u));
+}
+
+vec4 vertex_main() {
+  textureGather_a0372b();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp usampler2DArray arg_1_arg_2;
+
+void textureGather_a0372b() {
+  vec2 arg_3 = vec2(0.0f);
+  uint arg_4 = 1u;
+  uvec4 res = textureGather(arg_1_arg_2, vec3(arg_3, float(arg_4)), int(1u));
+}
+
+void fragment_main() {
+  textureGather_a0372b();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp usampler2DArray arg_1_arg_2;
+
+void textureGather_a0372b() {
+  vec2 arg_3 = vec2(0.0f);
+  uint arg_4 = 1u;
+  uvec4 res = textureGather(arg_1_arg_2, vec3(arg_3, float(arg_4)), int(1u));
+}
+
+void compute_main() {
+  textureGather_a0372b();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/a0372b.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/a0372b.wgsl.expected.msl
new file mode 100644
index 0000000..7a6f23d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/a0372b.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureGather_a0372b(texture2d_array<uint, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+  float2 arg_3 = float2(0.0f);
+  uint arg_4 = 1u;
+  uint4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, arg_4, int2(0), component::y);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<uint, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+  textureGather_a0372b(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<uint, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<uint, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+  textureGather_a0372b(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<uint, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+  textureGather_a0372b(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureGather/a0372b.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/a0372b.wgsl.expected.spvasm
new file mode 100644
index 0000000..79bf8c4
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/a0372b.wgsl.expected.spvasm
@@ -0,0 +1,102 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 58
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %textureGather_a0372b "textureGather_a0372b"
+               OpName %arg_3 "arg_3"
+               OpName %arg_4 "arg_4"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_1 DescriptorSet 1
+               OpDecorate %arg_1 Binding 1
+               OpDecorate %arg_2 DescriptorSet 1
+               OpDecorate %arg_2 Binding 2
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_1 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+         %15 = OpTypeSampler
+%_ptr_UniformConstant_15 = OpTypePointer UniformConstant %15
+      %arg_2 = OpVariable %_ptr_UniformConstant_15 UniformConstant
+       %void = OpTypeVoid
+         %16 = OpTypeFunction %void
+    %v2float = OpTypeVector %float 2
+         %21 = OpConstantNull %v2float
+%_ptr_Function_v2float = OpTypePointer Function %v2float
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %27 = OpConstantNull %uint
+     %v4uint = OpTypeVector %uint 4
+         %32 = OpTypeSampledImage %11
+    %v3float = OpTypeVector %float 3
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+         %43 = OpConstantNull %v4uint
+         %44 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureGather_a0372b = OpFunction %void None %16
+         %19 = OpLabel
+      %arg_3 = OpVariable %_ptr_Function_v2float Function %21
+      %arg_4 = OpVariable %_ptr_Function_uint Function %27
+        %res = OpVariable %_ptr_Function_v4uint Function %43
+               OpStore %arg_3 %21
+               OpStore %arg_4 %uint_1
+         %30 = OpLoad %15 %arg_2
+         %31 = OpLoad %11 %arg_1
+         %33 = OpSampledImage %32 %31 %30
+         %35 = OpLoad %v2float %arg_3
+         %36 = OpCompositeExtract %float %35 0
+         %37 = OpCompositeExtract %float %35 1
+         %39 = OpLoad %uint %arg_4
+         %38 = OpConvertUToF %float %39
+         %40 = OpCompositeConstruct %v3float %36 %37 %38
+         %28 = OpImageGather %v4uint %33 %40 %uint_1
+               OpStore %res %28
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %44
+         %46 = OpLabel
+         %47 = OpFunctionCall %void %textureGather_a0372b
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %16
+         %49 = OpLabel
+         %50 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %50
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %16
+         %53 = OpLabel
+         %54 = OpFunctionCall %void %textureGather_a0372b
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %16
+         %56 = OpLabel
+         %57 = OpFunctionCall %void %textureGather_a0372b
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureGather/a0372b.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/a0372b.wgsl.expected.wgsl
new file mode 100644
index 0000000..c3d9988
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/a0372b.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+@group(1) @binding(1) var arg_1 : texture_2d_array<u32>;
+
+@group(1) @binding(2) var arg_2 : sampler;
+
+fn textureGather_a0372b() {
+  const arg_0 = 1;
+  var arg_3 = vec2<f32>();
+  var arg_4 = 1u;
+  var res : vec4<u32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGather_a0372b();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureGather_a0372b();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureGather_a0372b();
+}
diff --git a/test/tint/builtins/gen/var/textureGather/a68027.wgsl b/test/tint/builtins/gen/var/textureGather/a68027.wgsl
new file mode 100644
index 0000000..f58770c6
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/a68027.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_depth_2d_array;
+@group(1) @binding(1) var arg_1: sampler;
+
+// fn textureGather(texture: texture_depth_2d_array, sampler: sampler, coords: vec2<f32>, array_index: u32, @const offset: vec2<i32>) -> vec4<f32>
+fn textureGather_a68027() {
+  var arg_2 = vec2<f32>();
+  var arg_3 = 1u;
+  const arg_4 = vec2<i32>();
+  var res: vec4<f32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGather_a68027();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureGather_a68027();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureGather_a68027();
+}
diff --git a/test/tint/builtins/gen/var/textureGather/a68027.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/a68027.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..97ae67b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/a68027.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture2DArray arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureGather_a68027() {
+  float2 arg_2 = (0.0f).xx;
+  uint arg_3 = 1u;
+  float4 res = arg_0.Gather(arg_1, float3(arg_2, float(arg_3)), (0).xx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureGather_a68027();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureGather_a68027();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureGather_a68027();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/a68027.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/a68027.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..97ae67b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/a68027.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture2DArray arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureGather_a68027() {
+  float2 arg_2 = (0.0f).xx;
+  uint arg_3 = 1u;
+  float4 res = arg_0.Gather(arg_1, float3(arg_2, float(arg_3)), (0).xx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureGather_a68027();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureGather_a68027();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureGather_a68027();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/a68027.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGather/a68027.wgsl.expected.glsl
new file mode 100644
index 0000000..24ac721
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/a68027.wgsl.expected.glsl
@@ -0,0 +1,61 @@
+#version 310 es
+
+uniform highp sampler2DArrayShadow arg_0_arg_1;
+
+void textureGather_a68027() {
+  vec2 arg_2 = vec2(0.0f);
+  uint arg_3 = 1u;
+  vec4 res = textureGatherOffset(arg_0_arg_1, vec3(arg_2, float(arg_3)), 0.0, ivec2(0));
+}
+
+vec4 vertex_main() {
+  textureGather_a68027();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2DArrayShadow arg_0_arg_1;
+
+void textureGather_a68027() {
+  vec2 arg_2 = vec2(0.0f);
+  uint arg_3 = 1u;
+  vec4 res = textureGatherOffset(arg_0_arg_1, vec3(arg_2, float(arg_3)), 0.0, ivec2(0));
+}
+
+void fragment_main() {
+  textureGather_a68027();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp sampler2DArrayShadow arg_0_arg_1;
+
+void textureGather_a68027() {
+  vec2 arg_2 = vec2(0.0f);
+  uint arg_3 = 1u;
+  vec4 res = textureGatherOffset(arg_0_arg_1, vec3(arg_2, float(arg_3)), 0.0, ivec2(0));
+}
+
+void compute_main() {
+  textureGather_a68027();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/a68027.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/a68027.wgsl.expected.msl
new file mode 100644
index 0000000..6584b67
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/a68027.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureGather_a68027(depth2d_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+  float2 arg_2 = float2(0.0f);
+  uint arg_3 = 1u;
+  float4 res = tint_symbol_1.gather(tint_symbol_2, arg_2, arg_3, int2(0));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(depth2d_array<float, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+  textureGather_a68027(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(depth2d_array<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(depth2d_array<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+  textureGather_a68027(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(depth2d_array<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+  textureGather_a68027(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureGather/a68027.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/a68027.wgsl.expected.spvasm
new file mode 100644
index 0000000..a0830ea
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/a68027.wgsl.expected.spvasm
@@ -0,0 +1,104 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 60
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %arg_1 "arg_1"
+               OpName %textureGather_a68027 "textureGather_a68027"
+               OpName %arg_2 "arg_2"
+               OpName %arg_3 "arg_3"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %arg_1 DescriptorSet 1
+               OpDecorate %arg_1 Binding 1
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+         %14 = OpTypeSampler
+%_ptr_UniformConstant_14 = OpTypePointer UniformConstant %14
+      %arg_1 = OpVariable %_ptr_UniformConstant_14 UniformConstant
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+    %v2float = OpTypeVector %float 2
+         %20 = OpConstantNull %v2float
+%_ptr_Function_v2float = OpTypePointer Function %v2float
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %27 = OpConstantNull %uint
+         %31 = OpTypeSampledImage %11
+    %v3float = OpTypeVector %float 3
+        %int = OpTypeInt 32 1
+      %int_0 = OpConstant %int 0
+      %v2int = OpTypeVector %int 2
+         %43 = OpConstantNull %v2int
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+         %46 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureGather_a68027 = OpFunction %void None %15
+         %18 = OpLabel
+      %arg_2 = OpVariable %_ptr_Function_v2float Function %20
+      %arg_3 = OpVariable %_ptr_Function_uint Function %27
+        %res = OpVariable %_ptr_Function_v4float Function %5
+               OpStore %arg_2 %20
+               OpStore %arg_3 %uint_1
+         %29 = OpLoad %14 %arg_1
+         %30 = OpLoad %11 %arg_0
+         %32 = OpSampledImage %31 %30 %29
+         %34 = OpLoad %v2float %arg_2
+         %35 = OpCompositeExtract %float %34 0
+         %36 = OpCompositeExtract %float %34 1
+         %38 = OpLoad %uint %arg_3
+         %37 = OpConvertUToF %float %38
+         %39 = OpCompositeConstruct %v3float %35 %36 %37
+         %28 = OpImageGather %v4float %32 %39 %int_0 ConstOffset %43
+               OpStore %res %28
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %46
+         %48 = OpLabel
+         %49 = OpFunctionCall %void %textureGather_a68027
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %51 = OpLabel
+         %52 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %52
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %55 = OpLabel
+         %56 = OpFunctionCall %void %textureGather_a68027
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %58 = OpLabel
+         %59 = OpFunctionCall %void %textureGather_a68027
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureGather/a68027.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/a68027.wgsl.expected.wgsl
new file mode 100644
index 0000000..f7aa73b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/a68027.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+@group(1) @binding(0) var arg_0 : texture_depth_2d_array;
+
+@group(1) @binding(1) var arg_1 : sampler;
+
+fn textureGather_a68027() {
+  var arg_2 = vec2<f32>();
+  var arg_3 = 1u;
+  const arg_4 = vec2<i32>();
+  var res : vec4<f32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGather_a68027();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureGather_a68027();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureGather_a68027();
+}
diff --git a/test/tint/builtins/gen/var/textureGather/bd33b6.wgsl b/test/tint/builtins/gen/var/textureGather/bd33b6.wgsl
new file mode 100644
index 0000000..f957864
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/bd33b6.wgsl
@@ -0,0 +1,49 @@
+// 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(1) var arg_1: texture_2d_array<i32>;
+@group(1) @binding(2) var arg_2: sampler;
+
+// fn textureGather(@const component: i32, texture: texture_2d_array<i32>, sampler: sampler, coords: vec2<f32>, array_index: u32, @const offset: vec2<i32>) -> vec4<i32>
+fn textureGather_bd33b6() {
+  const arg_0 = 1;
+  var arg_3 = vec2<f32>();
+  var arg_4 = 1u;
+  const arg_5 = vec2<i32>();
+  var res: vec4<i32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGather_bd33b6();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureGather_bd33b6();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureGather_bd33b6();
+}
diff --git a/test/tint/builtins/gen/var/textureGather/bd33b6.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/bd33b6.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..dd45876
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/bd33b6.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture2DArray<int4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_bd33b6() {
+  float2 arg_3 = (0.0f).xx;
+  uint arg_4 = 1u;
+  int4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)), (0).xx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureGather_bd33b6();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureGather_bd33b6();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureGather_bd33b6();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/bd33b6.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/bd33b6.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..dd45876
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/bd33b6.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture2DArray<int4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_bd33b6() {
+  float2 arg_3 = (0.0f).xx;
+  uint arg_4 = 1u;
+  int4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)), (0).xx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureGather_bd33b6();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureGather_bd33b6();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureGather_bd33b6();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/bd33b6.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGather/bd33b6.wgsl.expected.glsl
new file mode 100644
index 0000000..1895dfa
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/bd33b6.wgsl.expected.glsl
@@ -0,0 +1,61 @@
+#version 310 es
+
+uniform highp isampler2DArray arg_1_arg_2;
+
+void textureGather_bd33b6() {
+  vec2 arg_3 = vec2(0.0f);
+  uint arg_4 = 1u;
+  ivec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(0), int(1u));
+}
+
+vec4 vertex_main() {
+  textureGather_bd33b6();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp isampler2DArray arg_1_arg_2;
+
+void textureGather_bd33b6() {
+  vec2 arg_3 = vec2(0.0f);
+  uint arg_4 = 1u;
+  ivec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(0), int(1u));
+}
+
+void fragment_main() {
+  textureGather_bd33b6();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp isampler2DArray arg_1_arg_2;
+
+void textureGather_bd33b6() {
+  vec2 arg_3 = vec2(0.0f);
+  uint arg_4 = 1u;
+  ivec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(0), int(1u));
+}
+
+void compute_main() {
+  textureGather_bd33b6();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/bd33b6.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/bd33b6.wgsl.expected.msl
new file mode 100644
index 0000000..7453f31
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/bd33b6.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureGather_bd33b6(texture2d_array<int, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+  float2 arg_3 = float2(0.0f);
+  uint arg_4 = 1u;
+  int4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, arg_4, int2(0), component::y);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<int, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+  textureGather_bd33b6(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<int, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<int, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+  textureGather_bd33b6(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<int, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+  textureGather_bd33b6(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureGather/bd33b6.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/bd33b6.wgsl.expected.spvasm
new file mode 100644
index 0000000..f222d1b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/bd33b6.wgsl.expected.spvasm
@@ -0,0 +1,105 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 61
+; 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_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %textureGather_bd33b6 "textureGather_bd33b6"
+               OpName %arg_3 "arg_3"
+               OpName %arg_4 "arg_4"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_1 DescriptorSet 1
+               OpDecorate %arg_1 Binding 1
+               OpDecorate %arg_2 DescriptorSet 1
+               OpDecorate %arg_2 Binding 2
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_1 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+         %15 = OpTypeSampler
+%_ptr_UniformConstant_15 = OpTypePointer UniformConstant %15
+      %arg_2 = OpVariable %_ptr_UniformConstant_15 UniformConstant
+       %void = OpTypeVoid
+         %16 = OpTypeFunction %void
+    %v2float = OpTypeVector %float 2
+         %21 = OpConstantNull %v2float
+%_ptr_Function_v2float = OpTypePointer Function %v2float
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %28 = OpConstantNull %uint
+      %v4int = OpTypeVector %int 4
+         %33 = OpTypeSampledImage %11
+    %v3float = OpTypeVector %float 3
+      %v2int = OpTypeVector %int 2
+         %43 = OpConstantNull %v2int
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+         %46 = OpConstantNull %v4int
+         %47 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureGather_bd33b6 = OpFunction %void None %16
+         %19 = OpLabel
+      %arg_3 = OpVariable %_ptr_Function_v2float Function %21
+      %arg_4 = OpVariable %_ptr_Function_uint Function %28
+        %res = OpVariable %_ptr_Function_v4int Function %46
+               OpStore %arg_3 %21
+               OpStore %arg_4 %uint_1
+         %31 = OpLoad %15 %arg_2
+         %32 = OpLoad %11 %arg_1
+         %34 = OpSampledImage %33 %32 %31
+         %36 = OpLoad %v2float %arg_3
+         %37 = OpCompositeExtract %float %36 0
+         %38 = OpCompositeExtract %float %36 1
+         %40 = OpLoad %uint %arg_4
+         %39 = OpConvertUToF %float %40
+         %41 = OpCompositeConstruct %v3float %37 %38 %39
+         %29 = OpImageGather %v4int %34 %41 %uint_1 ConstOffset %43
+               OpStore %res %29
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %47
+         %49 = OpLabel
+         %50 = OpFunctionCall %void %textureGather_bd33b6
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %16
+         %52 = OpLabel
+         %53 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %53
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %16
+         %56 = OpLabel
+         %57 = OpFunctionCall %void %textureGather_bd33b6
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %16
+         %59 = OpLabel
+         %60 = OpFunctionCall %void %textureGather_bd33b6
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureGather/bd33b6.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/bd33b6.wgsl.expected.wgsl
new file mode 100644
index 0000000..af77362
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/bd33b6.wgsl.expected.wgsl
@@ -0,0 +1,27 @@
+@group(1) @binding(1) var arg_1 : texture_2d_array<i32>;
+
+@group(1) @binding(2) var arg_2 : sampler;
+
+fn textureGather_bd33b6() {
+  const arg_0 = 1;
+  var arg_3 = vec2<f32>();
+  var arg_4 = 1u;
+  const arg_5 = vec2<i32>();
+  var res : vec4<i32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGather_bd33b6();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureGather_bd33b6();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureGather_bd33b6();
+}
diff --git a/test/tint/builtins/gen/var/textureGather/be276f.wgsl b/test/tint/builtins/gen/var/textureGather/be276f.wgsl
new file mode 100644
index 0000000..d975202
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/be276f.wgsl
@@ -0,0 +1,48 @@
+// 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(1) var arg_1: texture_cube_array<u32>;
+@group(1) @binding(2) var arg_2: sampler;
+
+// fn textureGather(@const component: i32, texture: texture_cube_array<u32>, sampler: sampler, coords: vec3<f32>, array_index: u32) -> vec4<u32>
+fn textureGather_be276f() {
+  const arg_0 = 1;
+  var arg_3 = vec3<f32>();
+  var arg_4 = 1u;
+  var res: vec4<u32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGather_be276f();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureGather_be276f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureGather_be276f();
+}
diff --git a/test/tint/builtins/gen/var/textureGather/be276f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/be276f.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..076da2b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/be276f.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+TextureCubeArray<uint4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_be276f() {
+  float3 arg_3 = (0.0f).xxx;
+  uint arg_4 = 1u;
+  uint4 res = arg_1.GatherGreen(arg_2, float4(arg_3, float(arg_4)));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureGather_be276f();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureGather_be276f();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureGather_be276f();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/be276f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/be276f.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..076da2b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/be276f.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+TextureCubeArray<uint4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_be276f() {
+  float3 arg_3 = (0.0f).xxx;
+  uint arg_4 = 1u;
+  uint4 res = arg_1.GatherGreen(arg_2, float4(arg_3, float(arg_4)));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureGather_be276f();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureGather_be276f();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureGather_be276f();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/be276f.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGather/be276f.wgsl.expected.glsl
new file mode 100644
index 0000000..1cd067d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/be276f.wgsl.expected.glsl
@@ -0,0 +1,84 @@
+SKIP: FAILED
+
+#version 310 es
+
+uniform highp usamplerCubeArray arg_1_arg_2;
+
+void textureGather_be276f() {
+  vec3 arg_3 = vec3(0.0f);
+  uint arg_4 = 1u;
+  uvec4 res = textureGather(arg_1_arg_2, vec4(arg_3, float(arg_4)), int(1u));
+}
+
+vec4 vertex_main() {
+  textureGather_be276f();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'usamplerCubeArray' : Reserved word. 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+uniform highp usamplerCubeArray arg_1_arg_2;
+
+void textureGather_be276f() {
+  vec3 arg_3 = vec3(0.0f);
+  uint arg_4 = 1u;
+  uvec4 res = textureGather(arg_1_arg_2, vec4(arg_3, float(arg_4)), int(1u));
+}
+
+void fragment_main() {
+  textureGather_be276f();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'usamplerCubeArray' : Reserved word. 
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+uniform highp usamplerCubeArray arg_1_arg_2;
+
+void textureGather_be276f() {
+  vec3 arg_3 = vec3(0.0f);
+  uint arg_4 = 1u;
+  uvec4 res = textureGather(arg_1_arg_2, vec4(arg_3, float(arg_4)), int(1u));
+}
+
+void compute_main() {
+  textureGather_be276f();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'usamplerCubeArray' : Reserved word. 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureGather/be276f.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/be276f.wgsl.expected.msl
new file mode 100644
index 0000000..537029e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/be276f.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureGather_be276f(texturecube_array<uint, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+  float3 arg_3 = float3(0.0f);
+  uint arg_4 = 1u;
+  uint4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, arg_4, component::y);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texturecube_array<uint, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+  textureGather_be276f(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texturecube_array<uint, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texturecube_array<uint, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+  textureGather_be276f(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texturecube_array<uint, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+  textureGather_be276f(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureGather/be276f.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/be276f.wgsl.expected.spvasm
new file mode 100644
index 0000000..c43168e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/be276f.wgsl.expected.spvasm
@@ -0,0 +1,103 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 58
+; Schema: 0
+               OpCapability Shader
+               OpCapability SampledCubeArray
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %textureGather_be276f "textureGather_be276f"
+               OpName %arg_3 "arg_3"
+               OpName %arg_4 "arg_4"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_1 DescriptorSet 1
+               OpDecorate %arg_1 Binding 1
+               OpDecorate %arg_2 DescriptorSet 1
+               OpDecorate %arg_2 Binding 2
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint Cube 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_1 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+         %15 = OpTypeSampler
+%_ptr_UniformConstant_15 = OpTypePointer UniformConstant %15
+      %arg_2 = OpVariable %_ptr_UniformConstant_15 UniformConstant
+       %void = OpTypeVoid
+         %16 = OpTypeFunction %void
+    %v3float = OpTypeVector %float 3
+         %21 = OpConstantNull %v3float
+%_ptr_Function_v3float = OpTypePointer Function %v3float
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %27 = OpConstantNull %uint
+     %v4uint = OpTypeVector %uint 4
+         %32 = OpTypeSampledImage %11
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+         %43 = OpConstantNull %v4uint
+         %44 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureGather_be276f = OpFunction %void None %16
+         %19 = OpLabel
+      %arg_3 = OpVariable %_ptr_Function_v3float Function %21
+      %arg_4 = OpVariable %_ptr_Function_uint Function %27
+        %res = OpVariable %_ptr_Function_v4uint Function %43
+               OpStore %arg_3 %21
+               OpStore %arg_4 %uint_1
+         %30 = OpLoad %15 %arg_2
+         %31 = OpLoad %11 %arg_1
+         %33 = OpSampledImage %32 %31 %30
+         %34 = OpLoad %v3float %arg_3
+         %35 = OpCompositeExtract %float %34 0
+         %36 = OpCompositeExtract %float %34 1
+         %37 = OpCompositeExtract %float %34 2
+         %39 = OpLoad %uint %arg_4
+         %38 = OpConvertUToF %float %39
+         %40 = OpCompositeConstruct %v4float %35 %36 %37 %38
+         %28 = OpImageGather %v4uint %33 %40 %uint_1
+               OpStore %res %28
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %44
+         %46 = OpLabel
+         %47 = OpFunctionCall %void %textureGather_be276f
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %16
+         %49 = OpLabel
+         %50 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %50
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %16
+         %53 = OpLabel
+         %54 = OpFunctionCall %void %textureGather_be276f
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %16
+         %56 = OpLabel
+         %57 = OpFunctionCall %void %textureGather_be276f
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureGather/be276f.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/be276f.wgsl.expected.wgsl
new file mode 100644
index 0000000..6bcb853
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/be276f.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+@group(1) @binding(1) var arg_1 : texture_cube_array<u32>;
+
+@group(1) @binding(2) var arg_2 : sampler;
+
+fn textureGather_be276f() {
+  const arg_0 = 1;
+  var arg_3 = vec3<f32>();
+  var arg_4 = 1u;
+  var res : vec4<u32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGather_be276f();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureGather_be276f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureGather_be276f();
+}
diff --git a/test/tint/builtins/gen/var/textureGather/ccadde.wgsl b/test/tint/builtins/gen/var/textureGather/ccadde.wgsl
new file mode 100644
index 0000000..d841c27
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/ccadde.wgsl
@@ -0,0 +1,47 @@
+// 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(1) var arg_1: texture_2d<i32>;
+@group(1) @binding(2) var arg_2: sampler;
+
+// fn textureGather(@const component: u32, texture: texture_2d<i32>, sampler: sampler, coords: vec2<f32>) -> vec4<i32>
+fn textureGather_ccadde() {
+  const arg_0 = 1u;
+  var arg_3 = vec2<f32>();
+  var res: vec4<i32> = textureGather(arg_0, arg_1, arg_2, arg_3);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGather_ccadde();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureGather_ccadde();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureGather_ccadde();
+}
diff --git a/test/tint/builtins/gen/var/textureGather/ccadde.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/ccadde.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..1b760a5
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/ccadde.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture2D<int4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_ccadde() {
+  float2 arg_3 = (0.0f).xx;
+  int4 res = arg_1.GatherGreen(arg_2, arg_3);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureGather_ccadde();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureGather_ccadde();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureGather_ccadde();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/ccadde.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/ccadde.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..1b760a5
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/ccadde.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture2D<int4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_ccadde() {
+  float2 arg_3 = (0.0f).xx;
+  int4 res = arg_1.GatherGreen(arg_2, arg_3);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureGather_ccadde();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureGather_ccadde();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureGather_ccadde();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/ccadde.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGather/ccadde.wgsl.expected.glsl
new file mode 100644
index 0000000..5268f1f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/ccadde.wgsl.expected.glsl
@@ -0,0 +1,58 @@
+#version 310 es
+
+uniform highp isampler2D arg_1_arg_2;
+
+void textureGather_ccadde() {
+  vec2 arg_3 = vec2(0.0f);
+  ivec4 res = textureGather(arg_1_arg_2, arg_3, int(1u));
+}
+
+vec4 vertex_main() {
+  textureGather_ccadde();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp isampler2D arg_1_arg_2;
+
+void textureGather_ccadde() {
+  vec2 arg_3 = vec2(0.0f);
+  ivec4 res = textureGather(arg_1_arg_2, arg_3, int(1u));
+}
+
+void fragment_main() {
+  textureGather_ccadde();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp isampler2D arg_1_arg_2;
+
+void textureGather_ccadde() {
+  vec2 arg_3 = vec2(0.0f);
+  ivec4 res = textureGather(arg_1_arg_2, arg_3, int(1u));
+}
+
+void compute_main() {
+  textureGather_ccadde();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/ccadde.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/ccadde.wgsl.expected.msl
new file mode 100644
index 0000000..47a6567
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/ccadde.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureGather_ccadde(texture2d<int, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+  float2 arg_3 = float2(0.0f);
+  int4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, int2(0), component::y);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<int, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+  textureGather_ccadde(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<int, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<int, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+  textureGather_ccadde(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d<int, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+  textureGather_ccadde(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureGather/ccadde.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/ccadde.wgsl.expected.spvasm
new file mode 100644
index 0000000..e8acb0b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/ccadde.wgsl.expected.spvasm
@@ -0,0 +1,92 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 50
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %textureGather_ccadde "textureGather_ccadde"
+               OpName %arg_3 "arg_3"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_1 DescriptorSet 1
+               OpDecorate %arg_1 Binding 1
+               OpDecorate %arg_2 DescriptorSet 1
+               OpDecorate %arg_2 Binding 2
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 2D 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_1 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+         %15 = OpTypeSampler
+%_ptr_UniformConstant_15 = OpTypePointer UniformConstant %15
+      %arg_2 = OpVariable %_ptr_UniformConstant_15 UniformConstant
+       %void = OpTypeVoid
+         %16 = OpTypeFunction %void
+    %v2float = OpTypeVector %float 2
+         %21 = OpConstantNull %v2float
+%_ptr_Function_v2float = OpTypePointer Function %v2float
+      %v4int = OpTypeVector %int 4
+         %28 = OpTypeSampledImage %11
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+         %35 = OpConstantNull %v4int
+         %36 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureGather_ccadde = OpFunction %void None %16
+         %19 = OpLabel
+      %arg_3 = OpVariable %_ptr_Function_v2float Function %21
+        %res = OpVariable %_ptr_Function_v4int Function %35
+               OpStore %arg_3 %21
+         %26 = OpLoad %15 %arg_2
+         %27 = OpLoad %11 %arg_1
+         %29 = OpSampledImage %28 %27 %26
+         %30 = OpLoad %v2float %arg_3
+         %24 = OpImageGather %v4int %29 %30 %uint_1
+               OpStore %res %24
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %36
+         %38 = OpLabel
+         %39 = OpFunctionCall %void %textureGather_ccadde
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %16
+         %41 = OpLabel
+         %42 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %42
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %16
+         %45 = OpLabel
+         %46 = OpFunctionCall %void %textureGather_ccadde
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %16
+         %48 = OpLabel
+         %49 = OpFunctionCall %void %textureGather_ccadde
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureGather/ccadde.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/ccadde.wgsl.expected.wgsl
new file mode 100644
index 0000000..15cdbb4
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/ccadde.wgsl.expected.wgsl
@@ -0,0 +1,25 @@
+@group(1) @binding(1) var arg_1 : texture_2d<i32>;
+
+@group(1) @binding(2) var arg_2 : sampler;
+
+fn textureGather_ccadde() {
+  const arg_0 = 1u;
+  var arg_3 = vec2<f32>();
+  var res : vec4<i32> = textureGather(arg_0, arg_1, arg_2, arg_3);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGather_ccadde();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureGather_ccadde();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureGather_ccadde();
+}
diff --git a/test/tint/builtins/gen/var/textureGather/ce5578.wgsl b/test/tint/builtins/gen/var/textureGather/ce5578.wgsl
new file mode 100644
index 0000000..284bfa6
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/ce5578.wgsl
@@ -0,0 +1,49 @@
+// 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(1) var arg_1: texture_2d_array<u32>;
+@group(1) @binding(2) var arg_2: sampler;
+
+// fn textureGather(@const component: i32, texture: texture_2d_array<u32>, sampler: sampler, coords: vec2<f32>, array_index: u32, @const offset: vec2<i32>) -> vec4<u32>
+fn textureGather_ce5578() {
+  const arg_0 = 1;
+  var arg_3 = vec2<f32>();
+  var arg_4 = 1u;
+  const arg_5 = vec2<i32>();
+  var res: vec4<u32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGather_ce5578();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureGather_ce5578();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureGather_ce5578();
+}
diff --git a/test/tint/builtins/gen/var/textureGather/ce5578.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/ce5578.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..7df33ee
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/ce5578.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture2DArray<uint4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_ce5578() {
+  float2 arg_3 = (0.0f).xx;
+  uint arg_4 = 1u;
+  uint4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)), (0).xx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureGather_ce5578();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureGather_ce5578();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureGather_ce5578();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/ce5578.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/ce5578.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..7df33ee
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/ce5578.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture2DArray<uint4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_ce5578() {
+  float2 arg_3 = (0.0f).xx;
+  uint arg_4 = 1u;
+  uint4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)), (0).xx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureGather_ce5578();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureGather_ce5578();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureGather_ce5578();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/ce5578.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGather/ce5578.wgsl.expected.glsl
new file mode 100644
index 0000000..ec03098
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/ce5578.wgsl.expected.glsl
@@ -0,0 +1,61 @@
+#version 310 es
+
+uniform highp usampler2DArray arg_1_arg_2;
+
+void textureGather_ce5578() {
+  vec2 arg_3 = vec2(0.0f);
+  uint arg_4 = 1u;
+  uvec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(0), int(1u));
+}
+
+vec4 vertex_main() {
+  textureGather_ce5578();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp usampler2DArray arg_1_arg_2;
+
+void textureGather_ce5578() {
+  vec2 arg_3 = vec2(0.0f);
+  uint arg_4 = 1u;
+  uvec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(0), int(1u));
+}
+
+void fragment_main() {
+  textureGather_ce5578();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp usampler2DArray arg_1_arg_2;
+
+void textureGather_ce5578() {
+  vec2 arg_3 = vec2(0.0f);
+  uint arg_4 = 1u;
+  uvec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(0), int(1u));
+}
+
+void compute_main() {
+  textureGather_ce5578();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/ce5578.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/ce5578.wgsl.expected.msl
new file mode 100644
index 0000000..14a5c03
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/ce5578.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureGather_ce5578(texture2d_array<uint, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+  float2 arg_3 = float2(0.0f);
+  uint arg_4 = 1u;
+  uint4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, arg_4, int2(0), component::y);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<uint, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+  textureGather_ce5578(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<uint, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<uint, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+  textureGather_ce5578(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<uint, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+  textureGather_ce5578(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureGather/ce5578.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/ce5578.wgsl.expected.spvasm
new file mode 100644
index 0000000..54bd0b8
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/ce5578.wgsl.expected.spvasm
@@ -0,0 +1,105 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 61
+; 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_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %textureGather_ce5578 "textureGather_ce5578"
+               OpName %arg_3 "arg_3"
+               OpName %arg_4 "arg_4"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_1 DescriptorSet 1
+               OpDecorate %arg_1 Binding 1
+               OpDecorate %arg_2 DescriptorSet 1
+               OpDecorate %arg_2 Binding 2
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_1 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+         %15 = OpTypeSampler
+%_ptr_UniformConstant_15 = OpTypePointer UniformConstant %15
+      %arg_2 = OpVariable %_ptr_UniformConstant_15 UniformConstant
+       %void = OpTypeVoid
+         %16 = OpTypeFunction %void
+    %v2float = OpTypeVector %float 2
+         %21 = OpConstantNull %v2float
+%_ptr_Function_v2float = OpTypePointer Function %v2float
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %27 = OpConstantNull %uint
+     %v4uint = OpTypeVector %uint 4
+         %32 = OpTypeSampledImage %11
+    %v3float = OpTypeVector %float 3
+        %int = OpTypeInt 32 1
+      %v2int = OpTypeVector %int 2
+         %43 = OpConstantNull %v2int
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+         %46 = OpConstantNull %v4uint
+         %47 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureGather_ce5578 = OpFunction %void None %16
+         %19 = OpLabel
+      %arg_3 = OpVariable %_ptr_Function_v2float Function %21
+      %arg_4 = OpVariable %_ptr_Function_uint Function %27
+        %res = OpVariable %_ptr_Function_v4uint Function %46
+               OpStore %arg_3 %21
+               OpStore %arg_4 %uint_1
+         %30 = OpLoad %15 %arg_2
+         %31 = OpLoad %11 %arg_1
+         %33 = OpSampledImage %32 %31 %30
+         %35 = OpLoad %v2float %arg_3
+         %36 = OpCompositeExtract %float %35 0
+         %37 = OpCompositeExtract %float %35 1
+         %39 = OpLoad %uint %arg_4
+         %38 = OpConvertUToF %float %39
+         %40 = OpCompositeConstruct %v3float %36 %37 %38
+         %28 = OpImageGather %v4uint %33 %40 %uint_1 ConstOffset %43
+               OpStore %res %28
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %47
+         %49 = OpLabel
+         %50 = OpFunctionCall %void %textureGather_ce5578
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %16
+         %52 = OpLabel
+         %53 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %53
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %16
+         %56 = OpLabel
+         %57 = OpFunctionCall %void %textureGather_ce5578
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %16
+         %59 = OpLabel
+         %60 = OpFunctionCall %void %textureGather_ce5578
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureGather/ce5578.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/ce5578.wgsl.expected.wgsl
new file mode 100644
index 0000000..1246a35
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/ce5578.wgsl.expected.wgsl
@@ -0,0 +1,27 @@
+@group(1) @binding(1) var arg_1 : texture_2d_array<u32>;
+
+@group(1) @binding(2) var arg_2 : sampler;
+
+fn textureGather_ce5578() {
+  const arg_0 = 1;
+  var arg_3 = vec2<f32>();
+  var arg_4 = 1u;
+  const arg_5 = vec2<i32>();
+  var res : vec4<u32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGather_ce5578();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureGather_ce5578();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureGather_ce5578();
+}
diff --git a/test/tint/builtins/gen/var/textureGather/cf9112.wgsl b/test/tint/builtins/gen/var/textureGather/cf9112.wgsl
new file mode 100644
index 0000000..bd3e4df
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/cf9112.wgsl
@@ -0,0 +1,49 @@
+// 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(1) var arg_1: texture_2d_array<i32>;
+@group(1) @binding(2) var arg_2: sampler;
+
+// fn textureGather(@const component: u32, texture: texture_2d_array<i32>, sampler: sampler, coords: vec2<f32>, array_index: u32, @const offset: vec2<i32>) -> vec4<i32>
+fn textureGather_cf9112() {
+  const arg_0 = 1u;
+  var arg_3 = vec2<f32>();
+  var arg_4 = 1u;
+  const arg_5 = vec2<i32>();
+  var res: vec4<i32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGather_cf9112();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureGather_cf9112();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureGather_cf9112();
+}
diff --git a/test/tint/builtins/gen/var/textureGather/cf9112.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/cf9112.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..cefff93
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/cf9112.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture2DArray<int4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_cf9112() {
+  float2 arg_3 = (0.0f).xx;
+  uint arg_4 = 1u;
+  int4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)), (0).xx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureGather_cf9112();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureGather_cf9112();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureGather_cf9112();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/cf9112.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/cf9112.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..cefff93
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/cf9112.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture2DArray<int4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_cf9112() {
+  float2 arg_3 = (0.0f).xx;
+  uint arg_4 = 1u;
+  int4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)), (0).xx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureGather_cf9112();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureGather_cf9112();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureGather_cf9112();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/cf9112.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGather/cf9112.wgsl.expected.glsl
new file mode 100644
index 0000000..60d154e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/cf9112.wgsl.expected.glsl
@@ -0,0 +1,61 @@
+#version 310 es
+
+uniform highp isampler2DArray arg_1_arg_2;
+
+void textureGather_cf9112() {
+  vec2 arg_3 = vec2(0.0f);
+  uint arg_4 = 1u;
+  ivec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(0), int(1u));
+}
+
+vec4 vertex_main() {
+  textureGather_cf9112();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp isampler2DArray arg_1_arg_2;
+
+void textureGather_cf9112() {
+  vec2 arg_3 = vec2(0.0f);
+  uint arg_4 = 1u;
+  ivec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(0), int(1u));
+}
+
+void fragment_main() {
+  textureGather_cf9112();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp isampler2DArray arg_1_arg_2;
+
+void textureGather_cf9112() {
+  vec2 arg_3 = vec2(0.0f);
+  uint arg_4 = 1u;
+  ivec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(0), int(1u));
+}
+
+void compute_main() {
+  textureGather_cf9112();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/cf9112.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/cf9112.wgsl.expected.msl
new file mode 100644
index 0000000..0d762a7
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/cf9112.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureGather_cf9112(texture2d_array<int, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+  float2 arg_3 = float2(0.0f);
+  uint arg_4 = 1u;
+  int4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, arg_4, int2(0), component::y);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<int, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+  textureGather_cf9112(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<int, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<int, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+  textureGather_cf9112(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<int, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+  textureGather_cf9112(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureGather/cf9112.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/cf9112.wgsl.expected.spvasm
new file mode 100644
index 0000000..05debe8
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/cf9112.wgsl.expected.spvasm
@@ -0,0 +1,105 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 61
+; 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_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %textureGather_cf9112 "textureGather_cf9112"
+               OpName %arg_3 "arg_3"
+               OpName %arg_4 "arg_4"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_1 DescriptorSet 1
+               OpDecorate %arg_1 Binding 1
+               OpDecorate %arg_2 DescriptorSet 1
+               OpDecorate %arg_2 Binding 2
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_1 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+         %15 = OpTypeSampler
+%_ptr_UniformConstant_15 = OpTypePointer UniformConstant %15
+      %arg_2 = OpVariable %_ptr_UniformConstant_15 UniformConstant
+       %void = OpTypeVoid
+         %16 = OpTypeFunction %void
+    %v2float = OpTypeVector %float 2
+         %21 = OpConstantNull %v2float
+%_ptr_Function_v2float = OpTypePointer Function %v2float
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %28 = OpConstantNull %uint
+      %v4int = OpTypeVector %int 4
+         %33 = OpTypeSampledImage %11
+    %v3float = OpTypeVector %float 3
+      %v2int = OpTypeVector %int 2
+         %43 = OpConstantNull %v2int
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+         %46 = OpConstantNull %v4int
+         %47 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureGather_cf9112 = OpFunction %void None %16
+         %19 = OpLabel
+      %arg_3 = OpVariable %_ptr_Function_v2float Function %21
+      %arg_4 = OpVariable %_ptr_Function_uint Function %28
+        %res = OpVariable %_ptr_Function_v4int Function %46
+               OpStore %arg_3 %21
+               OpStore %arg_4 %uint_1
+         %31 = OpLoad %15 %arg_2
+         %32 = OpLoad %11 %arg_1
+         %34 = OpSampledImage %33 %32 %31
+         %36 = OpLoad %v2float %arg_3
+         %37 = OpCompositeExtract %float %36 0
+         %38 = OpCompositeExtract %float %36 1
+         %40 = OpLoad %uint %arg_4
+         %39 = OpConvertUToF %float %40
+         %41 = OpCompositeConstruct %v3float %37 %38 %39
+         %29 = OpImageGather %v4int %34 %41 %uint_1 ConstOffset %43
+               OpStore %res %29
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %47
+         %49 = OpLabel
+         %50 = OpFunctionCall %void %textureGather_cf9112
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %16
+         %52 = OpLabel
+         %53 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %53
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %16
+         %56 = OpLabel
+         %57 = OpFunctionCall %void %textureGather_cf9112
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %16
+         %59 = OpLabel
+         %60 = OpFunctionCall %void %textureGather_cf9112
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureGather/cf9112.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/cf9112.wgsl.expected.wgsl
new file mode 100644
index 0000000..ac3035b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/cf9112.wgsl.expected.wgsl
@@ -0,0 +1,27 @@
+@group(1) @binding(1) var arg_1 : texture_2d_array<i32>;
+
+@group(1) @binding(2) var arg_2 : sampler;
+
+fn textureGather_cf9112() {
+  const arg_0 = 1u;
+  var arg_3 = vec2<f32>();
+  var arg_4 = 1u;
+  const arg_5 = vec2<i32>();
+  var res : vec4<i32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGather_cf9112();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureGather_cf9112();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureGather_cf9112();
+}
diff --git a/test/tint/builtins/gen/var/textureGather/d6507c.wgsl b/test/tint/builtins/gen/var/textureGather/d6507c.wgsl
new file mode 100644
index 0000000..529a2b4
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/d6507c.wgsl
@@ -0,0 +1,48 @@
+// 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(1) var arg_1: texture_2d<f32>;
+@group(1) @binding(2) var arg_2: sampler;
+
+// fn textureGather(@const component: u32, texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>, @const offset: vec2<i32>) -> vec4<f32>
+fn textureGather_d6507c() {
+  const arg_0 = 1u;
+  var arg_3 = vec2<f32>();
+  const arg_4 = vec2<i32>();
+  var res: vec4<f32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGather_d6507c();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureGather_d6507c();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureGather_d6507c();
+}
diff --git a/test/tint/builtins/gen/var/textureGather/d6507c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/d6507c.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..158dc3c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/d6507c.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture2D<float4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_d6507c() {
+  float2 arg_3 = (0.0f).xx;
+  float4 res = arg_1.GatherGreen(arg_2, arg_3, (0).xx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureGather_d6507c();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureGather_d6507c();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureGather_d6507c();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/d6507c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/d6507c.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..158dc3c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/d6507c.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture2D<float4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_d6507c() {
+  float2 arg_3 = (0.0f).xx;
+  float4 res = arg_1.GatherGreen(arg_2, arg_3, (0).xx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureGather_d6507c();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureGather_d6507c();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureGather_d6507c();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/d6507c.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGather/d6507c.wgsl.expected.glsl
new file mode 100644
index 0000000..493bc74
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/d6507c.wgsl.expected.glsl
@@ -0,0 +1,58 @@
+#version 310 es
+
+uniform highp sampler2D arg_1_arg_2;
+
+void textureGather_d6507c() {
+  vec2 arg_3 = vec2(0.0f);
+  vec4 res = textureGatherOffset(arg_1_arg_2, arg_3, ivec2(0), int(1u));
+}
+
+vec4 vertex_main() {
+  textureGather_d6507c();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2D arg_1_arg_2;
+
+void textureGather_d6507c() {
+  vec2 arg_3 = vec2(0.0f);
+  vec4 res = textureGatherOffset(arg_1_arg_2, arg_3, ivec2(0), int(1u));
+}
+
+void fragment_main() {
+  textureGather_d6507c();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp sampler2D arg_1_arg_2;
+
+void textureGather_d6507c() {
+  vec2 arg_3 = vec2(0.0f);
+  vec4 res = textureGatherOffset(arg_1_arg_2, arg_3, ivec2(0), int(1u));
+}
+
+void compute_main() {
+  textureGather_d6507c();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/d6507c.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/d6507c.wgsl.expected.msl
new file mode 100644
index 0000000..2a6abf0
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/d6507c.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureGather_d6507c(texture2d<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+  float2 arg_3 = float2(0.0f);
+  float4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, int2(0), component::y);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<float, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+  textureGather_d6507c(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+  textureGather_d6507c(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+  textureGather_d6507c(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureGather/d6507c.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/d6507c.wgsl.expected.spvasm
new file mode 100644
index 0000000..6ea4db6
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/d6507c.wgsl.expected.spvasm
@@ -0,0 +1,92 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 50
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %textureGather_d6507c "textureGather_d6507c"
+               OpName %arg_3 "arg_3"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_1 DescriptorSet 1
+               OpDecorate %arg_1 Binding 1
+               OpDecorate %arg_2 DescriptorSet 1
+               OpDecorate %arg_2 Binding 2
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_1 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+         %14 = OpTypeSampler
+%_ptr_UniformConstant_14 = OpTypePointer UniformConstant %14
+      %arg_2 = OpVariable %_ptr_UniformConstant_14 UniformConstant
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+    %v2float = OpTypeVector %float 2
+         %20 = OpConstantNull %v2float
+%_ptr_Function_v2float = OpTypePointer Function %v2float
+         %26 = OpTypeSampledImage %11
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+        %int = OpTypeInt 32 1
+      %v2int = OpTypeVector %int 2
+         %33 = OpConstantNull %v2int
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+         %36 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureGather_d6507c = OpFunction %void None %15
+         %18 = OpLabel
+      %arg_3 = OpVariable %_ptr_Function_v2float Function %20
+        %res = OpVariable %_ptr_Function_v4float Function %5
+               OpStore %arg_3 %20
+         %24 = OpLoad %14 %arg_2
+         %25 = OpLoad %11 %arg_1
+         %27 = OpSampledImage %26 %25 %24
+         %28 = OpLoad %v2float %arg_3
+         %23 = OpImageGather %v4float %27 %28 %uint_1 ConstOffset %33
+               OpStore %res %23
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %36
+         %38 = OpLabel
+         %39 = OpFunctionCall %void %textureGather_d6507c
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %41 = OpLabel
+         %42 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %42
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %45 = OpLabel
+         %46 = OpFunctionCall %void %textureGather_d6507c
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %48 = OpLabel
+         %49 = OpFunctionCall %void %textureGather_d6507c
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureGather/d6507c.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/d6507c.wgsl.expected.wgsl
new file mode 100644
index 0000000..97e61e9
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/d6507c.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+@group(1) @binding(1) var arg_1 : texture_2d<f32>;
+
+@group(1) @binding(2) var arg_2 : sampler;
+
+fn textureGather_d6507c() {
+  const arg_0 = 1u;
+  var arg_3 = vec2<f32>();
+  const arg_4 = vec2<i32>();
+  var res : vec4<f32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGather_d6507c();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureGather_d6507c();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureGather_d6507c();
+}
diff --git a/test/tint/builtins/gen/var/textureGather/d8e958.wgsl b/test/tint/builtins/gen/var/textureGather/d8e958.wgsl
new file mode 100644
index 0000000..c9d9eac8
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/d8e958.wgsl
@@ -0,0 +1,47 @@
+// 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(1) var arg_1: texture_2d<f32>;
+@group(1) @binding(2) var arg_2: sampler;
+
+// fn textureGather(@const component: u32, texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>) -> vec4<f32>
+fn textureGather_d8e958() {
+  const arg_0 = 1u;
+  var arg_3 = vec2<f32>();
+  var res: vec4<f32> = textureGather(arg_0, arg_1, arg_2, arg_3);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGather_d8e958();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureGather_d8e958();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureGather_d8e958();
+}
diff --git a/test/tint/builtins/gen/var/textureGather/d8e958.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/d8e958.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..03635a4
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/d8e958.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture2D<float4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_d8e958() {
+  float2 arg_3 = (0.0f).xx;
+  float4 res = arg_1.GatherGreen(arg_2, arg_3);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureGather_d8e958();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureGather_d8e958();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureGather_d8e958();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/d8e958.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/d8e958.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..03635a4
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/d8e958.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture2D<float4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_d8e958() {
+  float2 arg_3 = (0.0f).xx;
+  float4 res = arg_1.GatherGreen(arg_2, arg_3);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureGather_d8e958();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureGather_d8e958();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureGather_d8e958();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/d8e958.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGather/d8e958.wgsl.expected.glsl
new file mode 100644
index 0000000..ec027e7
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/d8e958.wgsl.expected.glsl
@@ -0,0 +1,58 @@
+#version 310 es
+
+uniform highp sampler2D arg_1_arg_2;
+
+void textureGather_d8e958() {
+  vec2 arg_3 = vec2(0.0f);
+  vec4 res = textureGather(arg_1_arg_2, arg_3, int(1u));
+}
+
+vec4 vertex_main() {
+  textureGather_d8e958();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2D arg_1_arg_2;
+
+void textureGather_d8e958() {
+  vec2 arg_3 = vec2(0.0f);
+  vec4 res = textureGather(arg_1_arg_2, arg_3, int(1u));
+}
+
+void fragment_main() {
+  textureGather_d8e958();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp sampler2D arg_1_arg_2;
+
+void textureGather_d8e958() {
+  vec2 arg_3 = vec2(0.0f);
+  vec4 res = textureGather(arg_1_arg_2, arg_3, int(1u));
+}
+
+void compute_main() {
+  textureGather_d8e958();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/d8e958.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/d8e958.wgsl.expected.msl
new file mode 100644
index 0000000..0cf129f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/d8e958.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureGather_d8e958(texture2d<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+  float2 arg_3 = float2(0.0f);
+  float4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, int2(0), component::y);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<float, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+  textureGather_d8e958(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+  textureGather_d8e958(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+  textureGather_d8e958(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureGather/d8e958.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/d8e958.wgsl.expected.spvasm
new file mode 100644
index 0000000..3800a97
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/d8e958.wgsl.expected.spvasm
@@ -0,0 +1,89 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 47
+; 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_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %textureGather_d8e958 "textureGather_d8e958"
+               OpName %arg_3 "arg_3"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_1 DescriptorSet 1
+               OpDecorate %arg_1 Binding 1
+               OpDecorate %arg_2 DescriptorSet 1
+               OpDecorate %arg_2 Binding 2
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_1 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+         %14 = OpTypeSampler
+%_ptr_UniformConstant_14 = OpTypePointer UniformConstant %14
+      %arg_2 = OpVariable %_ptr_UniformConstant_14 UniformConstant
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+    %v2float = OpTypeVector %float 2
+         %20 = OpConstantNull %v2float
+%_ptr_Function_v2float = OpTypePointer Function %v2float
+         %26 = OpTypeSampledImage %11
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+         %33 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureGather_d8e958 = OpFunction %void None %15
+         %18 = OpLabel
+      %arg_3 = OpVariable %_ptr_Function_v2float Function %20
+        %res = OpVariable %_ptr_Function_v4float Function %5
+               OpStore %arg_3 %20
+         %24 = OpLoad %14 %arg_2
+         %25 = OpLoad %11 %arg_1
+         %27 = OpSampledImage %26 %25 %24
+         %28 = OpLoad %v2float %arg_3
+         %23 = OpImageGather %v4float %27 %28 %uint_1
+               OpStore %res %23
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %33
+         %35 = OpLabel
+         %36 = OpFunctionCall %void %textureGather_d8e958
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %38 = OpLabel
+         %39 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %39
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %42 = OpLabel
+         %43 = OpFunctionCall %void %textureGather_d8e958
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %45 = OpLabel
+         %46 = OpFunctionCall %void %textureGather_d8e958
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureGather/d8e958.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/d8e958.wgsl.expected.wgsl
new file mode 100644
index 0000000..f4776fb
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/d8e958.wgsl.expected.wgsl
@@ -0,0 +1,25 @@
+@group(1) @binding(1) var arg_1 : texture_2d<f32>;
+
+@group(1) @binding(2) var arg_2 : sampler;
+
+fn textureGather_d8e958() {
+  const arg_0 = 1u;
+  var arg_3 = vec2<f32>();
+  var res : vec4<f32> = textureGather(arg_0, arg_1, arg_2, arg_3);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGather_d8e958();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureGather_d8e958();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureGather_d8e958();
+}
diff --git a/test/tint/builtins/gen/var/textureGather/dc6661.wgsl b/test/tint/builtins/gen/var/textureGather/dc6661.wgsl
new file mode 100644
index 0000000..b51c3e5
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/dc6661.wgsl
@@ -0,0 +1,48 @@
+// 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(1) var arg_1: texture_2d<i32>;
+@group(1) @binding(2) var arg_2: sampler;
+
+// fn textureGather(@const component: u32, texture: texture_2d<i32>, sampler: sampler, coords: vec2<f32>, @const offset: vec2<i32>) -> vec4<i32>
+fn textureGather_dc6661() {
+  const arg_0 = 1u;
+  var arg_3 = vec2<f32>();
+  const arg_4 = vec2<i32>();
+  var res: vec4<i32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGather_dc6661();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureGather_dc6661();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureGather_dc6661();
+}
diff --git a/test/tint/builtins/gen/var/textureGather/dc6661.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/dc6661.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..0fc31ac
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/dc6661.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture2D<int4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_dc6661() {
+  float2 arg_3 = (0.0f).xx;
+  int4 res = arg_1.GatherGreen(arg_2, arg_3, (0).xx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureGather_dc6661();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureGather_dc6661();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureGather_dc6661();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/dc6661.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/dc6661.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..0fc31ac
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/dc6661.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture2D<int4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_dc6661() {
+  float2 arg_3 = (0.0f).xx;
+  int4 res = arg_1.GatherGreen(arg_2, arg_3, (0).xx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureGather_dc6661();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureGather_dc6661();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureGather_dc6661();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/dc6661.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGather/dc6661.wgsl.expected.glsl
new file mode 100644
index 0000000..98f224d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/dc6661.wgsl.expected.glsl
@@ -0,0 +1,58 @@
+#version 310 es
+
+uniform highp isampler2D arg_1_arg_2;
+
+void textureGather_dc6661() {
+  vec2 arg_3 = vec2(0.0f);
+  ivec4 res = textureGatherOffset(arg_1_arg_2, arg_3, ivec2(0), int(1u));
+}
+
+vec4 vertex_main() {
+  textureGather_dc6661();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp isampler2D arg_1_arg_2;
+
+void textureGather_dc6661() {
+  vec2 arg_3 = vec2(0.0f);
+  ivec4 res = textureGatherOffset(arg_1_arg_2, arg_3, ivec2(0), int(1u));
+}
+
+void fragment_main() {
+  textureGather_dc6661();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp isampler2D arg_1_arg_2;
+
+void textureGather_dc6661() {
+  vec2 arg_3 = vec2(0.0f);
+  ivec4 res = textureGatherOffset(arg_1_arg_2, arg_3, ivec2(0), int(1u));
+}
+
+void compute_main() {
+  textureGather_dc6661();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/dc6661.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/dc6661.wgsl.expected.msl
new file mode 100644
index 0000000..479290e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/dc6661.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureGather_dc6661(texture2d<int, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+  float2 arg_3 = float2(0.0f);
+  int4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, int2(0), component::y);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<int, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+  textureGather_dc6661(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<int, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<int, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+  textureGather_dc6661(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d<int, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+  textureGather_dc6661(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureGather/dc6661.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/dc6661.wgsl.expected.spvasm
new file mode 100644
index 0000000..a6e8142
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/dc6661.wgsl.expected.spvasm
@@ -0,0 +1,94 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 52
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %textureGather_dc6661 "textureGather_dc6661"
+               OpName %arg_3 "arg_3"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_1 DescriptorSet 1
+               OpDecorate %arg_1 Binding 1
+               OpDecorate %arg_2 DescriptorSet 1
+               OpDecorate %arg_2 Binding 2
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 2D 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_1 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+         %15 = OpTypeSampler
+%_ptr_UniformConstant_15 = OpTypePointer UniformConstant %15
+      %arg_2 = OpVariable %_ptr_UniformConstant_15 UniformConstant
+       %void = OpTypeVoid
+         %16 = OpTypeFunction %void
+    %v2float = OpTypeVector %float 2
+         %21 = OpConstantNull %v2float
+%_ptr_Function_v2float = OpTypePointer Function %v2float
+      %v4int = OpTypeVector %int 4
+         %28 = OpTypeSampledImage %11
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+      %v2int = OpTypeVector %int 2
+         %34 = OpConstantNull %v2int
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+         %37 = OpConstantNull %v4int
+         %38 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureGather_dc6661 = OpFunction %void None %16
+         %19 = OpLabel
+      %arg_3 = OpVariable %_ptr_Function_v2float Function %21
+        %res = OpVariable %_ptr_Function_v4int Function %37
+               OpStore %arg_3 %21
+         %26 = OpLoad %15 %arg_2
+         %27 = OpLoad %11 %arg_1
+         %29 = OpSampledImage %28 %27 %26
+         %30 = OpLoad %v2float %arg_3
+         %24 = OpImageGather %v4int %29 %30 %uint_1 ConstOffset %34
+               OpStore %res %24
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %38
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %textureGather_dc6661
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %16
+         %43 = OpLabel
+         %44 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %44
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %16
+         %47 = OpLabel
+         %48 = OpFunctionCall %void %textureGather_dc6661
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %16
+         %50 = OpLabel
+         %51 = OpFunctionCall %void %textureGather_dc6661
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureGather/dc6661.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/dc6661.wgsl.expected.wgsl
new file mode 100644
index 0000000..b639399
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/dc6661.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+@group(1) @binding(1) var arg_1 : texture_2d<i32>;
+
+@group(1) @binding(2) var arg_2 : sampler;
+
+fn textureGather_dc6661() {
+  const arg_0 = 1u;
+  var arg_3 = vec2<f32>();
+  const arg_4 = vec2<i32>();
+  var res : vec4<i32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGather_dc6661();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureGather_dc6661();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureGather_dc6661();
+}
diff --git a/test/tint/builtins/gen/var/textureGather/e2acac.wgsl b/test/tint/builtins/gen/var/textureGather/e2acac.wgsl
new file mode 100644
index 0000000..6d145fa
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/e2acac.wgsl
@@ -0,0 +1,48 @@
+// 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(1) var arg_1: texture_cube_array<u32>;
+@group(1) @binding(2) var arg_2: sampler;
+
+// fn textureGather(@const component: u32, texture: texture_cube_array<u32>, sampler: sampler, coords: vec3<f32>, array_index: u32) -> vec4<u32>
+fn textureGather_e2acac() {
+  const arg_0 = 1u;
+  var arg_3 = vec3<f32>();
+  var arg_4 = 1u;
+  var res: vec4<u32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGather_e2acac();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureGather_e2acac();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureGather_e2acac();
+}
diff --git a/test/tint/builtins/gen/var/textureGather/e2acac.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/e2acac.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..57cafd4
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/e2acac.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+TextureCubeArray<uint4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_e2acac() {
+  float3 arg_3 = (0.0f).xxx;
+  uint arg_4 = 1u;
+  uint4 res = arg_1.GatherGreen(arg_2, float4(arg_3, float(arg_4)));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureGather_e2acac();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureGather_e2acac();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureGather_e2acac();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/e2acac.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/e2acac.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..57cafd4
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/e2acac.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+TextureCubeArray<uint4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_e2acac() {
+  float3 arg_3 = (0.0f).xxx;
+  uint arg_4 = 1u;
+  uint4 res = arg_1.GatherGreen(arg_2, float4(arg_3, float(arg_4)));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureGather_e2acac();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureGather_e2acac();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureGather_e2acac();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/e2acac.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGather/e2acac.wgsl.expected.glsl
new file mode 100644
index 0000000..a4fd26f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/e2acac.wgsl.expected.glsl
@@ -0,0 +1,84 @@
+SKIP: FAILED
+
+#version 310 es
+
+uniform highp usamplerCubeArray arg_1_arg_2;
+
+void textureGather_e2acac() {
+  vec3 arg_3 = vec3(0.0f);
+  uint arg_4 = 1u;
+  uvec4 res = textureGather(arg_1_arg_2, vec4(arg_3, float(arg_4)), int(1u));
+}
+
+vec4 vertex_main() {
+  textureGather_e2acac();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'usamplerCubeArray' : Reserved word. 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+uniform highp usamplerCubeArray arg_1_arg_2;
+
+void textureGather_e2acac() {
+  vec3 arg_3 = vec3(0.0f);
+  uint arg_4 = 1u;
+  uvec4 res = textureGather(arg_1_arg_2, vec4(arg_3, float(arg_4)), int(1u));
+}
+
+void fragment_main() {
+  textureGather_e2acac();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'usamplerCubeArray' : Reserved word. 
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+uniform highp usamplerCubeArray arg_1_arg_2;
+
+void textureGather_e2acac() {
+  vec3 arg_3 = vec3(0.0f);
+  uint arg_4 = 1u;
+  uvec4 res = textureGather(arg_1_arg_2, vec4(arg_3, float(arg_4)), int(1u));
+}
+
+void compute_main() {
+  textureGather_e2acac();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'usamplerCubeArray' : Reserved word. 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureGather/e2acac.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/e2acac.wgsl.expected.msl
new file mode 100644
index 0000000..1fdaddc
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/e2acac.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureGather_e2acac(texturecube_array<uint, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+  float3 arg_3 = float3(0.0f);
+  uint arg_4 = 1u;
+  uint4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, arg_4, component::y);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texturecube_array<uint, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+  textureGather_e2acac(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texturecube_array<uint, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texturecube_array<uint, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+  textureGather_e2acac(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texturecube_array<uint, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+  textureGather_e2acac(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureGather/e2acac.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/e2acac.wgsl.expected.spvasm
new file mode 100644
index 0000000..f6a7322
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/e2acac.wgsl.expected.spvasm
@@ -0,0 +1,103 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 58
+; Schema: 0
+               OpCapability Shader
+               OpCapability SampledCubeArray
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %textureGather_e2acac "textureGather_e2acac"
+               OpName %arg_3 "arg_3"
+               OpName %arg_4 "arg_4"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_1 DescriptorSet 1
+               OpDecorate %arg_1 Binding 1
+               OpDecorate %arg_2 DescriptorSet 1
+               OpDecorate %arg_2 Binding 2
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint Cube 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_1 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+         %15 = OpTypeSampler
+%_ptr_UniformConstant_15 = OpTypePointer UniformConstant %15
+      %arg_2 = OpVariable %_ptr_UniformConstant_15 UniformConstant
+       %void = OpTypeVoid
+         %16 = OpTypeFunction %void
+    %v3float = OpTypeVector %float 3
+         %21 = OpConstantNull %v3float
+%_ptr_Function_v3float = OpTypePointer Function %v3float
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %27 = OpConstantNull %uint
+     %v4uint = OpTypeVector %uint 4
+         %32 = OpTypeSampledImage %11
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+         %43 = OpConstantNull %v4uint
+         %44 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureGather_e2acac = OpFunction %void None %16
+         %19 = OpLabel
+      %arg_3 = OpVariable %_ptr_Function_v3float Function %21
+      %arg_4 = OpVariable %_ptr_Function_uint Function %27
+        %res = OpVariable %_ptr_Function_v4uint Function %43
+               OpStore %arg_3 %21
+               OpStore %arg_4 %uint_1
+         %30 = OpLoad %15 %arg_2
+         %31 = OpLoad %11 %arg_1
+         %33 = OpSampledImage %32 %31 %30
+         %34 = OpLoad %v3float %arg_3
+         %35 = OpCompositeExtract %float %34 0
+         %36 = OpCompositeExtract %float %34 1
+         %37 = OpCompositeExtract %float %34 2
+         %39 = OpLoad %uint %arg_4
+         %38 = OpConvertUToF %float %39
+         %40 = OpCompositeConstruct %v4float %35 %36 %37 %38
+         %28 = OpImageGather %v4uint %33 %40 %uint_1
+               OpStore %res %28
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %44
+         %46 = OpLabel
+         %47 = OpFunctionCall %void %textureGather_e2acac
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %16
+         %49 = OpLabel
+         %50 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %50
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %16
+         %53 = OpLabel
+         %54 = OpFunctionCall %void %textureGather_e2acac
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %16
+         %56 = OpLabel
+         %57 = OpFunctionCall %void %textureGather_e2acac
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureGather/e2acac.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/e2acac.wgsl.expected.wgsl
new file mode 100644
index 0000000..f3fda10
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/e2acac.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+@group(1) @binding(1) var arg_1 : texture_cube_array<u32>;
+
+@group(1) @binding(2) var arg_2 : sampler;
+
+fn textureGather_e2acac() {
+  const arg_0 = 1u;
+  var arg_3 = vec3<f32>();
+  var arg_4 = 1u;
+  var res : vec4<u32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGather_e2acac();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureGather_e2acac();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureGather_e2acac();
+}
diff --git a/test/tint/builtins/gen/var/textureGather/ea8eb4.wgsl b/test/tint/builtins/gen/var/textureGather/ea8eb4.wgsl
new file mode 100644
index 0000000..dc6250b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/ea8eb4.wgsl
@@ -0,0 +1,48 @@
+// 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(1) var arg_1: texture_2d_array<f32>;
+@group(1) @binding(2) var arg_2: sampler;
+
+// fn textureGather(@const component: u32, texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: u32) -> vec4<f32>
+fn textureGather_ea8eb4() {
+  const arg_0 = 1u;
+  var arg_3 = vec2<f32>();
+  var arg_4 = 1u;
+  var res: vec4<f32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGather_ea8eb4();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureGather_ea8eb4();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureGather_ea8eb4();
+}
diff --git a/test/tint/builtins/gen/var/textureGather/ea8eb4.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/ea8eb4.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..0759fa5
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/ea8eb4.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture2DArray<float4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_ea8eb4() {
+  float2 arg_3 = (0.0f).xx;
+  uint arg_4 = 1u;
+  float4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureGather_ea8eb4();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureGather_ea8eb4();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureGather_ea8eb4();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/ea8eb4.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/ea8eb4.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..0759fa5
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/ea8eb4.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture2DArray<float4> arg_1 : register(t1, space1);
+SamplerState arg_2 : register(s2, space1);
+
+void textureGather_ea8eb4() {
+  float2 arg_3 = (0.0f).xx;
+  uint arg_4 = 1u;
+  float4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureGather_ea8eb4();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureGather_ea8eb4();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureGather_ea8eb4();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/ea8eb4.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGather/ea8eb4.wgsl.expected.glsl
new file mode 100644
index 0000000..87e62b4
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/ea8eb4.wgsl.expected.glsl
@@ -0,0 +1,61 @@
+#version 310 es
+
+uniform highp sampler2DArray arg_1_arg_2;
+
+void textureGather_ea8eb4() {
+  vec2 arg_3 = vec2(0.0f);
+  uint arg_4 = 1u;
+  vec4 res = textureGather(arg_1_arg_2, vec3(arg_3, float(arg_4)), int(1u));
+}
+
+vec4 vertex_main() {
+  textureGather_ea8eb4();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2DArray arg_1_arg_2;
+
+void textureGather_ea8eb4() {
+  vec2 arg_3 = vec2(0.0f);
+  uint arg_4 = 1u;
+  vec4 res = textureGather(arg_1_arg_2, vec3(arg_3, float(arg_4)), int(1u));
+}
+
+void fragment_main() {
+  textureGather_ea8eb4();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp sampler2DArray arg_1_arg_2;
+
+void textureGather_ea8eb4() {
+  vec2 arg_3 = vec2(0.0f);
+  uint arg_4 = 1u;
+  vec4 res = textureGather(arg_1_arg_2, vec3(arg_3, float(arg_4)), int(1u));
+}
+
+void compute_main() {
+  textureGather_ea8eb4();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureGather/ea8eb4.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/ea8eb4.wgsl.expected.msl
new file mode 100644
index 0000000..51fd170
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/ea8eb4.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureGather_ea8eb4(texture2d_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+  float2 arg_3 = float2(0.0f);
+  uint arg_4 = 1u;
+  float4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, arg_4, int2(0), component::y);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<float, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+  textureGather_ea8eb4(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+  textureGather_ea8eb4(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+  textureGather_ea8eb4(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureGather/ea8eb4.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/ea8eb4.wgsl.expected.spvasm
new file mode 100644
index 0000000..e629bb7
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/ea8eb4.wgsl.expected.spvasm
@@ -0,0 +1,100 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 56
+; 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_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %textureGather_ea8eb4 "textureGather_ea8eb4"
+               OpName %arg_3 "arg_3"
+               OpName %arg_4 "arg_4"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_1 DescriptorSet 1
+               OpDecorate %arg_1 Binding 1
+               OpDecorate %arg_2 DescriptorSet 1
+               OpDecorate %arg_2 Binding 2
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_1 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+         %14 = OpTypeSampler
+%_ptr_UniformConstant_14 = OpTypePointer UniformConstant %14
+      %arg_2 = OpVariable %_ptr_UniformConstant_14 UniformConstant
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+    %v2float = OpTypeVector %float 2
+         %20 = OpConstantNull %v2float
+%_ptr_Function_v2float = OpTypePointer Function %v2float
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %27 = OpConstantNull %uint
+         %31 = OpTypeSampledImage %11
+    %v3float = OpTypeVector %float 3
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+         %42 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureGather_ea8eb4 = OpFunction %void None %15
+         %18 = OpLabel
+      %arg_3 = OpVariable %_ptr_Function_v2float Function %20
+      %arg_4 = OpVariable %_ptr_Function_uint Function %27
+        %res = OpVariable %_ptr_Function_v4float Function %5
+               OpStore %arg_3 %20
+               OpStore %arg_4 %uint_1
+         %29 = OpLoad %14 %arg_2
+         %30 = OpLoad %11 %arg_1
+         %32 = OpSampledImage %31 %30 %29
+         %34 = OpLoad %v2float %arg_3
+         %35 = OpCompositeExtract %float %34 0
+         %36 = OpCompositeExtract %float %34 1
+         %38 = OpLoad %uint %arg_4
+         %37 = OpConvertUToF %float %38
+         %39 = OpCompositeConstruct %v3float %35 %36 %37
+         %28 = OpImageGather %v4float %32 %39 %uint_1
+               OpStore %res %28
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %42
+         %44 = OpLabel
+         %45 = OpFunctionCall %void %textureGather_ea8eb4
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %47 = OpLabel
+         %48 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %48
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %51 = OpLabel
+         %52 = OpFunctionCall %void %textureGather_ea8eb4
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %54 = OpLabel
+         %55 = OpFunctionCall %void %textureGather_ea8eb4
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureGather/ea8eb4.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/ea8eb4.wgsl.expected.wgsl
new file mode 100644
index 0000000..5062f18
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGather/ea8eb4.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+@group(1) @binding(1) var arg_1 : texture_2d_array<f32>;
+
+@group(1) @binding(2) var arg_2 : sampler;
+
+fn textureGather_ea8eb4() {
+  const arg_0 = 1u;
+  var arg_3 = vec2<f32>();
+  var arg_4 = 1u;
+  var res : vec4<f32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGather_ea8eb4();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureGather_ea8eb4();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureGather_ea8eb4();
+}
diff --git a/test/tint/builtins/gen/var/textureGatherCompare/144a9a.wgsl b/test/tint/builtins/gen/var/textureGatherCompare/144a9a.wgsl
new file mode 100644
index 0000000..f54540c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGatherCompare/144a9a.wgsl
@@ -0,0 +1,49 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_depth_2d_array;
+@group(1) @binding(1) var arg_1: sampler_comparison;
+
+// fn textureGatherCompare(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2<f32>, array_index: u32, depth_ref: f32, @const offset: vec2<i32>) -> vec4<f32>
+fn textureGatherCompare_144a9a() {
+  var arg_2 = vec2<f32>();
+  var arg_3 = 1u;
+  var arg_4 = 1.f;
+  const arg_5 = vec2<i32>();
+  var res: vec4<f32> = textureGatherCompare(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGatherCompare_144a9a();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureGatherCompare_144a9a();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureGatherCompare_144a9a();
+}
diff --git a/test/tint/builtins/gen/var/textureGatherCompare/144a9a.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGatherCompare/144a9a.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..889e75c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGatherCompare/144a9a.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray arg_0 : register(t0, space1);
+SamplerComparisonState arg_1 : register(s1, space1);
+
+void textureGatherCompare_144a9a() {
+  float2 arg_2 = (0.0f).xx;
+  uint arg_3 = 1u;
+  float arg_4 = 1.0f;
+  float4 res = arg_0.GatherCmp(arg_1, float3(arg_2, float(arg_3)), arg_4, (0).xx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureGatherCompare_144a9a();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureGatherCompare_144a9a();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureGatherCompare_144a9a();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureGatherCompare/144a9a.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGatherCompare/144a9a.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..889e75c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGatherCompare/144a9a.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray arg_0 : register(t0, space1);
+SamplerComparisonState arg_1 : register(s1, space1);
+
+void textureGatherCompare_144a9a() {
+  float2 arg_2 = (0.0f).xx;
+  uint arg_3 = 1u;
+  float arg_4 = 1.0f;
+  float4 res = arg_0.GatherCmp(arg_1, float3(arg_2, float(arg_3)), arg_4, (0).xx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureGatherCompare_144a9a();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureGatherCompare_144a9a();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureGatherCompare_144a9a();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureGatherCompare/144a9a.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGatherCompare/144a9a.wgsl.expected.glsl
new file mode 100644
index 0000000..000522c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGatherCompare/144a9a.wgsl.expected.glsl
@@ -0,0 +1,64 @@
+#version 310 es
+
+uniform highp sampler2DArrayShadow arg_0_arg_1;
+
+void textureGatherCompare_144a9a() {
+  vec2 arg_2 = vec2(0.0f);
+  uint arg_3 = 1u;
+  float arg_4 = 1.0f;
+  vec4 res = textureGatherOffset(arg_0_arg_1, vec3(arg_2, float(arg_3)), arg_4, ivec2(0));
+}
+
+vec4 vertex_main() {
+  textureGatherCompare_144a9a();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2DArrayShadow arg_0_arg_1;
+
+void textureGatherCompare_144a9a() {
+  vec2 arg_2 = vec2(0.0f);
+  uint arg_3 = 1u;
+  float arg_4 = 1.0f;
+  vec4 res = textureGatherOffset(arg_0_arg_1, vec3(arg_2, float(arg_3)), arg_4, ivec2(0));
+}
+
+void fragment_main() {
+  textureGatherCompare_144a9a();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp sampler2DArrayShadow arg_0_arg_1;
+
+void textureGatherCompare_144a9a() {
+  vec2 arg_2 = vec2(0.0f);
+  uint arg_3 = 1u;
+  float arg_4 = 1.0f;
+  vec4 res = textureGatherOffset(arg_0_arg_1, vec3(arg_2, float(arg_3)), arg_4, ivec2(0));
+}
+
+void compute_main() {
+  textureGatherCompare_144a9a();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureGatherCompare/144a9a.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGatherCompare/144a9a.wgsl.expected.msl
new file mode 100644
index 0000000..2332e49
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGatherCompare/144a9a.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureGatherCompare_144a9a(depth2d_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+  float2 arg_2 = float2(0.0f);
+  uint arg_3 = 1u;
+  float arg_4 = 1.0f;
+  float4 res = tint_symbol_1.gather_compare(tint_symbol_2, arg_2, arg_3, arg_4, int2(0));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(depth2d_array<float, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+  textureGatherCompare_144a9a(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(depth2d_array<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(depth2d_array<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+  textureGatherCompare_144a9a(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(depth2d_array<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+  textureGatherCompare_144a9a(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureGatherCompare/144a9a.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGatherCompare/144a9a.wgsl.expected.spvasm
new file mode 100644
index 0000000..d2973ef
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGatherCompare/144a9a.wgsl.expected.spvasm
@@ -0,0 +1,108 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 62
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %arg_1 "arg_1"
+               OpName %textureGatherCompare_144a9a "textureGatherCompare_144a9a"
+               OpName %arg_2 "arg_2"
+               OpName %arg_3 "arg_3"
+               OpName %arg_4 "arg_4"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %arg_1 DescriptorSet 1
+               OpDecorate %arg_1 Binding 1
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+         %14 = OpTypeSampler
+%_ptr_UniformConstant_14 = OpTypePointer UniformConstant %14
+      %arg_1 = OpVariable %_ptr_UniformConstant_14 UniformConstant
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+    %v2float = OpTypeVector %float 2
+         %20 = OpConstantNull %v2float
+%_ptr_Function_v2float = OpTypePointer Function %v2float
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %27 = OpConstantNull %uint
+    %float_1 = OpConstant %float 1
+%_ptr_Function_float = OpTypePointer Function %float
+         %34 = OpTypeSampledImage %11
+    %v3float = OpTypeVector %float 3
+        %int = OpTypeInt 32 1
+      %v2int = OpTypeVector %int 2
+         %46 = OpConstantNull %v2int
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+         %49 = OpTypeFunction %v4float
+%textureGatherCompare_144a9a = OpFunction %void None %15
+         %18 = OpLabel
+      %arg_2 = OpVariable %_ptr_Function_v2float Function %20
+      %arg_3 = OpVariable %_ptr_Function_uint Function %27
+      %arg_4 = OpVariable %_ptr_Function_float Function %8
+        %res = OpVariable %_ptr_Function_v4float Function %5
+               OpStore %arg_2 %20
+               OpStore %arg_3 %uint_1
+               OpStore %arg_4 %float_1
+         %32 = OpLoad %14 %arg_1
+         %33 = OpLoad %11 %arg_0
+         %35 = OpSampledImage %34 %33 %32
+         %37 = OpLoad %v2float %arg_2
+         %38 = OpCompositeExtract %float %37 0
+         %39 = OpCompositeExtract %float %37 1
+         %41 = OpLoad %uint %arg_3
+         %40 = OpConvertUToF %float %41
+         %42 = OpCompositeConstruct %v3float %38 %39 %40
+         %43 = OpLoad %float %arg_4
+         %31 = OpImageDrefGather %v4float %35 %42 %43 ConstOffset %46
+               OpStore %res %31
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %49
+         %51 = OpLabel
+         %52 = OpFunctionCall %void %textureGatherCompare_144a9a
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %54 = OpLabel
+         %55 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %55
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %57 = OpLabel
+         %58 = OpFunctionCall %void %textureGatherCompare_144a9a
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %60 = OpLabel
+         %61 = OpFunctionCall %void %textureGatherCompare_144a9a
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureGatherCompare/144a9a.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGatherCompare/144a9a.wgsl.expected.wgsl
new file mode 100644
index 0000000..3544909
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGatherCompare/144a9a.wgsl.expected.wgsl
@@ -0,0 +1,27 @@
+@group(1) @binding(0) var arg_0 : texture_depth_2d_array;
+
+@group(1) @binding(1) var arg_1 : sampler_comparison;
+
+fn textureGatherCompare_144a9a() {
+  var arg_2 = vec2<f32>();
+  var arg_3 = 1u;
+  var arg_4 = 1.0f;
+  const arg_5 = vec2<i32>();
+  var res : vec4<f32> = textureGatherCompare(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGatherCompare_144a9a();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureGatherCompare_144a9a();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureGatherCompare_144a9a();
+}
diff --git a/test/tint/builtins/gen/var/textureGatherCompare/2e409c.wgsl b/test/tint/builtins/gen/var/textureGatherCompare/2e409c.wgsl
new file mode 100644
index 0000000..d6ea315
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGatherCompare/2e409c.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_depth_cube_array;
+@group(1) @binding(1) var arg_1: sampler_comparison;
+
+// fn textureGatherCompare(texture: texture_depth_cube_array, sampler: sampler_comparison, coords: vec3<f32>, array_index: u32, depth_ref: f32) -> vec4<f32>
+fn textureGatherCompare_2e409c() {
+  var arg_2 = vec3<f32>();
+  var arg_3 = 1u;
+  var arg_4 = 1.f;
+  var res: vec4<f32> = textureGatherCompare(arg_0, arg_1, arg_2, arg_3, arg_4);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGatherCompare_2e409c();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureGatherCompare_2e409c();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureGatherCompare_2e409c();
+}
diff --git a/test/tint/builtins/gen/var/textureGatherCompare/2e409c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGatherCompare/2e409c.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..625ef635
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGatherCompare/2e409c.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+TextureCubeArray arg_0 : register(t0, space1);
+SamplerComparisonState arg_1 : register(s1, space1);
+
+void textureGatherCompare_2e409c() {
+  float3 arg_2 = (0.0f).xxx;
+  uint arg_3 = 1u;
+  float arg_4 = 1.0f;
+  float4 res = arg_0.GatherCmp(arg_1, float4(arg_2, float(arg_3)), arg_4);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureGatherCompare_2e409c();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureGatherCompare_2e409c();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureGatherCompare_2e409c();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureGatherCompare/2e409c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGatherCompare/2e409c.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..625ef635
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGatherCompare/2e409c.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+TextureCubeArray arg_0 : register(t0, space1);
+SamplerComparisonState arg_1 : register(s1, space1);
+
+void textureGatherCompare_2e409c() {
+  float3 arg_2 = (0.0f).xxx;
+  uint arg_3 = 1u;
+  float arg_4 = 1.0f;
+  float4 res = arg_0.GatherCmp(arg_1, float4(arg_2, float(arg_3)), arg_4);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureGatherCompare_2e409c();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureGatherCompare_2e409c();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureGatherCompare_2e409c();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureGatherCompare/2e409c.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGatherCompare/2e409c.wgsl.expected.glsl
new file mode 100644
index 0000000..51c85b2
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGatherCompare/2e409c.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+uniform highp samplerCubeArrayShadow arg_0_arg_1;
+
+void textureGatherCompare_2e409c() {
+  vec3 arg_2 = vec3(0.0f);
+  uint arg_3 = 1u;
+  float arg_4 = 1.0f;
+  vec4 res = textureGather(arg_0_arg_1, vec4(arg_2, float(arg_3)), arg_4);
+}
+
+vec4 vertex_main() {
+  textureGatherCompare_2e409c();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  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: 'samplerCubeArrayShadow' : Reserved word. 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+uniform highp samplerCubeArrayShadow arg_0_arg_1;
+
+void textureGatherCompare_2e409c() {
+  vec3 arg_2 = vec3(0.0f);
+  uint arg_3 = 1u;
+  float arg_4 = 1.0f;
+  vec4 res = textureGather(arg_0_arg_1, vec4(arg_2, float(arg_3)), arg_4);
+}
+
+void fragment_main() {
+  textureGatherCompare_2e409c();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'samplerCubeArrayShadow' : Reserved word. 
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+uniform highp samplerCubeArrayShadow arg_0_arg_1;
+
+void textureGatherCompare_2e409c() {
+  vec3 arg_2 = vec3(0.0f);
+  uint arg_3 = 1u;
+  float arg_4 = 1.0f;
+  vec4 res = textureGather(arg_0_arg_1, vec4(arg_2, float(arg_3)), arg_4);
+}
+
+void compute_main() {
+  textureGatherCompare_2e409c();
+}
+
+layout(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: 'samplerCubeArrayShadow' : Reserved word. 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureGatherCompare/2e409c.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGatherCompare/2e409c.wgsl.expected.msl
new file mode 100644
index 0000000..bd7e100
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGatherCompare/2e409c.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureGatherCompare_2e409c(depthcube_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+  float3 arg_2 = float3(0.0f);
+  uint arg_3 = 1u;
+  float arg_4 = 1.0f;
+  float4 res = tint_symbol_1.gather_compare(tint_symbol_2, arg_2, arg_3, arg_4);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(depthcube_array<float, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+  textureGatherCompare_2e409c(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(depthcube_array<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(depthcube_array<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+  textureGatherCompare_2e409c(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(depthcube_array<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+  textureGatherCompare_2e409c(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureGatherCompare/2e409c.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGatherCompare/2e409c.wgsl.expected.spvasm
new file mode 100644
index 0000000..e65e051
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGatherCompare/2e409c.wgsl.expected.spvasm
@@ -0,0 +1,106 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 59
+; Schema: 0
+               OpCapability Shader
+               OpCapability SampledCubeArray
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %arg_1 "arg_1"
+               OpName %textureGatherCompare_2e409c "textureGatherCompare_2e409c"
+               OpName %arg_2 "arg_2"
+               OpName %arg_3 "arg_3"
+               OpName %arg_4 "arg_4"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %arg_1 DescriptorSet 1
+               OpDecorate %arg_1 Binding 1
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float Cube 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+         %14 = OpTypeSampler
+%_ptr_UniformConstant_14 = OpTypePointer UniformConstant %14
+      %arg_1 = OpVariable %_ptr_UniformConstant_14 UniformConstant
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+    %v3float = OpTypeVector %float 3
+         %20 = OpConstantNull %v3float
+%_ptr_Function_v3float = OpTypePointer Function %v3float
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %27 = OpConstantNull %uint
+    %float_1 = OpConstant %float 1
+%_ptr_Function_float = OpTypePointer Function %float
+         %34 = OpTypeSampledImage %11
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+         %46 = OpTypeFunction %v4float
+%textureGatherCompare_2e409c = OpFunction %void None %15
+         %18 = OpLabel
+      %arg_2 = OpVariable %_ptr_Function_v3float Function %20
+      %arg_3 = OpVariable %_ptr_Function_uint Function %27
+      %arg_4 = OpVariable %_ptr_Function_float Function %8
+        %res = OpVariable %_ptr_Function_v4float Function %5
+               OpStore %arg_2 %20
+               OpStore %arg_3 %uint_1
+               OpStore %arg_4 %float_1
+         %32 = OpLoad %14 %arg_1
+         %33 = OpLoad %11 %arg_0
+         %35 = OpSampledImage %34 %33 %32
+         %36 = OpLoad %v3float %arg_2
+         %37 = OpCompositeExtract %float %36 0
+         %38 = OpCompositeExtract %float %36 1
+         %39 = OpCompositeExtract %float %36 2
+         %41 = OpLoad %uint %arg_3
+         %40 = OpConvertUToF %float %41
+         %42 = OpCompositeConstruct %v4float %37 %38 %39 %40
+         %43 = OpLoad %float %arg_4
+         %31 = OpImageDrefGather %v4float %35 %42 %43
+               OpStore %res %31
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %46
+         %48 = OpLabel
+         %49 = OpFunctionCall %void %textureGatherCompare_2e409c
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %51 = OpLabel
+         %52 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %52
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %54 = OpLabel
+         %55 = OpFunctionCall %void %textureGatherCompare_2e409c
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %57 = OpLabel
+         %58 = OpFunctionCall %void %textureGatherCompare_2e409c
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureGatherCompare/2e409c.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGatherCompare/2e409c.wgsl.expected.wgsl
new file mode 100644
index 0000000..384d9fd
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGatherCompare/2e409c.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+@group(1) @binding(0) var arg_0 : texture_depth_cube_array;
+
+@group(1) @binding(1) var arg_1 : sampler_comparison;
+
+fn textureGatherCompare_2e409c() {
+  var arg_2 = vec3<f32>();
+  var arg_3 = 1u;
+  var arg_4 = 1.0f;
+  var res : vec4<f32> = textureGatherCompare(arg_0, arg_1, arg_2, arg_3, arg_4);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGatherCompare_2e409c();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureGatherCompare_2e409c();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureGatherCompare_2e409c();
+}
diff --git a/test/tint/builtins/gen/var/textureGatherCompare/b5bc43.wgsl b/test/tint/builtins/gen/var/textureGatherCompare/b5bc43.wgsl
new file mode 100644
index 0000000..0dd8c4d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGatherCompare/b5bc43.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_depth_2d_array;
+@group(1) @binding(1) var arg_1: sampler_comparison;
+
+// fn textureGatherCompare(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2<f32>, array_index: u32, depth_ref: f32) -> vec4<f32>
+fn textureGatherCompare_b5bc43() {
+  var arg_2 = vec2<f32>();
+  var arg_3 = 1u;
+  var arg_4 = 1.f;
+  var res: vec4<f32> = textureGatherCompare(arg_0, arg_1, arg_2, arg_3, arg_4);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGatherCompare_b5bc43();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureGatherCompare_b5bc43();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureGatherCompare_b5bc43();
+}
diff --git a/test/tint/builtins/gen/var/textureGatherCompare/b5bc43.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGatherCompare/b5bc43.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..f663775
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGatherCompare/b5bc43.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray arg_0 : register(t0, space1);
+SamplerComparisonState arg_1 : register(s1, space1);
+
+void textureGatherCompare_b5bc43() {
+  float2 arg_2 = (0.0f).xx;
+  uint arg_3 = 1u;
+  float arg_4 = 1.0f;
+  float4 res = arg_0.GatherCmp(arg_1, float3(arg_2, float(arg_3)), arg_4);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureGatherCompare_b5bc43();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureGatherCompare_b5bc43();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureGatherCompare_b5bc43();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureGatherCompare/b5bc43.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGatherCompare/b5bc43.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..f663775
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGatherCompare/b5bc43.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray arg_0 : register(t0, space1);
+SamplerComparisonState arg_1 : register(s1, space1);
+
+void textureGatherCompare_b5bc43() {
+  float2 arg_2 = (0.0f).xx;
+  uint arg_3 = 1u;
+  float arg_4 = 1.0f;
+  float4 res = arg_0.GatherCmp(arg_1, float3(arg_2, float(arg_3)), arg_4);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureGatherCompare_b5bc43();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureGatherCompare_b5bc43();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureGatherCompare_b5bc43();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureGatherCompare/b5bc43.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGatherCompare/b5bc43.wgsl.expected.glsl
new file mode 100644
index 0000000..5e394d1
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGatherCompare/b5bc43.wgsl.expected.glsl
@@ -0,0 +1,64 @@
+#version 310 es
+
+uniform highp sampler2DArrayShadow arg_0_arg_1;
+
+void textureGatherCompare_b5bc43() {
+  vec2 arg_2 = vec2(0.0f);
+  uint arg_3 = 1u;
+  float arg_4 = 1.0f;
+  vec4 res = textureGather(arg_0_arg_1, vec3(arg_2, float(arg_3)), arg_4);
+}
+
+vec4 vertex_main() {
+  textureGatherCompare_b5bc43();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2DArrayShadow arg_0_arg_1;
+
+void textureGatherCompare_b5bc43() {
+  vec2 arg_2 = vec2(0.0f);
+  uint arg_3 = 1u;
+  float arg_4 = 1.0f;
+  vec4 res = textureGather(arg_0_arg_1, vec3(arg_2, float(arg_3)), arg_4);
+}
+
+void fragment_main() {
+  textureGatherCompare_b5bc43();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp sampler2DArrayShadow arg_0_arg_1;
+
+void textureGatherCompare_b5bc43() {
+  vec2 arg_2 = vec2(0.0f);
+  uint arg_3 = 1u;
+  float arg_4 = 1.0f;
+  vec4 res = textureGather(arg_0_arg_1, vec3(arg_2, float(arg_3)), arg_4);
+}
+
+void compute_main() {
+  textureGatherCompare_b5bc43();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureGatherCompare/b5bc43.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGatherCompare/b5bc43.wgsl.expected.msl
new file mode 100644
index 0000000..24c567b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGatherCompare/b5bc43.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureGatherCompare_b5bc43(depth2d_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+  float2 arg_2 = float2(0.0f);
+  uint arg_3 = 1u;
+  float arg_4 = 1.0f;
+  float4 res = tint_symbol_1.gather_compare(tint_symbol_2, arg_2, arg_3, arg_4);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(depth2d_array<float, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+  textureGatherCompare_b5bc43(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(depth2d_array<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(depth2d_array<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+  textureGatherCompare_b5bc43(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(depth2d_array<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+  textureGatherCompare_b5bc43(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureGatherCompare/b5bc43.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGatherCompare/b5bc43.wgsl.expected.spvasm
new file mode 100644
index 0000000..770ddcf
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGatherCompare/b5bc43.wgsl.expected.spvasm
@@ -0,0 +1,105 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 59
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %arg_1 "arg_1"
+               OpName %textureGatherCompare_b5bc43 "textureGatherCompare_b5bc43"
+               OpName %arg_2 "arg_2"
+               OpName %arg_3 "arg_3"
+               OpName %arg_4 "arg_4"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %arg_1 DescriptorSet 1
+               OpDecorate %arg_1 Binding 1
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+         %14 = OpTypeSampler
+%_ptr_UniformConstant_14 = OpTypePointer UniformConstant %14
+      %arg_1 = OpVariable %_ptr_UniformConstant_14 UniformConstant
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+    %v2float = OpTypeVector %float 2
+         %20 = OpConstantNull %v2float
+%_ptr_Function_v2float = OpTypePointer Function %v2float
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %27 = OpConstantNull %uint
+    %float_1 = OpConstant %float 1
+%_ptr_Function_float = OpTypePointer Function %float
+         %34 = OpTypeSampledImage %11
+    %v3float = OpTypeVector %float 3
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+         %46 = OpTypeFunction %v4float
+%textureGatherCompare_b5bc43 = OpFunction %void None %15
+         %18 = OpLabel
+      %arg_2 = OpVariable %_ptr_Function_v2float Function %20
+      %arg_3 = OpVariable %_ptr_Function_uint Function %27
+      %arg_4 = OpVariable %_ptr_Function_float Function %8
+        %res = OpVariable %_ptr_Function_v4float Function %5
+               OpStore %arg_2 %20
+               OpStore %arg_3 %uint_1
+               OpStore %arg_4 %float_1
+         %32 = OpLoad %14 %arg_1
+         %33 = OpLoad %11 %arg_0
+         %35 = OpSampledImage %34 %33 %32
+         %37 = OpLoad %v2float %arg_2
+         %38 = OpCompositeExtract %float %37 0
+         %39 = OpCompositeExtract %float %37 1
+         %41 = OpLoad %uint %arg_3
+         %40 = OpConvertUToF %float %41
+         %42 = OpCompositeConstruct %v3float %38 %39 %40
+         %43 = OpLoad %float %arg_4
+         %31 = OpImageDrefGather %v4float %35 %42 %43
+               OpStore %res %31
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %46
+         %48 = OpLabel
+         %49 = OpFunctionCall %void %textureGatherCompare_b5bc43
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %51 = OpLabel
+         %52 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %52
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %54 = OpLabel
+         %55 = OpFunctionCall %void %textureGatherCompare_b5bc43
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %57 = OpLabel
+         %58 = OpFunctionCall %void %textureGatherCompare_b5bc43
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureGatherCompare/b5bc43.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGatherCompare/b5bc43.wgsl.expected.wgsl
new file mode 100644
index 0000000..a17ccf0
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureGatherCompare/b5bc43.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+@group(1) @binding(0) var arg_0 : texture_depth_2d_array;
+
+@group(1) @binding(1) var arg_1 : sampler_comparison;
+
+fn textureGatherCompare_b5bc43() {
+  var arg_2 = vec2<f32>();
+  var arg_3 = 1u;
+  var arg_4 = 1.0f;
+  var res : vec4<f32> = textureGatherCompare(arg_0, arg_1, arg_2, arg_3, arg_4);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureGatherCompare_b5bc43();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureGatherCompare_b5bc43();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureGatherCompare_b5bc43();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/0cb698.wgsl b/test/tint/builtins/gen/var/textureLoad/0cb698.wgsl
new file mode 100644
index 0000000..1500697
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/0cb698.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_1d<i32>;
+
+// fn textureLoad(texture: texture_1d<i32>, coords: u32, level: u32) -> vec4<i32>
+fn textureLoad_0cb698() {
+  var arg_1 = 1u;
+  var arg_2 = 1u;
+  var res: vec4<i32> = textureLoad(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_0cb698();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_0cb698();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_0cb698();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/0cb698.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/0cb698.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..7746f30
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/0cb698.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture1D<int4> arg_0 : register(t0, space1);
+
+void textureLoad_0cb698() {
+  uint arg_1 = 1u;
+  uint arg_2 = 1u;
+  int4 res = arg_0.Load(uint2(arg_1, arg_2));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_0cb698();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_0cb698();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_0cb698();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/0cb698.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/0cb698.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..7746f30
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/0cb698.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture1D<int4> arg_0 : register(t0, space1);
+
+void textureLoad_0cb698() {
+  uint arg_1 = 1u;
+  uint arg_2 = 1u;
+  int4 res = arg_0.Load(uint2(arg_1, arg_2));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_0cb698();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_0cb698();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_0cb698();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/0cb698.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/0cb698.wgsl.expected.glsl
new file mode 100644
index 0000000..740326a
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/0cb698.wgsl.expected.glsl
@@ -0,0 +1,81 @@
+SKIP: FAILED
+
+#version 310 es
+
+uniform highp isampler1D arg_0_1;
+void textureLoad_0cb698() {
+  uint arg_1 = 1u;
+  uint arg_2 = 1u;
+  ivec4 res = texelFetch(arg_0_1, int(arg_1), int(arg_2));
+}
+
+vec4 vertex_main() {
+  textureLoad_0cb698();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'isampler1D' : Reserved word. 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+uniform highp isampler1D arg_0_1;
+void textureLoad_0cb698() {
+  uint arg_1 = 1u;
+  uint arg_2 = 1u;
+  ivec4 res = texelFetch(arg_0_1, int(arg_1), int(arg_2));
+}
+
+void fragment_main() {
+  textureLoad_0cb698();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'isampler1D' : Reserved word. 
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+uniform highp isampler1D arg_0_1;
+void textureLoad_0cb698() {
+  uint arg_1 = 1u;
+  uint arg_2 = 1u;
+  ivec4 res = texelFetch(arg_0_1, int(arg_1), int(arg_2));
+}
+
+void compute_main() {
+  textureLoad_0cb698();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'isampler1D' : Reserved word. 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/0cb698.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/0cb698.wgsl.expected.msl
new file mode 100644
index 0000000..b2bd1b9
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/0cb698.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_0cb698(texture1d<int, access::sample> tint_symbol_1) {
+  uint arg_1 = 1u;
+  uint arg_2 = 1u;
+  int4 res = tint_symbol_1.read(uint(arg_1), 0);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<int, access::sample> tint_symbol_2) {
+  textureLoad_0cb698(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<int, access::sample> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<int, access::sample> tint_symbol_4 [[texture(0)]]) {
+  textureLoad_0cb698(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture1d<int, access::sample> tint_symbol_5 [[texture(0)]]) {
+  textureLoad_0cb698(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/0cb698.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/0cb698.wgsl.expected.spvasm
new file mode 100644
index 0000000..d824044
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/0cb698.wgsl.expected.spvasm
@@ -0,0 +1,87 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 45
+; Schema: 0
+               OpCapability Shader
+               OpCapability Sampled1D
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureLoad_0cb698 "textureLoad_0cb698"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 1D 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %21 = OpConstantNull %uint
+      %v4int = OpTypeVector %int 4
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+         %30 = OpConstantNull %v4int
+         %31 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_0cb698 = OpFunction %void None %13
+         %16 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_uint Function %21
+      %arg_2 = OpVariable %_ptr_Function_uint Function %21
+        %res = OpVariable %_ptr_Function_v4int Function %30
+               OpStore %arg_1 %uint_1
+               OpStore %arg_2 %uint_1
+         %25 = OpLoad %11 %arg_0
+         %26 = OpLoad %uint %arg_1
+         %27 = OpLoad %uint %arg_2
+         %23 = OpImageFetch %v4int %25 %26 Lod %27
+               OpStore %res %23
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %31
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %textureLoad_0cb698
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %36 = OpLabel
+         %37 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %37
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %textureLoad_0cb698
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %43 = OpLabel
+         %44 = OpFunctionCall %void %textureLoad_0cb698
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/0cb698.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/0cb698.wgsl.expected.wgsl
new file mode 100644
index 0000000..97cffac
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/0cb698.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(0) var arg_0 : texture_1d<i32>;
+
+fn textureLoad_0cb698() {
+  var arg_1 = 1u;
+  var arg_2 = 1u;
+  var res : vec4<i32> = textureLoad(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_0cb698();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_0cb698();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_0cb698();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/1bfdfb.wgsl b/test/tint/builtins/gen/var/textureLoad/1bfdfb.wgsl
new file mode 100644
index 0000000..13db23e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/1bfdfb.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_external;
+
+// fn textureLoad(texture: texture_external, coords: vec2<u32>) -> vec4<f32>
+fn textureLoad_1bfdfb() {
+  var arg_1 = vec2<u32>();
+  var res: vec4<f32> = textureLoad(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_1bfdfb();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_1bfdfb();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_1bfdfb();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/1bfdfb.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/1bfdfb.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..814c344
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/1bfdfb.wgsl.expected.dxc.hlsl
@@ -0,0 +1,112 @@
+struct GammaTransferParams {
+  float G;
+  float A;
+  float B;
+  float C;
+  float D;
+  float E;
+  float F;
+  uint padding;
+};
+struct ExternalTextureParams {
+  uint numPlanes;
+  uint doYuvToRgbConversionOnly;
+  float3x4 yuvToRgbConversionMatrix;
+  GammaTransferParams gammaDecodeParams;
+  GammaTransferParams gammaEncodeParams;
+  float3x3 gamutConversionMatrix;
+};
+
+Texture2D<float4> ext_tex_plane_1 : register(t1, space1);
+cbuffer cbuffer_ext_tex_params : register(b2, space1) {
+  uint4 ext_tex_params[11];
+};
+Texture2D<float4> arg_0 : register(t0, space1);
+
+float3 gammaCorrection(float3 v, GammaTransferParams params) {
+  const bool3 cond = (abs(v) < float3((params.D).xxx));
+  const float3 t = (sign(v) * ((params.C * abs(v)) + params.F));
+  const float3 f = (sign(v) * (pow(((params.A * abs(v)) + params.B), float3((params.G).xxx)) + params.E));
+  return (cond ? t : f);
+}
+
+float4 textureLoadExternal(Texture2D<float4> plane0, Texture2D<float4> plane1, uint2 coord, ExternalTextureParams params) {
+  float3 color = float3(0.0f, 0.0f, 0.0f);
+  if ((params.numPlanes == 1u)) {
+    color = plane0.Load(uint3(coord, 0u)).rgb;
+  } else {
+    color = mul(params.yuvToRgbConversionMatrix, float4(plane0.Load(uint3(coord, 0u)).r, plane1.Load(uint3(coord, 0u)).rg, 1.0f));
+  }
+  if ((params.doYuvToRgbConversionOnly == 0u)) {
+    color = gammaCorrection(color, params.gammaDecodeParams);
+    color = mul(color, params.gamutConversionMatrix);
+    color = gammaCorrection(color, params.gammaEncodeParams);
+  }
+  return float4(color, 1.0f);
+}
+
+float3x4 tint_symbol_3(uint4 buffer[11], uint offset) {
+  const uint scalar_offset = ((offset + 0u)) / 4;
+  const uint scalar_offset_1 = ((offset + 16u)) / 4;
+  const uint scalar_offset_2 = ((offset + 32u)) / 4;
+  return float3x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]), asfloat(buffer[scalar_offset_2 / 4]));
+}
+
+GammaTransferParams tint_symbol_5(uint4 buffer[11], uint offset) {
+  const uint scalar_offset_3 = ((offset + 0u)) / 4;
+  const uint scalar_offset_4 = ((offset + 4u)) / 4;
+  const uint scalar_offset_5 = ((offset + 8u)) / 4;
+  const uint scalar_offset_6 = ((offset + 12u)) / 4;
+  const uint scalar_offset_7 = ((offset + 16u)) / 4;
+  const uint scalar_offset_8 = ((offset + 20u)) / 4;
+  const uint scalar_offset_9 = ((offset + 24u)) / 4;
+  const uint scalar_offset_10 = ((offset + 28u)) / 4;
+  const GammaTransferParams tint_symbol_9 = {asfloat(buffer[scalar_offset_3 / 4][scalar_offset_3 % 4]), asfloat(buffer[scalar_offset_4 / 4][scalar_offset_4 % 4]), asfloat(buffer[scalar_offset_5 / 4][scalar_offset_5 % 4]), asfloat(buffer[scalar_offset_6 / 4][scalar_offset_6 % 4]), asfloat(buffer[scalar_offset_7 / 4][scalar_offset_7 % 4]), asfloat(buffer[scalar_offset_8 / 4][scalar_offset_8 % 4]), asfloat(buffer[scalar_offset_9 / 4][scalar_offset_9 % 4]), buffer[scalar_offset_10 / 4][scalar_offset_10 % 4]};
+  return tint_symbol_9;
+}
+
+float3x3 tint_symbol_7(uint4 buffer[11], uint offset) {
+  const uint scalar_offset_11 = ((offset + 0u)) / 4;
+  const uint scalar_offset_12 = ((offset + 16u)) / 4;
+  const uint scalar_offset_13 = ((offset + 32u)) / 4;
+  return float3x3(asfloat(buffer[scalar_offset_11 / 4].xyz), asfloat(buffer[scalar_offset_12 / 4].xyz), asfloat(buffer[scalar_offset_13 / 4].xyz));
+}
+
+ExternalTextureParams tint_symbol_1(uint4 buffer[11], uint offset) {
+  const uint scalar_offset_14 = ((offset + 0u)) / 4;
+  const uint scalar_offset_15 = ((offset + 4u)) / 4;
+  const ExternalTextureParams tint_symbol_10 = {buffer[scalar_offset_14 / 4][scalar_offset_14 % 4], buffer[scalar_offset_15 / 4][scalar_offset_15 % 4], tint_symbol_3(buffer, (offset + 16u)), tint_symbol_5(buffer, (offset + 64u)), tint_symbol_5(buffer, (offset + 96u)), tint_symbol_7(buffer, (offset + 128u))};
+  return tint_symbol_10;
+}
+
+void textureLoad_1bfdfb() {
+  uint2 arg_1 = (0u).xx;
+  float4 res = textureLoadExternal(arg_0, ext_tex_plane_1, arg_1, tint_symbol_1(ext_tex_params, 0u));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_1bfdfb();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_1bfdfb();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_1bfdfb();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/1bfdfb.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/1bfdfb.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..814c344
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/1bfdfb.wgsl.expected.fxc.hlsl
@@ -0,0 +1,112 @@
+struct GammaTransferParams {
+  float G;
+  float A;
+  float B;
+  float C;
+  float D;
+  float E;
+  float F;
+  uint padding;
+};
+struct ExternalTextureParams {
+  uint numPlanes;
+  uint doYuvToRgbConversionOnly;
+  float3x4 yuvToRgbConversionMatrix;
+  GammaTransferParams gammaDecodeParams;
+  GammaTransferParams gammaEncodeParams;
+  float3x3 gamutConversionMatrix;
+};
+
+Texture2D<float4> ext_tex_plane_1 : register(t1, space1);
+cbuffer cbuffer_ext_tex_params : register(b2, space1) {
+  uint4 ext_tex_params[11];
+};
+Texture2D<float4> arg_0 : register(t0, space1);
+
+float3 gammaCorrection(float3 v, GammaTransferParams params) {
+  const bool3 cond = (abs(v) < float3((params.D).xxx));
+  const float3 t = (sign(v) * ((params.C * abs(v)) + params.F));
+  const float3 f = (sign(v) * (pow(((params.A * abs(v)) + params.B), float3((params.G).xxx)) + params.E));
+  return (cond ? t : f);
+}
+
+float4 textureLoadExternal(Texture2D<float4> plane0, Texture2D<float4> plane1, uint2 coord, ExternalTextureParams params) {
+  float3 color = float3(0.0f, 0.0f, 0.0f);
+  if ((params.numPlanes == 1u)) {
+    color = plane0.Load(uint3(coord, 0u)).rgb;
+  } else {
+    color = mul(params.yuvToRgbConversionMatrix, float4(plane0.Load(uint3(coord, 0u)).r, plane1.Load(uint3(coord, 0u)).rg, 1.0f));
+  }
+  if ((params.doYuvToRgbConversionOnly == 0u)) {
+    color = gammaCorrection(color, params.gammaDecodeParams);
+    color = mul(color, params.gamutConversionMatrix);
+    color = gammaCorrection(color, params.gammaEncodeParams);
+  }
+  return float4(color, 1.0f);
+}
+
+float3x4 tint_symbol_3(uint4 buffer[11], uint offset) {
+  const uint scalar_offset = ((offset + 0u)) / 4;
+  const uint scalar_offset_1 = ((offset + 16u)) / 4;
+  const uint scalar_offset_2 = ((offset + 32u)) / 4;
+  return float3x4(asfloat(buffer[scalar_offset / 4]), asfloat(buffer[scalar_offset_1 / 4]), asfloat(buffer[scalar_offset_2 / 4]));
+}
+
+GammaTransferParams tint_symbol_5(uint4 buffer[11], uint offset) {
+  const uint scalar_offset_3 = ((offset + 0u)) / 4;
+  const uint scalar_offset_4 = ((offset + 4u)) / 4;
+  const uint scalar_offset_5 = ((offset + 8u)) / 4;
+  const uint scalar_offset_6 = ((offset + 12u)) / 4;
+  const uint scalar_offset_7 = ((offset + 16u)) / 4;
+  const uint scalar_offset_8 = ((offset + 20u)) / 4;
+  const uint scalar_offset_9 = ((offset + 24u)) / 4;
+  const uint scalar_offset_10 = ((offset + 28u)) / 4;
+  const GammaTransferParams tint_symbol_9 = {asfloat(buffer[scalar_offset_3 / 4][scalar_offset_3 % 4]), asfloat(buffer[scalar_offset_4 / 4][scalar_offset_4 % 4]), asfloat(buffer[scalar_offset_5 / 4][scalar_offset_5 % 4]), asfloat(buffer[scalar_offset_6 / 4][scalar_offset_6 % 4]), asfloat(buffer[scalar_offset_7 / 4][scalar_offset_7 % 4]), asfloat(buffer[scalar_offset_8 / 4][scalar_offset_8 % 4]), asfloat(buffer[scalar_offset_9 / 4][scalar_offset_9 % 4]), buffer[scalar_offset_10 / 4][scalar_offset_10 % 4]};
+  return tint_symbol_9;
+}
+
+float3x3 tint_symbol_7(uint4 buffer[11], uint offset) {
+  const uint scalar_offset_11 = ((offset + 0u)) / 4;
+  const uint scalar_offset_12 = ((offset + 16u)) / 4;
+  const uint scalar_offset_13 = ((offset + 32u)) / 4;
+  return float3x3(asfloat(buffer[scalar_offset_11 / 4].xyz), asfloat(buffer[scalar_offset_12 / 4].xyz), asfloat(buffer[scalar_offset_13 / 4].xyz));
+}
+
+ExternalTextureParams tint_symbol_1(uint4 buffer[11], uint offset) {
+  const uint scalar_offset_14 = ((offset + 0u)) / 4;
+  const uint scalar_offset_15 = ((offset + 4u)) / 4;
+  const ExternalTextureParams tint_symbol_10 = {buffer[scalar_offset_14 / 4][scalar_offset_14 % 4], buffer[scalar_offset_15 / 4][scalar_offset_15 % 4], tint_symbol_3(buffer, (offset + 16u)), tint_symbol_5(buffer, (offset + 64u)), tint_symbol_5(buffer, (offset + 96u)), tint_symbol_7(buffer, (offset + 128u))};
+  return tint_symbol_10;
+}
+
+void textureLoad_1bfdfb() {
+  uint2 arg_1 = (0u).xx;
+  float4 res = textureLoadExternal(arg_0, ext_tex_plane_1, arg_1, tint_symbol_1(ext_tex_params, 0u));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_1bfdfb();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_1bfdfb();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_1bfdfb();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/1bfdfb.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/1bfdfb.wgsl.expected.glsl
new file mode 100644
index 0000000..57b88a2
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/1bfdfb.wgsl.expected.glsl
@@ -0,0 +1,196 @@
+#version 310 es
+
+struct GammaTransferParams {
+  float G;
+  float A;
+  float B;
+  float C;
+  float D;
+  float E;
+  float F;
+  uint padding;
+};
+
+struct ExternalTextureParams {
+  uint numPlanes;
+  uint doYuvToRgbConversionOnly;
+  mat3x4 yuvToRgbConversionMatrix;
+  GammaTransferParams gammaDecodeParams;
+  GammaTransferParams gammaEncodeParams;
+  mat3 gamutConversionMatrix;
+};
+
+layout(binding = 2, std140) uniform ext_tex_params_block_ubo {
+  ExternalTextureParams inner;
+} ext_tex_params;
+
+vec3 gammaCorrection(vec3 v, GammaTransferParams params) {
+  bvec3 cond = lessThan(abs(v), vec3(params.D));
+  vec3 t = (sign(v) * ((params.C * abs(v)) + params.F));
+  vec3 f = (sign(v) * (pow(((params.A * abs(v)) + params.B), vec3(params.G)) + params.E));
+  return mix(f, t, cond);
+}
+
+vec4 textureLoadExternal(highp sampler2D plane0_1, highp sampler2D plane1_1, uvec2 coord, ExternalTextureParams params) {
+  vec3 color = vec3(0.0f, 0.0f, 0.0f);
+  if ((params.numPlanes == 1u)) {
+    color = texelFetch(plane0_1, ivec2(coord), int(0u)).rgb;
+  } else {
+    color = (vec4(texelFetch(plane0_1, ivec2(coord), int(0u)).r, texelFetch(plane1_1, ivec2(coord), int(0u)).rg, 1.0f) * params.yuvToRgbConversionMatrix);
+  }
+  if ((params.doYuvToRgbConversionOnly == 0u)) {
+    color = gammaCorrection(color, params.gammaDecodeParams);
+    color = (params.gamutConversionMatrix * color);
+    color = gammaCorrection(color, params.gammaEncodeParams);
+  }
+  return vec4(color, 1.0f);
+}
+
+uniform highp sampler2D arg_0_1;
+uniform highp sampler2D ext_tex_plane_1_1;
+void textureLoad_1bfdfb() {
+  uvec2 arg_1 = uvec2(0u);
+  vec4 res = textureLoadExternal(arg_0_1, ext_tex_plane_1_1, arg_1, ext_tex_params.inner);
+}
+
+vec4 vertex_main() {
+  textureLoad_1bfdfb();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+struct GammaTransferParams {
+  float G;
+  float A;
+  float B;
+  float C;
+  float D;
+  float E;
+  float F;
+  uint padding;
+};
+
+struct ExternalTextureParams {
+  uint numPlanes;
+  uint doYuvToRgbConversionOnly;
+  mat3x4 yuvToRgbConversionMatrix;
+  GammaTransferParams gammaDecodeParams;
+  GammaTransferParams gammaEncodeParams;
+  mat3 gamutConversionMatrix;
+};
+
+layout(binding = 2, std140) uniform ext_tex_params_block_ubo {
+  ExternalTextureParams inner;
+} ext_tex_params;
+
+vec3 gammaCorrection(vec3 v, GammaTransferParams params) {
+  bvec3 cond = lessThan(abs(v), vec3(params.D));
+  vec3 t = (sign(v) * ((params.C * abs(v)) + params.F));
+  vec3 f = (sign(v) * (pow(((params.A * abs(v)) + params.B), vec3(params.G)) + params.E));
+  return mix(f, t, cond);
+}
+
+vec4 textureLoadExternal(highp sampler2D plane0_1, highp sampler2D plane1_1, uvec2 coord, ExternalTextureParams params) {
+  vec3 color = vec3(0.0f, 0.0f, 0.0f);
+  if ((params.numPlanes == 1u)) {
+    color = texelFetch(plane0_1, ivec2(coord), int(0u)).rgb;
+  } else {
+    color = (vec4(texelFetch(plane0_1, ivec2(coord), int(0u)).r, texelFetch(plane1_1, ivec2(coord), int(0u)).rg, 1.0f) * params.yuvToRgbConversionMatrix);
+  }
+  if ((params.doYuvToRgbConversionOnly == 0u)) {
+    color = gammaCorrection(color, params.gammaDecodeParams);
+    color = (params.gamutConversionMatrix * color);
+    color = gammaCorrection(color, params.gammaEncodeParams);
+  }
+  return vec4(color, 1.0f);
+}
+
+uniform highp sampler2D arg_0_1;
+uniform highp sampler2D ext_tex_plane_1_1;
+void textureLoad_1bfdfb() {
+  uvec2 arg_1 = uvec2(0u);
+  vec4 res = textureLoadExternal(arg_0_1, ext_tex_plane_1_1, arg_1, ext_tex_params.inner);
+}
+
+void fragment_main() {
+  textureLoad_1bfdfb();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+struct GammaTransferParams {
+  float G;
+  float A;
+  float B;
+  float C;
+  float D;
+  float E;
+  float F;
+  uint padding;
+};
+
+struct ExternalTextureParams {
+  uint numPlanes;
+  uint doYuvToRgbConversionOnly;
+  mat3x4 yuvToRgbConversionMatrix;
+  GammaTransferParams gammaDecodeParams;
+  GammaTransferParams gammaEncodeParams;
+  mat3 gamutConversionMatrix;
+};
+
+layout(binding = 2, std140) uniform ext_tex_params_block_ubo {
+  ExternalTextureParams inner;
+} ext_tex_params;
+
+vec3 gammaCorrection(vec3 v, GammaTransferParams params) {
+  bvec3 cond = lessThan(abs(v), vec3(params.D));
+  vec3 t = (sign(v) * ((params.C * abs(v)) + params.F));
+  vec3 f = (sign(v) * (pow(((params.A * abs(v)) + params.B), vec3(params.G)) + params.E));
+  return mix(f, t, cond);
+}
+
+vec4 textureLoadExternal(highp sampler2D plane0_1, highp sampler2D plane1_1, uvec2 coord, ExternalTextureParams params) {
+  vec3 color = vec3(0.0f, 0.0f, 0.0f);
+  if ((params.numPlanes == 1u)) {
+    color = texelFetch(plane0_1, ivec2(coord), int(0u)).rgb;
+  } else {
+    color = (vec4(texelFetch(plane0_1, ivec2(coord), int(0u)).r, texelFetch(plane1_1, ivec2(coord), int(0u)).rg, 1.0f) * params.yuvToRgbConversionMatrix);
+  }
+  if ((params.doYuvToRgbConversionOnly == 0u)) {
+    color = gammaCorrection(color, params.gammaDecodeParams);
+    color = (params.gamutConversionMatrix * color);
+    color = gammaCorrection(color, params.gammaEncodeParams);
+  }
+  return vec4(color, 1.0f);
+}
+
+uniform highp sampler2D arg_0_1;
+uniform highp sampler2D ext_tex_plane_1_1;
+void textureLoad_1bfdfb() {
+  uvec2 arg_1 = uvec2(0u);
+  vec4 res = textureLoadExternal(arg_0_1, ext_tex_plane_1_1, arg_1, ext_tex_params.inner);
+}
+
+void compute_main() {
+  textureLoad_1bfdfb();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/1bfdfb.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/1bfdfb.wgsl.expected.msl
new file mode 100644
index 0000000..7a9334b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/1bfdfb.wgsl.expected.msl
@@ -0,0 +1,90 @@
+#include <metal_stdlib>
+
+using namespace metal;
+
+template<typename T, size_t N>
+struct tint_array {
+    const constant T& operator[](size_t i) const constant { return elements[i]; }
+    device T& operator[](size_t i) device { return elements[i]; }
+    const device T& operator[](size_t i) const device { return elements[i]; }
+    thread T& operator[](size_t i) thread { return elements[i]; }
+    const thread T& operator[](size_t i) const thread { return elements[i]; }
+    threadgroup T& operator[](size_t i) threadgroup { return elements[i]; }
+    const threadgroup T& operator[](size_t i) const threadgroup { return elements[i]; }
+    T elements[N];
+};
+
+struct GammaTransferParams {
+  /* 0x0000 */ float G;
+  /* 0x0004 */ float A;
+  /* 0x0008 */ float B;
+  /* 0x000c */ float C;
+  /* 0x0010 */ float D;
+  /* 0x0014 */ float E;
+  /* 0x0018 */ float F;
+  /* 0x001c */ uint padding;
+};
+
+struct ExternalTextureParams {
+  /* 0x0000 */ uint numPlanes;
+  /* 0x0004 */ uint doYuvToRgbConversionOnly;
+  /* 0x0008 */ tint_array<int8_t, 8> tint_pad;
+  /* 0x0010 */ float3x4 yuvToRgbConversionMatrix;
+  /* 0x0040 */ GammaTransferParams gammaDecodeParams;
+  /* 0x0060 */ GammaTransferParams gammaEncodeParams;
+  /* 0x0080 */ float3x3 gamutConversionMatrix;
+};
+
+float3 gammaCorrection(float3 v, GammaTransferParams params) {
+  bool3 const cond = (fabs(v) < float3(params.D));
+  float3 const t = (sign(v) * ((params.C * fabs(v)) + params.F));
+  float3 const f = (sign(v) * (pow(((params.A * fabs(v)) + params.B), float3(params.G)) + params.E));
+  return select(f, t, cond);
+}
+
+float4 textureLoadExternal(texture2d<float, access::sample> plane0, texture2d<float, access::sample> plane1, uint2 coord, ExternalTextureParams params) {
+  float3 color = 0.0f;
+  if ((params.numPlanes == 1u)) {
+    color = float4(plane0.read(uint2(coord), 0u)).rgb;
+  } else {
+    color = (float4(plane0.read(uint2(coord), 0u)[0], float4(plane1.read(uint2(coord), 0u)).rg, 1.0f) * params.yuvToRgbConversionMatrix);
+  }
+  if ((params.doYuvToRgbConversionOnly == 0u)) {
+    color = gammaCorrection(color, params.gammaDecodeParams);
+    color = (params.gamutConversionMatrix * color);
+    color = gammaCorrection(color, params.gammaEncodeParams);
+  }
+  return float4(color, 1.0f);
+}
+
+void textureLoad_1bfdfb(texture2d<float, access::sample> tint_symbol_1, texture2d<float, access::sample> tint_symbol_2, const constant ExternalTextureParams* const tint_symbol_3) {
+  uint2 arg_1 = uint2(0u);
+  float4 res = textureLoadExternal(tint_symbol_1, tint_symbol_2, arg_1, *(tint_symbol_3));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<float, access::sample> tint_symbol_4, texture2d<float, access::sample> tint_symbol_5, const constant ExternalTextureParams* const tint_symbol_6) {
+  textureLoad_1bfdfb(tint_symbol_4, tint_symbol_5, tint_symbol_6);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<float, access::sample> tint_symbol_7 [[texture(0)]], texture2d<float, access::sample> tint_symbol_8 [[texture(1)]], const constant ExternalTextureParams* tint_symbol_9 [[buffer(2)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_7, tint_symbol_8, tint_symbol_9);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<float, access::sample> tint_symbol_10 [[texture(0)]], texture2d<float, access::sample> tint_symbol_11 [[texture(1)]], const constant ExternalTextureParams* tint_symbol_12 [[buffer(2)]]) {
+  textureLoad_1bfdfb(tint_symbol_10, tint_symbol_11, tint_symbol_12);
+  return;
+}
+
+kernel void compute_main(texture2d<float, access::sample> tint_symbol_13 [[texture(0)]], texture2d<float, access::sample> tint_symbol_14 [[texture(1)]], const constant ExternalTextureParams* tint_symbol_15 [[buffer(2)]]) {
+  textureLoad_1bfdfb(tint_symbol_13, tint_symbol_14, tint_symbol_15);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/1bfdfb.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/1bfdfb.wgsl.expected.spvasm
new file mode 100644
index 0000000..872b502
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/1bfdfb.wgsl.expected.spvasm
@@ -0,0 +1,248 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 139
+; Schema: 0
+               OpCapability Shader
+         %28 = OpExtInstImport "GLSL.std.450"
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %ext_tex_plane_1 "ext_tex_plane_1"
+               OpName %ext_tex_params_block "ext_tex_params_block"
+               OpMemberName %ext_tex_params_block 0 "inner"
+               OpName %ExternalTextureParams "ExternalTextureParams"
+               OpMemberName %ExternalTextureParams 0 "numPlanes"
+               OpMemberName %ExternalTextureParams 1 "doYuvToRgbConversionOnly"
+               OpMemberName %ExternalTextureParams 2 "yuvToRgbConversionMatrix"
+               OpMemberName %ExternalTextureParams 3 "gammaDecodeParams"
+               OpName %GammaTransferParams "GammaTransferParams"
+               OpMemberName %GammaTransferParams 0 "G"
+               OpMemberName %GammaTransferParams 1 "A"
+               OpMemberName %GammaTransferParams 2 "B"
+               OpMemberName %GammaTransferParams 3 "C"
+               OpMemberName %GammaTransferParams 4 "D"
+               OpMemberName %GammaTransferParams 5 "E"
+               OpMemberName %GammaTransferParams 6 "F"
+               OpMemberName %GammaTransferParams 7 "padding"
+               OpMemberName %ExternalTextureParams 4 "gammaEncodeParams"
+               OpMemberName %ExternalTextureParams 5 "gamutConversionMatrix"
+               OpName %ext_tex_params "ext_tex_params"
+               OpName %arg_0 "arg_0"
+               OpName %gammaCorrection "gammaCorrection"
+               OpName %v "v"
+               OpName %params "params"
+               OpName %textureLoadExternal "textureLoadExternal"
+               OpName %plane0 "plane0"
+               OpName %plane1 "plane1"
+               OpName %coord "coord"
+               OpName %params_0 "params"
+               OpName %color "color"
+               OpName %textureLoad_1bfdfb "textureLoad_1bfdfb"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %ext_tex_plane_1 DescriptorSet 1
+               OpDecorate %ext_tex_plane_1 Binding 1
+               OpDecorate %ext_tex_params_block Block
+               OpMemberDecorate %ext_tex_params_block 0 Offset 0
+               OpMemberDecorate %ExternalTextureParams 0 Offset 0
+               OpMemberDecorate %ExternalTextureParams 1 Offset 4
+               OpMemberDecorate %ExternalTextureParams 2 Offset 16
+               OpMemberDecorate %ExternalTextureParams 2 ColMajor
+               OpMemberDecorate %ExternalTextureParams 2 MatrixStride 16
+               OpMemberDecorate %ExternalTextureParams 3 Offset 64
+               OpMemberDecorate %GammaTransferParams 0 Offset 0
+               OpMemberDecorate %GammaTransferParams 1 Offset 4
+               OpMemberDecorate %GammaTransferParams 2 Offset 8
+               OpMemberDecorate %GammaTransferParams 3 Offset 12
+               OpMemberDecorate %GammaTransferParams 4 Offset 16
+               OpMemberDecorate %GammaTransferParams 5 Offset 20
+               OpMemberDecorate %GammaTransferParams 6 Offset 24
+               OpMemberDecorate %GammaTransferParams 7 Offset 28
+               OpMemberDecorate %ExternalTextureParams 4 Offset 96
+               OpMemberDecorate %ExternalTextureParams 5 Offset 128
+               OpMemberDecorate %ExternalTextureParams 5 ColMajor
+               OpMemberDecorate %ExternalTextureParams 5 MatrixStride 16
+               OpDecorate %ext_tex_params NonWritable
+               OpDecorate %ext_tex_params DescriptorSet 1
+               OpDecorate %ext_tex_params Binding 2
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+%ext_tex_plane_1 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %uint = OpTypeInt 32 0
+%mat3v4float = OpTypeMatrix %v4float 3
+%GammaTransferParams = OpTypeStruct %float %float %float %float %float %float %float %uint
+    %v3float = OpTypeVector %float 3
+%mat3v3float = OpTypeMatrix %v3float 3
+%ExternalTextureParams = OpTypeStruct %uint %uint %mat3v4float %GammaTransferParams %GammaTransferParams %mat3v3float
+%ext_tex_params_block = OpTypeStruct %ExternalTextureParams
+%_ptr_Uniform_ext_tex_params_block = OpTypePointer Uniform %ext_tex_params_block
+%ext_tex_params = OpVariable %_ptr_Uniform_ext_tex_params_block Uniform
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+         %22 = OpTypeFunction %v3float %v3float %GammaTransferParams
+       %bool = OpTypeBool
+     %v3bool = OpTypeVector %bool 3
+%_ptr_Function_v3float = OpTypePointer Function %v3float
+         %42 = OpConstantNull %v3float
+     %v2uint = OpTypeVector %uint 2
+         %62 = OpTypeFunction %v4float %11 %11 %v2uint %ExternalTextureParams
+     %uint_1 = OpConstant %uint 1
+         %78 = OpConstantNull %uint
+    %v2float = OpTypeVector %float 2
+    %float_1 = OpConstant %float 1
+       %void = OpTypeVoid
+        %109 = OpTypeFunction %void
+        %113 = OpConstantNull %v2uint
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_Uniform_ExternalTextureParams = OpTypePointer Uniform %ExternalTextureParams
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+        %126 = OpTypeFunction %v4float
+%gammaCorrection = OpFunction %v3float None %22
+          %v = OpFunctionParameter %v3float
+     %params = OpFunctionParameter %GammaTransferParams
+         %26 = OpLabel
+         %40 = OpVariable %_ptr_Function_v3float Function %42
+         %52 = OpVariable %_ptr_Function_v3float Function %42
+         %58 = OpVariable %_ptr_Function_v3float Function %42
+         %27 = OpExtInst %v3float %28 FAbs %v
+         %29 = OpCompositeExtract %float %params 4
+         %30 = OpCompositeConstruct %v3float %29 %29 %29
+         %31 = OpFOrdLessThan %v3bool %27 %30
+         %34 = OpExtInst %v3float %28 FSign %v
+         %35 = OpCompositeExtract %float %params 3
+         %36 = OpExtInst %v3float %28 FAbs %v
+         %37 = OpVectorTimesScalar %v3float %36 %35
+         %38 = OpCompositeExtract %float %params 6
+         %43 = OpCompositeConstruct %v3float %38 %38 %38
+         %39 = OpFAdd %v3float %37 %43
+         %44 = OpFMul %v3float %34 %39
+         %45 = OpExtInst %v3float %28 FSign %v
+         %47 = OpCompositeExtract %float %params 1
+         %48 = OpExtInst %v3float %28 FAbs %v
+         %49 = OpVectorTimesScalar %v3float %48 %47
+         %50 = OpCompositeExtract %float %params 2
+         %53 = OpCompositeConstruct %v3float %50 %50 %50
+         %51 = OpFAdd %v3float %49 %53
+         %54 = OpCompositeExtract %float %params 0
+         %55 = OpCompositeConstruct %v3float %54 %54 %54
+         %46 = OpExtInst %v3float %28 Pow %51 %55
+         %56 = OpCompositeExtract %float %params 5
+         %59 = OpCompositeConstruct %v3float %56 %56 %56
+         %57 = OpFAdd %v3float %46 %59
+         %60 = OpFMul %v3float %45 %57
+         %61 = OpSelect %v3float %31 %44 %60
+               OpReturnValue %61
+               OpFunctionEnd
+%textureLoadExternal = OpFunction %v4float None %62
+     %plane0 = OpFunctionParameter %11
+     %plane1 = OpFunctionParameter %11
+      %coord = OpFunctionParameter %v2uint
+   %params_0 = OpFunctionParameter %ExternalTextureParams
+         %69 = OpLabel
+      %color = OpVariable %_ptr_Function_v3float Function %42
+         %71 = OpCompositeExtract %uint %params_0 0
+         %73 = OpIEqual %bool %71 %uint_1
+               OpSelectionMerge %74 None
+               OpBranchConditional %73 %75 %76
+         %75 = OpLabel
+         %77 = OpImageFetch %v4float %plane0 %coord Lod %78
+         %79 = OpVectorShuffle %v3float %77 %77 0 1 2
+               OpStore %color %79
+               OpBranch %74
+         %76 = OpLabel
+         %80 = OpImageFetch %v4float %plane0 %coord Lod %78
+         %81 = OpCompositeExtract %float %80 0
+         %82 = OpImageFetch %v4float %plane1 %coord Lod %78
+         %84 = OpVectorShuffle %v2float %82 %82 0 1
+         %85 = OpCompositeExtract %float %84 0
+         %86 = OpCompositeExtract %float %84 1
+         %88 = OpCompositeConstruct %v4float %81 %85 %86 %float_1
+         %89 = OpCompositeExtract %mat3v4float %params_0 2
+         %90 = OpVectorTimesMatrix %v3float %88 %89
+               OpStore %color %90
+               OpBranch %74
+         %74 = OpLabel
+         %91 = OpCompositeExtract %uint %params_0 1
+         %92 = OpIEqual %bool %91 %78
+               OpSelectionMerge %93 None
+               OpBranchConditional %92 %94 %93
+         %94 = OpLabel
+         %96 = OpLoad %v3float %color
+         %97 = OpCompositeExtract %GammaTransferParams %params_0 3
+         %95 = OpFunctionCall %v3float %gammaCorrection %96 %97
+               OpStore %color %95
+         %98 = OpCompositeExtract %mat3v3float %params_0 5
+         %99 = OpLoad %v3float %color
+        %100 = OpMatrixTimesVector %v3float %98 %99
+               OpStore %color %100
+        %102 = OpLoad %v3float %color
+        %103 = OpCompositeExtract %GammaTransferParams %params_0 4
+        %101 = OpFunctionCall %v3float %gammaCorrection %102 %103
+               OpStore %color %101
+               OpBranch %93
+         %93 = OpLabel
+        %104 = OpLoad %v3float %color
+        %105 = OpCompositeExtract %float %104 0
+        %106 = OpCompositeExtract %float %104 1
+        %107 = OpCompositeExtract %float %104 2
+        %108 = OpCompositeConstruct %v4float %105 %106 %107 %float_1
+               OpReturnValue %108
+               OpFunctionEnd
+%textureLoad_1bfdfb = OpFunction %void None %109
+        %112 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v2uint Function %113
+        %res = OpVariable %_ptr_Function_v4float Function %5
+               OpStore %arg_1 %113
+        %117 = OpLoad %11 %arg_0
+        %118 = OpLoad %11 %ext_tex_plane_1
+        %119 = OpLoad %v2uint %arg_1
+        %122 = OpAccessChain %_ptr_Uniform_ExternalTextureParams %ext_tex_params %uint_0
+        %123 = OpLoad %ExternalTextureParams %122
+        %116 = OpFunctionCall %v4float %textureLoadExternal %117 %118 %119 %123
+               OpStore %res %116
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %126
+        %128 = OpLabel
+        %129 = OpFunctionCall %void %textureLoad_1bfdfb
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %109
+        %131 = OpLabel
+        %132 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %132
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %109
+        %134 = OpLabel
+        %135 = OpFunctionCall %void %textureLoad_1bfdfb
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %109
+        %137 = OpLabel
+        %138 = OpFunctionCall %void %textureLoad_1bfdfb
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/1bfdfb.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/1bfdfb.wgsl.expected.wgsl
new file mode 100644
index 0000000..52a6fc3
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/1bfdfb.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+@group(1) @binding(0) var arg_0 : texture_external;
+
+fn textureLoad_1bfdfb() {
+  var arg_1 = vec2<u32>();
+  var res : vec4<f32> = textureLoad(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_1bfdfb();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_1bfdfb();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_1bfdfb();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/1c562a.wgsl b/test/tint/builtins/gen/var/textureLoad/1c562a.wgsl
new file mode 100644
index 0000000..edd5e4d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/1c562a.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_3d<u32>;
+
+// fn textureLoad(texture: texture_3d<u32>, coords: vec3<u32>, level: u32) -> vec4<u32>
+fn textureLoad_1c562a() {
+  var arg_1 = vec3<u32>();
+  var arg_2 = 1u;
+  var res: vec4<u32> = textureLoad(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_1c562a();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_1c562a();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_1c562a();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/1c562a.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/1c562a.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..0bb5f34
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/1c562a.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture3D<uint4> arg_0 : register(t0, space1);
+
+void textureLoad_1c562a() {
+  uint3 arg_1 = (0u).xxx;
+  uint arg_2 = 1u;
+  uint4 res = arg_0.Load(uint4(arg_1, arg_2));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_1c562a();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_1c562a();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_1c562a();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/1c562a.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/1c562a.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..0bb5f34
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/1c562a.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture3D<uint4> arg_0 : register(t0, space1);
+
+void textureLoad_1c562a() {
+  uint3 arg_1 = (0u).xxx;
+  uint arg_2 = 1u;
+  uint4 res = arg_0.Load(uint4(arg_1, arg_2));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_1c562a();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_1c562a();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_1c562a();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/1c562a.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/1c562a.wgsl.expected.glsl
new file mode 100644
index 0000000..846f8f5
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/1c562a.wgsl.expected.glsl
@@ -0,0 +1,58 @@
+#version 310 es
+
+uniform highp usampler3D arg_0_1;
+void textureLoad_1c562a() {
+  uvec3 arg_1 = uvec3(0u);
+  uint arg_2 = 1u;
+  uvec4 res = texelFetch(arg_0_1, ivec3(arg_1), int(arg_2));
+}
+
+vec4 vertex_main() {
+  textureLoad_1c562a();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp usampler3D arg_0_1;
+void textureLoad_1c562a() {
+  uvec3 arg_1 = uvec3(0u);
+  uint arg_2 = 1u;
+  uvec4 res = texelFetch(arg_0_1, ivec3(arg_1), int(arg_2));
+}
+
+void fragment_main() {
+  textureLoad_1c562a();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp usampler3D arg_0_1;
+void textureLoad_1c562a() {
+  uvec3 arg_1 = uvec3(0u);
+  uint arg_2 = 1u;
+  uvec4 res = texelFetch(arg_0_1, ivec3(arg_1), int(arg_2));
+}
+
+void compute_main() {
+  textureLoad_1c562a();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/1c562a.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/1c562a.wgsl.expected.msl
new file mode 100644
index 0000000..a8cffe5
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/1c562a.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_1c562a(texture3d<uint, access::sample> tint_symbol_1) {
+  uint3 arg_1 = uint3(0u);
+  uint arg_2 = 1u;
+  uint4 res = tint_symbol_1.read(uint3(arg_1), arg_2);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<uint, access::sample> tint_symbol_2) {
+  textureLoad_1c562a(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<uint, access::sample> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture3d<uint, access::sample> tint_symbol_4 [[texture(0)]]) {
+  textureLoad_1c562a(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture3d<uint, access::sample> tint_symbol_5 [[texture(0)]]) {
+  textureLoad_1c562a(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/1c562a.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/1c562a.wgsl.expected.spvasm
new file mode 100644
index 0000000..ee1302d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/1c562a.wgsl.expected.spvasm
@@ -0,0 +1,88 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 47
+; 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 %textureLoad_1c562a "textureLoad_1c562a"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 3D 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+     %v3uint = OpTypeVector %uint 3
+         %18 = OpConstantNull %v3uint
+%_ptr_Function_v3uint = OpTypePointer Function %v3uint
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %24 = OpConstantNull %uint
+     %v4uint = OpTypeVector %uint 4
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+         %32 = OpConstantNull %v4uint
+         %33 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_1c562a = OpFunction %void None %13
+         %16 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v3uint Function %18
+      %arg_2 = OpVariable %_ptr_Function_uint Function %24
+        %res = OpVariable %_ptr_Function_v4uint Function %32
+               OpStore %arg_1 %18
+               OpStore %arg_2 %uint_1
+         %27 = OpLoad %11 %arg_0
+         %28 = OpLoad %v3uint %arg_1
+         %29 = OpLoad %uint %arg_2
+         %25 = OpImageFetch %v4uint %27 %28 Lod %29
+               OpStore %res %25
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %33
+         %35 = OpLabel
+         %36 = OpFunctionCall %void %textureLoad_1c562a
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %38 = OpLabel
+         %39 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %39
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %42 = OpLabel
+         %43 = OpFunctionCall %void %textureLoad_1c562a
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %45 = OpLabel
+         %46 = OpFunctionCall %void %textureLoad_1c562a
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/1c562a.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/1c562a.wgsl.expected.wgsl
new file mode 100644
index 0000000..6f9672a
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/1c562a.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(0) var arg_0 : texture_3d<u32>;
+
+fn textureLoad_1c562a() {
+  var arg_1 = vec3<u32>();
+  var arg_2 = 1u;
+  var res : vec4<u32> = textureLoad(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_1c562a();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_1c562a();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_1c562a();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/21d1c4.wgsl b/test/tint/builtins/gen/var/textureLoad/21d1c4.wgsl
new file mode 100644
index 0000000..39593e8
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/21d1c4.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_3d<f32>;
+
+// fn textureLoad(texture: texture_3d<f32>, coords: vec3<u32>, level: u32) -> vec4<f32>
+fn textureLoad_21d1c4() {
+  var arg_1 = vec3<u32>();
+  var arg_2 = 1u;
+  var res: vec4<f32> = textureLoad(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_21d1c4();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_21d1c4();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_21d1c4();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/21d1c4.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/21d1c4.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..28c9d44
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/21d1c4.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture3D<float4> arg_0 : register(t0, space1);
+
+void textureLoad_21d1c4() {
+  uint3 arg_1 = (0u).xxx;
+  uint arg_2 = 1u;
+  float4 res = arg_0.Load(uint4(arg_1, arg_2));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_21d1c4();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_21d1c4();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_21d1c4();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/21d1c4.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/21d1c4.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..28c9d44
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/21d1c4.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture3D<float4> arg_0 : register(t0, space1);
+
+void textureLoad_21d1c4() {
+  uint3 arg_1 = (0u).xxx;
+  uint arg_2 = 1u;
+  float4 res = arg_0.Load(uint4(arg_1, arg_2));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_21d1c4();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_21d1c4();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_21d1c4();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/21d1c4.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/21d1c4.wgsl.expected.glsl
new file mode 100644
index 0000000..addbf63
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/21d1c4.wgsl.expected.glsl
@@ -0,0 +1,58 @@
+#version 310 es
+
+uniform highp sampler3D arg_0_1;
+void textureLoad_21d1c4() {
+  uvec3 arg_1 = uvec3(0u);
+  uint arg_2 = 1u;
+  vec4 res = texelFetch(arg_0_1, ivec3(arg_1), int(arg_2));
+}
+
+vec4 vertex_main() {
+  textureLoad_21d1c4();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp sampler3D arg_0_1;
+void textureLoad_21d1c4() {
+  uvec3 arg_1 = uvec3(0u);
+  uint arg_2 = 1u;
+  vec4 res = texelFetch(arg_0_1, ivec3(arg_1), int(arg_2));
+}
+
+void fragment_main() {
+  textureLoad_21d1c4();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp sampler3D arg_0_1;
+void textureLoad_21d1c4() {
+  uvec3 arg_1 = uvec3(0u);
+  uint arg_2 = 1u;
+  vec4 res = texelFetch(arg_0_1, ivec3(arg_1), int(arg_2));
+}
+
+void compute_main() {
+  textureLoad_21d1c4();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/21d1c4.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/21d1c4.wgsl.expected.msl
new file mode 100644
index 0000000..c3441bf
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/21d1c4.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_21d1c4(texture3d<float, access::sample> tint_symbol_1) {
+  uint3 arg_1 = uint3(0u);
+  uint arg_2 = 1u;
+  float4 res = tint_symbol_1.read(uint3(arg_1), arg_2);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<float, access::sample> tint_symbol_2) {
+  textureLoad_21d1c4(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<float, access::sample> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture3d<float, access::sample> tint_symbol_4 [[texture(0)]]) {
+  textureLoad_21d1c4(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture3d<float, access::sample> tint_symbol_5 [[texture(0)]]) {
+  textureLoad_21d1c4(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/21d1c4.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/21d1c4.wgsl.expected.spvasm
new file mode 100644
index 0000000..6d18184
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/21d1c4.wgsl.expected.spvasm
@@ -0,0 +1,86 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 45
+; 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 %textureLoad_21d1c4 "textureLoad_21d1c4"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 3D 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %12 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v3uint = OpTypeVector %uint 3
+         %18 = OpConstantNull %v3uint
+%_ptr_Function_v3uint = OpTypePointer Function %v3uint
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %24 = OpConstantNull %uint
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+         %31 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_21d1c4 = OpFunction %void None %12
+         %15 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v3uint Function %18
+      %arg_2 = OpVariable %_ptr_Function_uint Function %24
+        %res = OpVariable %_ptr_Function_v4float Function %5
+               OpStore %arg_1 %18
+               OpStore %arg_2 %uint_1
+         %26 = OpLoad %11 %arg_0
+         %27 = OpLoad %v3uint %arg_1
+         %28 = OpLoad %uint %arg_2
+         %25 = OpImageFetch %v4float %26 %27 Lod %28
+               OpStore %res %25
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %31
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %textureLoad_21d1c4
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+         %36 = OpLabel
+         %37 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %37
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %textureLoad_21d1c4
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %12
+         %43 = OpLabel
+         %44 = OpFunctionCall %void %textureLoad_21d1c4
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/21d1c4.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/21d1c4.wgsl.expected.wgsl
new file mode 100644
index 0000000..f363fde
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/21d1c4.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(0) var arg_0 : texture_3d<f32>;
+
+fn textureLoad_21d1c4() {
+  var arg_1 = vec3<u32>();
+  var arg_2 = 1u;
+  var res : vec4<f32> = textureLoad(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_21d1c4();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_21d1c4();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_21d1c4();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/2e09aa.wgsl b/test/tint/builtins/gen/var/textureLoad/2e09aa.wgsl
new file mode 100644
index 0000000..9a79fe2
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/2e09aa.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_multisampled_2d<f32>;
+
+// fn textureLoad(texture: texture_multisampled_2d<f32>, coords: vec2<u32>, sample_index: u32) -> vec4<f32>
+fn textureLoad_2e09aa() {
+  var arg_1 = vec2<u32>();
+  var arg_2 = 1u;
+  var res: vec4<f32> = textureLoad(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_2e09aa();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_2e09aa();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_2e09aa();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/2e09aa.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/2e09aa.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..0219fc6
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/2e09aa.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DMS<float4> arg_0 : register(t0, space1);
+
+void textureLoad_2e09aa() {
+  uint2 arg_1 = (0u).xx;
+  uint arg_2 = 1u;
+  float4 res = arg_0.Load(arg_1, arg_2);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_2e09aa();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_2e09aa();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_2e09aa();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/2e09aa.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/2e09aa.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..0219fc6
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/2e09aa.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DMS<float4> arg_0 : register(t0, space1);
+
+void textureLoad_2e09aa() {
+  uint2 arg_1 = (0u).xx;
+  uint arg_2 = 1u;
+  float4 res = arg_0.Load(arg_1, arg_2);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_2e09aa();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_2e09aa();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_2e09aa();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/2e09aa.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/2e09aa.wgsl.expected.glsl
new file mode 100644
index 0000000..e6b2a00
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/2e09aa.wgsl.expected.glsl
@@ -0,0 +1,58 @@
+#version 310 es
+
+uniform highp sampler2DMS arg_0_1;
+void textureLoad_2e09aa() {
+  uvec2 arg_1 = uvec2(0u);
+  uint arg_2 = 1u;
+  vec4 res = texelFetch(arg_0_1, ivec2(arg_1), int(arg_2));
+}
+
+vec4 vertex_main() {
+  textureLoad_2e09aa();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2DMS arg_0_1;
+void textureLoad_2e09aa() {
+  uvec2 arg_1 = uvec2(0u);
+  uint arg_2 = 1u;
+  vec4 res = texelFetch(arg_0_1, ivec2(arg_1), int(arg_2));
+}
+
+void fragment_main() {
+  textureLoad_2e09aa();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp sampler2DMS arg_0_1;
+void textureLoad_2e09aa() {
+  uvec2 arg_1 = uvec2(0u);
+  uint arg_2 = 1u;
+  vec4 res = texelFetch(arg_0_1, ivec2(arg_1), int(arg_2));
+}
+
+void compute_main() {
+  textureLoad_2e09aa();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/2e09aa.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/2e09aa.wgsl.expected.msl
new file mode 100644
index 0000000..f1ec214
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/2e09aa.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_2e09aa(texture2d_ms<float, access::read> tint_symbol_1) {
+  uint2 arg_1 = uint2(0u);
+  uint arg_2 = 1u;
+  float4 res = tint_symbol_1.read(uint2(arg_1), arg_2);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_ms<float, access::read> tint_symbol_2) {
+  textureLoad_2e09aa(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_ms<float, access::read> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_ms<float, access::read> tint_symbol_4 [[texture(0)]]) {
+  textureLoad_2e09aa(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d_ms<float, access::read> tint_symbol_5 [[texture(0)]]) {
+  textureLoad_2e09aa(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/2e09aa.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/2e09aa.wgsl.expected.spvasm
new file mode 100644
index 0000000..751b31e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/2e09aa.wgsl.expected.spvasm
@@ -0,0 +1,86 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 45
+; 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 %textureLoad_2e09aa "textureLoad_2e09aa"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 0 1 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %12 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+         %18 = OpConstantNull %v2uint
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %24 = OpConstantNull %uint
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+         %31 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_2e09aa = OpFunction %void None %12
+         %15 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v2uint Function %18
+      %arg_2 = OpVariable %_ptr_Function_uint Function %24
+        %res = OpVariable %_ptr_Function_v4float Function %5
+               OpStore %arg_1 %18
+               OpStore %arg_2 %uint_1
+         %26 = OpLoad %11 %arg_0
+         %27 = OpLoad %v2uint %arg_1
+         %28 = OpLoad %uint %arg_2
+         %25 = OpImageFetch %v4float %26 %27 Sample %28
+               OpStore %res %25
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %31
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %textureLoad_2e09aa
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+         %36 = OpLabel
+         %37 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %37
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %textureLoad_2e09aa
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %12
+         %43 = OpLabel
+         %44 = OpFunctionCall %void %textureLoad_2e09aa
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/2e09aa.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/2e09aa.wgsl.expected.wgsl
new file mode 100644
index 0000000..22a0a70
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/2e09aa.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(0) var arg_0 : texture_multisampled_2d<f32>;
+
+fn textureLoad_2e09aa() {
+  var arg_1 = vec2<u32>();
+  var arg_2 = 1u;
+  var res : vec4<f32> = textureLoad(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_2e09aa();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_2e09aa();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_2e09aa();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/47e818.wgsl b/test/tint/builtins/gen/var/textureLoad/47e818.wgsl
new file mode 100644
index 0000000..98c9832
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/47e818.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_3d<i32>;
+
+// fn textureLoad(texture: texture_3d<i32>, coords: vec3<u32>, level: u32) -> vec4<i32>
+fn textureLoad_47e818() {
+  var arg_1 = vec3<u32>();
+  var arg_2 = 1u;
+  var res: vec4<i32> = textureLoad(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_47e818();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_47e818();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_47e818();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/47e818.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/47e818.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..71c7aac
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/47e818.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture3D<int4> arg_0 : register(t0, space1);
+
+void textureLoad_47e818() {
+  uint3 arg_1 = (0u).xxx;
+  uint arg_2 = 1u;
+  int4 res = arg_0.Load(uint4(arg_1, arg_2));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_47e818();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_47e818();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_47e818();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/47e818.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/47e818.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..71c7aac
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/47e818.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture3D<int4> arg_0 : register(t0, space1);
+
+void textureLoad_47e818() {
+  uint3 arg_1 = (0u).xxx;
+  uint arg_2 = 1u;
+  int4 res = arg_0.Load(uint4(arg_1, arg_2));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_47e818();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_47e818();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_47e818();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/47e818.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/47e818.wgsl.expected.glsl
new file mode 100644
index 0000000..a734ffb
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/47e818.wgsl.expected.glsl
@@ -0,0 +1,58 @@
+#version 310 es
+
+uniform highp isampler3D arg_0_1;
+void textureLoad_47e818() {
+  uvec3 arg_1 = uvec3(0u);
+  uint arg_2 = 1u;
+  ivec4 res = texelFetch(arg_0_1, ivec3(arg_1), int(arg_2));
+}
+
+vec4 vertex_main() {
+  textureLoad_47e818();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp isampler3D arg_0_1;
+void textureLoad_47e818() {
+  uvec3 arg_1 = uvec3(0u);
+  uint arg_2 = 1u;
+  ivec4 res = texelFetch(arg_0_1, ivec3(arg_1), int(arg_2));
+}
+
+void fragment_main() {
+  textureLoad_47e818();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp isampler3D arg_0_1;
+void textureLoad_47e818() {
+  uvec3 arg_1 = uvec3(0u);
+  uint arg_2 = 1u;
+  ivec4 res = texelFetch(arg_0_1, ivec3(arg_1), int(arg_2));
+}
+
+void compute_main() {
+  textureLoad_47e818();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/47e818.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/47e818.wgsl.expected.msl
new file mode 100644
index 0000000..7f3d122
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/47e818.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_47e818(texture3d<int, access::sample> tint_symbol_1) {
+  uint3 arg_1 = uint3(0u);
+  uint arg_2 = 1u;
+  int4 res = tint_symbol_1.read(uint3(arg_1), arg_2);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<int, access::sample> tint_symbol_2) {
+  textureLoad_47e818(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<int, access::sample> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture3d<int, access::sample> tint_symbol_4 [[texture(0)]]) {
+  textureLoad_47e818(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture3d<int, access::sample> tint_symbol_5 [[texture(0)]]) {
+  textureLoad_47e818(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/47e818.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/47e818.wgsl.expected.spvasm
new file mode 100644
index 0000000..b4a1420
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/47e818.wgsl.expected.spvasm
@@ -0,0 +1,89 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 48
+; 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 %textureLoad_47e818 "textureLoad_47e818"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 3D 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v3uint = OpTypeVector %uint 3
+         %19 = OpConstantNull %v3uint
+%_ptr_Function_v3uint = OpTypePointer Function %v3uint
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %25 = OpConstantNull %uint
+      %v4int = OpTypeVector %int 4
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+         %33 = OpConstantNull %v4int
+         %34 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_47e818 = OpFunction %void None %13
+         %16 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v3uint Function %19
+      %arg_2 = OpVariable %_ptr_Function_uint Function %25
+        %res = OpVariable %_ptr_Function_v4int Function %33
+               OpStore %arg_1 %19
+               OpStore %arg_2 %uint_1
+         %28 = OpLoad %11 %arg_0
+         %29 = OpLoad %v3uint %arg_1
+         %30 = OpLoad %uint %arg_2
+         %26 = OpImageFetch %v4int %28 %29 Lod %30
+               OpStore %res %26
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %34
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %textureLoad_47e818
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %39 = OpLabel
+         %40 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %40
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %43 = OpLabel
+         %44 = OpFunctionCall %void %textureLoad_47e818
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %46 = OpLabel
+         %47 = OpFunctionCall %void %textureLoad_47e818
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/47e818.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/47e818.wgsl.expected.wgsl
new file mode 100644
index 0000000..1086f04
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/47e818.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(0) var arg_0 : texture_3d<i32>;
+
+fn textureLoad_47e818() {
+  var arg_1 = vec3<u32>();
+  var arg_2 = 1u;
+  var res : vec4<i32> = textureLoad(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_47e818();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_47e818();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_47e818();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/49f76f.wgsl b/test/tint/builtins/gen/var/textureLoad/49f76f.wgsl
new file mode 100644
index 0000000..034fef4
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/49f76f.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_multisampled_2d<u32>;
+
+// fn textureLoad(texture: texture_multisampled_2d<u32>, coords: vec2<u32>, sample_index: u32) -> vec4<u32>
+fn textureLoad_49f76f() {
+  var arg_1 = vec2<u32>();
+  var arg_2 = 1u;
+  var res: vec4<u32> = textureLoad(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_49f76f();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_49f76f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_49f76f();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/49f76f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/49f76f.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..16d7d8d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/49f76f.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DMS<uint4> arg_0 : register(t0, space1);
+
+void textureLoad_49f76f() {
+  uint2 arg_1 = (0u).xx;
+  uint arg_2 = 1u;
+  uint4 res = arg_0.Load(arg_1, arg_2);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_49f76f();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_49f76f();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_49f76f();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/49f76f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/49f76f.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..16d7d8d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/49f76f.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DMS<uint4> arg_0 : register(t0, space1);
+
+void textureLoad_49f76f() {
+  uint2 arg_1 = (0u).xx;
+  uint arg_2 = 1u;
+  uint4 res = arg_0.Load(arg_1, arg_2);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_49f76f();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_49f76f();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_49f76f();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/49f76f.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/49f76f.wgsl.expected.glsl
new file mode 100644
index 0000000..7e0cd86
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/49f76f.wgsl.expected.glsl
@@ -0,0 +1,58 @@
+#version 310 es
+
+uniform highp usampler2DMS arg_0_1;
+void textureLoad_49f76f() {
+  uvec2 arg_1 = uvec2(0u);
+  uint arg_2 = 1u;
+  uvec4 res = texelFetch(arg_0_1, ivec2(arg_1), int(arg_2));
+}
+
+vec4 vertex_main() {
+  textureLoad_49f76f();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp usampler2DMS arg_0_1;
+void textureLoad_49f76f() {
+  uvec2 arg_1 = uvec2(0u);
+  uint arg_2 = 1u;
+  uvec4 res = texelFetch(arg_0_1, ivec2(arg_1), int(arg_2));
+}
+
+void fragment_main() {
+  textureLoad_49f76f();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp usampler2DMS arg_0_1;
+void textureLoad_49f76f() {
+  uvec2 arg_1 = uvec2(0u);
+  uint arg_2 = 1u;
+  uvec4 res = texelFetch(arg_0_1, ivec2(arg_1), int(arg_2));
+}
+
+void compute_main() {
+  textureLoad_49f76f();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/49f76f.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/49f76f.wgsl.expected.msl
new file mode 100644
index 0000000..af663e0
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/49f76f.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_49f76f(texture2d_ms<uint, access::read> tint_symbol_1) {
+  uint2 arg_1 = uint2(0u);
+  uint arg_2 = 1u;
+  uint4 res = tint_symbol_1.read(uint2(arg_1), arg_2);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_ms<uint, access::read> tint_symbol_2) {
+  textureLoad_49f76f(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_ms<uint, access::read> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_ms<uint, access::read> tint_symbol_4 [[texture(0)]]) {
+  textureLoad_49f76f(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d_ms<uint, access::read> tint_symbol_5 [[texture(0)]]) {
+  textureLoad_49f76f(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/49f76f.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/49f76f.wgsl.expected.spvasm
new file mode 100644
index 0000000..51c8570
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/49f76f.wgsl.expected.spvasm
@@ -0,0 +1,88 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 47
+; 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 %textureLoad_49f76f "textureLoad_49f76f"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 2D 0 0 1 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+     %v2uint = OpTypeVector %uint 2
+         %18 = OpConstantNull %v2uint
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %24 = OpConstantNull %uint
+     %v4uint = OpTypeVector %uint 4
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+         %32 = OpConstantNull %v4uint
+         %33 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_49f76f = OpFunction %void None %13
+         %16 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v2uint Function %18
+      %arg_2 = OpVariable %_ptr_Function_uint Function %24
+        %res = OpVariable %_ptr_Function_v4uint Function %32
+               OpStore %arg_1 %18
+               OpStore %arg_2 %uint_1
+         %27 = OpLoad %11 %arg_0
+         %28 = OpLoad %v2uint %arg_1
+         %29 = OpLoad %uint %arg_2
+         %25 = OpImageFetch %v4uint %27 %28 Sample %29
+               OpStore %res %25
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %33
+         %35 = OpLabel
+         %36 = OpFunctionCall %void %textureLoad_49f76f
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %38 = OpLabel
+         %39 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %39
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %42 = OpLabel
+         %43 = OpFunctionCall %void %textureLoad_49f76f
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %45 = OpLabel
+         %46 = OpFunctionCall %void %textureLoad_49f76f
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/49f76f.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/49f76f.wgsl.expected.wgsl
new file mode 100644
index 0000000..9a6fcc7
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/49f76f.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(0) var arg_0 : texture_multisampled_2d<u32>;
+
+fn textureLoad_49f76f() {
+  var arg_1 = vec2<u32>();
+  var arg_2 = 1u;
+  var res : vec4<u32> = textureLoad(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_49f76f();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_49f76f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_49f76f();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/4db25c.wgsl b/test/tint/builtins/gen/var/textureLoad/4db25c.wgsl
new file mode 100644
index 0000000..2c2af13
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/4db25c.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_depth_multisampled_2d;
+
+// fn textureLoad(texture: texture_depth_multisampled_2d, coords: vec2<u32>, sample_index: u32) -> f32
+fn textureLoad_4db25c() {
+  var arg_1 = vec2<u32>();
+  var arg_2 = 1u;
+  var res: f32 = textureLoad(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_4db25c();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_4db25c();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_4db25c();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/4db25c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/4db25c.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..d6596af
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/4db25c.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DMS<float4> arg_0 : register(t0, space1);
+
+void textureLoad_4db25c() {
+  uint2 arg_1 = (0u).xx;
+  uint arg_2 = 1u;
+  float res = arg_0.Load(uint3(arg_1, uint(0)), arg_2).x;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_4db25c();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_4db25c();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_4db25c();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/4db25c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/4db25c.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..d6596af
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/4db25c.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DMS<float4> arg_0 : register(t0, space1);
+
+void textureLoad_4db25c() {
+  uint2 arg_1 = (0u).xx;
+  uint arg_2 = 1u;
+  float res = arg_0.Load(uint3(arg_1, uint(0)), arg_2).x;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_4db25c();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_4db25c();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_4db25c();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/4db25c.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/4db25c.wgsl.expected.glsl
new file mode 100644
index 0000000..9c82b7f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/4db25c.wgsl.expected.glsl
@@ -0,0 +1,58 @@
+#version 310 es
+
+uniform highp sampler2DMS arg_0_1;
+void textureLoad_4db25c() {
+  uvec2 arg_1 = uvec2(0u);
+  uint arg_2 = 1u;
+  float res = texelFetch(arg_0_1, ivec2(arg_1), int(arg_2)).x;
+}
+
+vec4 vertex_main() {
+  textureLoad_4db25c();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2DMS arg_0_1;
+void textureLoad_4db25c() {
+  uvec2 arg_1 = uvec2(0u);
+  uint arg_2 = 1u;
+  float res = texelFetch(arg_0_1, ivec2(arg_1), int(arg_2)).x;
+}
+
+void fragment_main() {
+  textureLoad_4db25c();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp sampler2DMS arg_0_1;
+void textureLoad_4db25c() {
+  uvec2 arg_1 = uvec2(0u);
+  uint arg_2 = 1u;
+  float res = texelFetch(arg_0_1, ivec2(arg_1), int(arg_2)).x;
+}
+
+void compute_main() {
+  textureLoad_4db25c();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/4db25c.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/4db25c.wgsl.expected.msl
new file mode 100644
index 0000000..f6283ca
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/4db25c.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_4db25c(depth2d_ms<float, access::read> tint_symbol_1) {
+  uint2 arg_1 = uint2(0u);
+  uint arg_2 = 1u;
+  float res = tint_symbol_1.read(uint2(arg_1), arg_2);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(depth2d_ms<float, access::read> tint_symbol_2) {
+  textureLoad_4db25c(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(depth2d_ms<float, access::read> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(depth2d_ms<float, access::read> tint_symbol_4 [[texture(0)]]) {
+  textureLoad_4db25c(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(depth2d_ms<float, access::read> tint_symbol_5 [[texture(0)]]) {
+  textureLoad_4db25c(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/4db25c.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/4db25c.wgsl.expected.spvasm
new file mode 100644
index 0000000..5e540a9
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/4db25c.wgsl.expected.spvasm
@@ -0,0 +1,87 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 46
+; 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 %textureLoad_4db25c "textureLoad_4db25c"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 0 1 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %12 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+         %18 = OpConstantNull %v2uint
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %24 = OpConstantNull %uint
+%_ptr_Function_float = OpTypePointer Function %float
+         %32 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_4db25c = OpFunction %void None %12
+         %15 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v2uint Function %18
+      %arg_2 = OpVariable %_ptr_Function_uint Function %24
+        %res = OpVariable %_ptr_Function_float Function %8
+               OpStore %arg_1 %18
+               OpStore %arg_2 %uint_1
+         %27 = OpLoad %11 %arg_0
+         %28 = OpLoad %v2uint %arg_1
+         %29 = OpLoad %uint %arg_2
+         %26 = OpImageFetch %v4float %27 %28 Sample %29
+         %25 = OpCompositeExtract %float %26 0
+               OpStore %res %25
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %32
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %textureLoad_4db25c
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+         %37 = OpLabel
+         %38 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %38
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+         %41 = OpLabel
+         %42 = OpFunctionCall %void %textureLoad_4db25c
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %12
+         %44 = OpLabel
+         %45 = OpFunctionCall %void %textureLoad_4db25c
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/4db25c.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/4db25c.wgsl.expected.wgsl
new file mode 100644
index 0000000..fd9b07f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/4db25c.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(0) var arg_0 : texture_depth_multisampled_2d;
+
+fn textureLoad_4db25c() {
+  var arg_1 = vec2<u32>();
+  var arg_2 = 1u;
+  var res : f32 = textureLoad(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_4db25c();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_4db25c();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_4db25c();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/639962.wgsl b/test/tint/builtins/gen/var/textureLoad/639962.wgsl
new file mode 100644
index 0000000..2336058
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/639962.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_multisampled_2d<i32>;
+
+// fn textureLoad(texture: texture_multisampled_2d<i32>, coords: vec2<u32>, sample_index: u32) -> vec4<i32>
+fn textureLoad_639962() {
+  var arg_1 = vec2<u32>();
+  var arg_2 = 1u;
+  var res: vec4<i32> = textureLoad(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_639962();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_639962();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_639962();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/639962.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/639962.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..b349fe4
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/639962.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DMS<int4> arg_0 : register(t0, space1);
+
+void textureLoad_639962() {
+  uint2 arg_1 = (0u).xx;
+  uint arg_2 = 1u;
+  int4 res = arg_0.Load(arg_1, arg_2);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_639962();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_639962();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_639962();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/639962.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/639962.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..b349fe4
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/639962.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DMS<int4> arg_0 : register(t0, space1);
+
+void textureLoad_639962() {
+  uint2 arg_1 = (0u).xx;
+  uint arg_2 = 1u;
+  int4 res = arg_0.Load(arg_1, arg_2);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_639962();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_639962();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_639962();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/639962.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/639962.wgsl.expected.glsl
new file mode 100644
index 0000000..b273a8c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/639962.wgsl.expected.glsl
@@ -0,0 +1,58 @@
+#version 310 es
+
+uniform highp isampler2DMS arg_0_1;
+void textureLoad_639962() {
+  uvec2 arg_1 = uvec2(0u);
+  uint arg_2 = 1u;
+  ivec4 res = texelFetch(arg_0_1, ivec2(arg_1), int(arg_2));
+}
+
+vec4 vertex_main() {
+  textureLoad_639962();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp isampler2DMS arg_0_1;
+void textureLoad_639962() {
+  uvec2 arg_1 = uvec2(0u);
+  uint arg_2 = 1u;
+  ivec4 res = texelFetch(arg_0_1, ivec2(arg_1), int(arg_2));
+}
+
+void fragment_main() {
+  textureLoad_639962();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp isampler2DMS arg_0_1;
+void textureLoad_639962() {
+  uvec2 arg_1 = uvec2(0u);
+  uint arg_2 = 1u;
+  ivec4 res = texelFetch(arg_0_1, ivec2(arg_1), int(arg_2));
+}
+
+void compute_main() {
+  textureLoad_639962();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/639962.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/639962.wgsl.expected.msl
new file mode 100644
index 0000000..bd713c5
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/639962.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_639962(texture2d_ms<int, access::read> tint_symbol_1) {
+  uint2 arg_1 = uint2(0u);
+  uint arg_2 = 1u;
+  int4 res = tint_symbol_1.read(uint2(arg_1), arg_2);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_ms<int, access::read> tint_symbol_2) {
+  textureLoad_639962(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_ms<int, access::read> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_ms<int, access::read> tint_symbol_4 [[texture(0)]]) {
+  textureLoad_639962(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d_ms<int, access::read> tint_symbol_5 [[texture(0)]]) {
+  textureLoad_639962(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/639962.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/639962.wgsl.expected.spvasm
new file mode 100644
index 0000000..307a6eb
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/639962.wgsl.expected.spvasm
@@ -0,0 +1,89 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 48
+; 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 %textureLoad_639962 "textureLoad_639962"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 2D 0 0 1 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+         %19 = OpConstantNull %v2uint
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %25 = OpConstantNull %uint
+      %v4int = OpTypeVector %int 4
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+         %33 = OpConstantNull %v4int
+         %34 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_639962 = OpFunction %void None %13
+         %16 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v2uint Function %19
+      %arg_2 = OpVariable %_ptr_Function_uint Function %25
+        %res = OpVariable %_ptr_Function_v4int Function %33
+               OpStore %arg_1 %19
+               OpStore %arg_2 %uint_1
+         %28 = OpLoad %11 %arg_0
+         %29 = OpLoad %v2uint %arg_1
+         %30 = OpLoad %uint %arg_2
+         %26 = OpImageFetch %v4int %28 %29 Sample %30
+               OpStore %res %26
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %34
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %textureLoad_639962
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %39 = OpLabel
+         %40 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %40
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %43 = OpLabel
+         %44 = OpFunctionCall %void %textureLoad_639962
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %46 = OpLabel
+         %47 = OpFunctionCall %void %textureLoad_639962
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/639962.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/639962.wgsl.expected.wgsl
new file mode 100644
index 0000000..25ea34f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/639962.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(0) var arg_0 : texture_multisampled_2d<i32>;
+
+fn textureLoad_639962() {
+  var arg_1 = vec2<u32>();
+  var arg_2 = 1u;
+  var res : vec4<i32> = textureLoad(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_639962();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_639962();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_639962();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/6d376a.wgsl b/test/tint/builtins/gen/var/textureLoad/6d376a.wgsl
new file mode 100644
index 0000000..eeee23a
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/6d376a.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_1d<f32>;
+
+// fn textureLoad(texture: texture_1d<f32>, coords: u32, level: u32) -> vec4<f32>
+fn textureLoad_6d376a() {
+  var arg_1 = 1u;
+  var arg_2 = 1u;
+  var res: vec4<f32> = textureLoad(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_6d376a();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_6d376a();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_6d376a();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/6d376a.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/6d376a.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..cf3f78b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/6d376a.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture1D<float4> arg_0 : register(t0, space1);
+
+void textureLoad_6d376a() {
+  uint arg_1 = 1u;
+  uint arg_2 = 1u;
+  float4 res = arg_0.Load(uint2(arg_1, arg_2));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_6d376a();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_6d376a();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_6d376a();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/6d376a.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/6d376a.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..cf3f78b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/6d376a.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture1D<float4> arg_0 : register(t0, space1);
+
+void textureLoad_6d376a() {
+  uint arg_1 = 1u;
+  uint arg_2 = 1u;
+  float4 res = arg_0.Load(uint2(arg_1, arg_2));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_6d376a();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_6d376a();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_6d376a();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/6d376a.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/6d376a.wgsl.expected.glsl
new file mode 100644
index 0000000..feaca4d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/6d376a.wgsl.expected.glsl
@@ -0,0 +1,81 @@
+SKIP: FAILED
+
+#version 310 es
+
+uniform highp sampler1D arg_0_1;
+void textureLoad_6d376a() {
+  uint arg_1 = 1u;
+  uint arg_2 = 1u;
+  vec4 res = texelFetch(arg_0_1, int(arg_1), int(arg_2));
+}
+
+vec4 vertex_main() {
+  textureLoad_6d376a();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'sampler1D' : Reserved word. 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+uniform highp sampler1D arg_0_1;
+void textureLoad_6d376a() {
+  uint arg_1 = 1u;
+  uint arg_2 = 1u;
+  vec4 res = texelFetch(arg_0_1, int(arg_1), int(arg_2));
+}
+
+void fragment_main() {
+  textureLoad_6d376a();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'sampler1D' : Reserved word. 
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+uniform highp sampler1D arg_0_1;
+void textureLoad_6d376a() {
+  uint arg_1 = 1u;
+  uint arg_2 = 1u;
+  vec4 res = texelFetch(arg_0_1, int(arg_1), int(arg_2));
+}
+
+void compute_main() {
+  textureLoad_6d376a();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'sampler1D' : Reserved word. 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/6d376a.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/6d376a.wgsl.expected.msl
new file mode 100644
index 0000000..c42b2ec
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/6d376a.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_6d376a(texture1d<float, access::sample> tint_symbol_1) {
+  uint arg_1 = 1u;
+  uint arg_2 = 1u;
+  float4 res = tint_symbol_1.read(uint(arg_1), 0);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<float, access::sample> tint_symbol_2) {
+  textureLoad_6d376a(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<float, access::sample> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<float, access::sample> tint_symbol_4 [[texture(0)]]) {
+  textureLoad_6d376a(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture1d<float, access::sample> tint_symbol_5 [[texture(0)]]) {
+  textureLoad_6d376a(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/6d376a.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/6d376a.wgsl.expected.spvasm
new file mode 100644
index 0000000..a5bed9d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/6d376a.wgsl.expected.spvasm
@@ -0,0 +1,84 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 42
+; Schema: 0
+               OpCapability Shader
+               OpCapability Sampled1D
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureLoad_6d376a "textureLoad_6d376a"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 1D 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %12 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %20 = OpConstantNull %uint
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+         %28 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_6d376a = OpFunction %void None %12
+         %15 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_uint Function %20
+      %arg_2 = OpVariable %_ptr_Function_uint Function %20
+        %res = OpVariable %_ptr_Function_v4float Function %5
+               OpStore %arg_1 %uint_1
+               OpStore %arg_2 %uint_1
+         %23 = OpLoad %11 %arg_0
+         %24 = OpLoad %uint %arg_1
+         %25 = OpLoad %uint %arg_2
+         %22 = OpImageFetch %v4float %23 %24 Lod %25
+               OpStore %res %22
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %28
+         %30 = OpLabel
+         %31 = OpFunctionCall %void %textureLoad_6d376a
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+         %33 = OpLabel
+         %34 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %34
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+         %37 = OpLabel
+         %38 = OpFunctionCall %void %textureLoad_6d376a
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %12
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %textureLoad_6d376a
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/6d376a.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/6d376a.wgsl.expected.wgsl
new file mode 100644
index 0000000..a485a5d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/6d376a.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(0) var arg_0 : texture_1d<f32>;
+
+fn textureLoad_6d376a() {
+  var arg_1 = 1u;
+  var arg_2 = 1u;
+  var res : vec4<f32> = textureLoad(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_6d376a();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_6d376a();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_6d376a();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/714471.wgsl b/test/tint/builtins/gen/var/textureLoad/714471.wgsl
new file mode 100644
index 0000000..bd1f65c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/714471.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_2d<i32>;
+
+// fn textureLoad(texture: texture_2d<i32>, coords: vec2<u32>, level: u32) -> vec4<i32>
+fn textureLoad_714471() {
+  var arg_1 = vec2<u32>();
+  var arg_2 = 1u;
+  var res: vec4<i32> = textureLoad(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_714471();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_714471();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_714471();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/714471.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/714471.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..0c18883
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/714471.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture2D<int4> arg_0 : register(t0, space1);
+
+void textureLoad_714471() {
+  uint2 arg_1 = (0u).xx;
+  uint arg_2 = 1u;
+  int4 res = arg_0.Load(uint3(arg_1, arg_2));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_714471();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_714471();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_714471();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/714471.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/714471.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..0c18883
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/714471.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture2D<int4> arg_0 : register(t0, space1);
+
+void textureLoad_714471() {
+  uint2 arg_1 = (0u).xx;
+  uint arg_2 = 1u;
+  int4 res = arg_0.Load(uint3(arg_1, arg_2));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_714471();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_714471();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_714471();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/714471.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/714471.wgsl.expected.glsl
new file mode 100644
index 0000000..2c17c62
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/714471.wgsl.expected.glsl
@@ -0,0 +1,58 @@
+#version 310 es
+
+uniform highp isampler2D arg_0_1;
+void textureLoad_714471() {
+  uvec2 arg_1 = uvec2(0u);
+  uint arg_2 = 1u;
+  ivec4 res = texelFetch(arg_0_1, ivec2(arg_1), int(arg_2));
+}
+
+vec4 vertex_main() {
+  textureLoad_714471();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp isampler2D arg_0_1;
+void textureLoad_714471() {
+  uvec2 arg_1 = uvec2(0u);
+  uint arg_2 = 1u;
+  ivec4 res = texelFetch(arg_0_1, ivec2(arg_1), int(arg_2));
+}
+
+void fragment_main() {
+  textureLoad_714471();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp isampler2D arg_0_1;
+void textureLoad_714471() {
+  uvec2 arg_1 = uvec2(0u);
+  uint arg_2 = 1u;
+  ivec4 res = texelFetch(arg_0_1, ivec2(arg_1), int(arg_2));
+}
+
+void compute_main() {
+  textureLoad_714471();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/714471.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/714471.wgsl.expected.msl
new file mode 100644
index 0000000..d147934
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/714471.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_714471(texture2d<int, access::sample> tint_symbol_1) {
+  uint2 arg_1 = uint2(0u);
+  uint arg_2 = 1u;
+  int4 res = tint_symbol_1.read(uint2(arg_1), arg_2);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<int, access::sample> tint_symbol_2) {
+  textureLoad_714471(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<int, access::sample> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<int, access::sample> tint_symbol_4 [[texture(0)]]) {
+  textureLoad_714471(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d<int, access::sample> tint_symbol_5 [[texture(0)]]) {
+  textureLoad_714471(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/714471.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/714471.wgsl.expected.spvasm
new file mode 100644
index 0000000..791435e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/714471.wgsl.expected.spvasm
@@ -0,0 +1,89 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 48
+; 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 %textureLoad_714471 "textureLoad_714471"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 2D 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+         %19 = OpConstantNull %v2uint
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %25 = OpConstantNull %uint
+      %v4int = OpTypeVector %int 4
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+         %33 = OpConstantNull %v4int
+         %34 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_714471 = OpFunction %void None %13
+         %16 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v2uint Function %19
+      %arg_2 = OpVariable %_ptr_Function_uint Function %25
+        %res = OpVariable %_ptr_Function_v4int Function %33
+               OpStore %arg_1 %19
+               OpStore %arg_2 %uint_1
+         %28 = OpLoad %11 %arg_0
+         %29 = OpLoad %v2uint %arg_1
+         %30 = OpLoad %uint %arg_2
+         %26 = OpImageFetch %v4int %28 %29 Lod %30
+               OpStore %res %26
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %34
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %textureLoad_714471
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %39 = OpLabel
+         %40 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %40
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %43 = OpLabel
+         %44 = OpFunctionCall %void %textureLoad_714471
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %46 = OpLabel
+         %47 = OpFunctionCall %void %textureLoad_714471
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/714471.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/714471.wgsl.expected.wgsl
new file mode 100644
index 0000000..6692a20
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/714471.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(0) var arg_0 : texture_2d<i32>;
+
+fn textureLoad_714471() {
+  var arg_1 = vec2<u32>();
+  var arg_2 = 1u;
+  var res : vec4<i32> = textureLoad(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_714471();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_714471();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_714471();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/7b63e0.wgsl b/test/tint/builtins/gen/var/textureLoad/7b63e0.wgsl
new file mode 100644
index 0000000..19901a0
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/7b63e0.wgsl
@@ -0,0 +1,47 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_depth_2d_array;
+
+// fn textureLoad(texture: texture_depth_2d_array, coords: vec2<u32>, array_index: u32, level: u32) -> f32
+fn textureLoad_7b63e0() {
+  var arg_1 = vec2<u32>();
+  var arg_2 = 1u;
+  var arg_3 = 1u;
+  var res: f32 = textureLoad(arg_0, arg_1, arg_2, arg_3);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_7b63e0();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_7b63e0();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_7b63e0();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/7b63e0.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/7b63e0.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..54f384a
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/7b63e0.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture2DArray arg_0 : register(t0, space1);
+
+void textureLoad_7b63e0() {
+  uint2 arg_1 = (0u).xx;
+  uint arg_2 = 1u;
+  uint arg_3 = 1u;
+  float res = arg_0.Load(uint4(uint3(arg_1, arg_2), arg_3)).x;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_7b63e0();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_7b63e0();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_7b63e0();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/7b63e0.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/7b63e0.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..54f384a
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/7b63e0.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture2DArray arg_0 : register(t0, space1);
+
+void textureLoad_7b63e0() {
+  uint2 arg_1 = (0u).xx;
+  uint arg_2 = 1u;
+  uint arg_3 = 1u;
+  float res = arg_0.Load(uint4(uint3(arg_1, arg_2), arg_3)).x;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_7b63e0();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_7b63e0();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_7b63e0();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/7b63e0.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/7b63e0.wgsl.expected.glsl
new file mode 100644
index 0000000..a024f9c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/7b63e0.wgsl.expected.glsl
@@ -0,0 +1,61 @@
+#version 310 es
+
+uniform highp sampler2DArray arg_0_1;
+void textureLoad_7b63e0() {
+  uvec2 arg_1 = uvec2(0u);
+  uint arg_2 = 1u;
+  uint arg_3 = 1u;
+  float res = texelFetch(arg_0_1, ivec3(uvec3(arg_1, arg_2)), int(arg_3)).x;
+}
+
+vec4 vertex_main() {
+  textureLoad_7b63e0();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2DArray arg_0_1;
+void textureLoad_7b63e0() {
+  uvec2 arg_1 = uvec2(0u);
+  uint arg_2 = 1u;
+  uint arg_3 = 1u;
+  float res = texelFetch(arg_0_1, ivec3(uvec3(arg_1, arg_2)), int(arg_3)).x;
+}
+
+void fragment_main() {
+  textureLoad_7b63e0();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp sampler2DArray arg_0_1;
+void textureLoad_7b63e0() {
+  uvec2 arg_1 = uvec2(0u);
+  uint arg_2 = 1u;
+  uint arg_3 = 1u;
+  float res = texelFetch(arg_0_1, ivec3(uvec3(arg_1, arg_2)), int(arg_3)).x;
+}
+
+void compute_main() {
+  textureLoad_7b63e0();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/7b63e0.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/7b63e0.wgsl.expected.msl
new file mode 100644
index 0000000..31ac2eb
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/7b63e0.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_7b63e0(depth2d_array<float, access::sample> tint_symbol_1) {
+  uint2 arg_1 = uint2(0u);
+  uint arg_2 = 1u;
+  uint arg_3 = 1u;
+  float res = tint_symbol_1.read(uint2(arg_1), arg_2, arg_3);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(depth2d_array<float, access::sample> tint_symbol_2) {
+  textureLoad_7b63e0(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(depth2d_array<float, access::sample> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(depth2d_array<float, access::sample> tint_symbol_4 [[texture(0)]]) {
+  textureLoad_7b63e0(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(depth2d_array<float, access::sample> tint_symbol_5 [[texture(0)]]) {
+  textureLoad_7b63e0(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/7b63e0.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/7b63e0.wgsl.expected.spvasm
new file mode 100644
index 0000000..ae0386b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/7b63e0.wgsl.expected.spvasm
@@ -0,0 +1,95 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 52
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureLoad_7b63e0 "textureLoad_7b63e0"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %arg_3 "arg_3"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %12 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+         %18 = OpConstantNull %v2uint
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %24 = OpConstantNull %uint
+     %v3uint = OpTypeVector %uint 3
+%_ptr_Function_float = OpTypePointer Function %float
+         %38 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_7b63e0 = OpFunction %void None %12
+         %15 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v2uint Function %18
+      %arg_2 = OpVariable %_ptr_Function_uint Function %24
+      %arg_3 = OpVariable %_ptr_Function_uint Function %24
+        %res = OpVariable %_ptr_Function_float Function %8
+               OpStore %arg_1 %18
+               OpStore %arg_2 %uint_1
+               OpStore %arg_3 %uint_1
+         %28 = OpLoad %11 %arg_0
+         %30 = OpLoad %v2uint %arg_1
+         %31 = OpCompositeExtract %uint %30 0
+         %32 = OpCompositeExtract %uint %30 1
+         %33 = OpLoad %uint %arg_2
+         %34 = OpCompositeConstruct %v3uint %31 %32 %33
+         %35 = OpLoad %uint %arg_3
+         %27 = OpImageFetch %v4float %28 %34 Lod %35
+         %26 = OpCompositeExtract %float %27 0
+               OpStore %res %26
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %38
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %textureLoad_7b63e0
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+         %43 = OpLabel
+         %44 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %44
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+         %47 = OpLabel
+         %48 = OpFunctionCall %void %textureLoad_7b63e0
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %12
+         %50 = OpLabel
+         %51 = OpFunctionCall %void %textureLoad_7b63e0
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/7b63e0.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/7b63e0.wgsl.expected.wgsl
new file mode 100644
index 0000000..6839f8c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/7b63e0.wgsl.expected.wgsl
@@ -0,0 +1,24 @@
+@group(1) @binding(0) var arg_0 : texture_depth_2d_array;
+
+fn textureLoad_7b63e0() {
+  var arg_1 = vec2<u32>();
+  var arg_2 = 1u;
+  var arg_3 = 1u;
+  var res : f32 = textureLoad(arg_0, arg_1, arg_2, arg_3);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_7b63e0();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_7b63e0();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_7b63e0();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/84dee1.wgsl b/test/tint/builtins/gen/var/textureLoad/84dee1.wgsl
new file mode 100644
index 0000000..4ef1d0b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/84dee1.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_2d<f32>;
+
+// fn textureLoad(texture: texture_2d<f32>, coords: vec2<u32>, level: u32) -> vec4<f32>
+fn textureLoad_84dee1() {
+  var arg_1 = vec2<u32>();
+  var arg_2 = 1u;
+  var res: vec4<f32> = textureLoad(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_84dee1();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_84dee1();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_84dee1();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/84dee1.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/84dee1.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..7ab5799
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/84dee1.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture2D<float4> arg_0 : register(t0, space1);
+
+void textureLoad_84dee1() {
+  uint2 arg_1 = (0u).xx;
+  uint arg_2 = 1u;
+  float4 res = arg_0.Load(uint3(arg_1, arg_2));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_84dee1();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_84dee1();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_84dee1();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/84dee1.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/84dee1.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..7ab5799
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/84dee1.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture2D<float4> arg_0 : register(t0, space1);
+
+void textureLoad_84dee1() {
+  uint2 arg_1 = (0u).xx;
+  uint arg_2 = 1u;
+  float4 res = arg_0.Load(uint3(arg_1, arg_2));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_84dee1();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_84dee1();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_84dee1();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/84dee1.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/84dee1.wgsl.expected.glsl
new file mode 100644
index 0000000..6706ec1
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/84dee1.wgsl.expected.glsl
@@ -0,0 +1,58 @@
+#version 310 es
+
+uniform highp sampler2D arg_0_1;
+void textureLoad_84dee1() {
+  uvec2 arg_1 = uvec2(0u);
+  uint arg_2 = 1u;
+  vec4 res = texelFetch(arg_0_1, ivec2(arg_1), int(arg_2));
+}
+
+vec4 vertex_main() {
+  textureLoad_84dee1();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2D arg_0_1;
+void textureLoad_84dee1() {
+  uvec2 arg_1 = uvec2(0u);
+  uint arg_2 = 1u;
+  vec4 res = texelFetch(arg_0_1, ivec2(arg_1), int(arg_2));
+}
+
+void fragment_main() {
+  textureLoad_84dee1();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp sampler2D arg_0_1;
+void textureLoad_84dee1() {
+  uvec2 arg_1 = uvec2(0u);
+  uint arg_2 = 1u;
+  vec4 res = texelFetch(arg_0_1, ivec2(arg_1), int(arg_2));
+}
+
+void compute_main() {
+  textureLoad_84dee1();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/84dee1.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/84dee1.wgsl.expected.msl
new file mode 100644
index 0000000..545f668
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/84dee1.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_84dee1(texture2d<float, access::sample> tint_symbol_1) {
+  uint2 arg_1 = uint2(0u);
+  uint arg_2 = 1u;
+  float4 res = tint_symbol_1.read(uint2(arg_1), arg_2);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<float, access::sample> tint_symbol_2) {
+  textureLoad_84dee1(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<float, access::sample> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<float, access::sample> tint_symbol_4 [[texture(0)]]) {
+  textureLoad_84dee1(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d<float, access::sample> tint_symbol_5 [[texture(0)]]) {
+  textureLoad_84dee1(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/84dee1.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/84dee1.wgsl.expected.spvasm
new file mode 100644
index 0000000..d1c06a6
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/84dee1.wgsl.expected.spvasm
@@ -0,0 +1,86 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 45
+; 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 %textureLoad_84dee1 "textureLoad_84dee1"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %12 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+         %18 = OpConstantNull %v2uint
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %24 = OpConstantNull %uint
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+         %31 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_84dee1 = OpFunction %void None %12
+         %15 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v2uint Function %18
+      %arg_2 = OpVariable %_ptr_Function_uint Function %24
+        %res = OpVariable %_ptr_Function_v4float Function %5
+               OpStore %arg_1 %18
+               OpStore %arg_2 %uint_1
+         %26 = OpLoad %11 %arg_0
+         %27 = OpLoad %v2uint %arg_1
+         %28 = OpLoad %uint %arg_2
+         %25 = OpImageFetch %v4float %26 %27 Lod %28
+               OpStore %res %25
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %31
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %textureLoad_84dee1
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+         %36 = OpLabel
+         %37 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %37
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %textureLoad_84dee1
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %12
+         %43 = OpLabel
+         %44 = OpFunctionCall %void %textureLoad_84dee1
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/84dee1.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/84dee1.wgsl.expected.wgsl
new file mode 100644
index 0000000..850b0fe
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/84dee1.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(0) var arg_0 : texture_2d<f32>;
+
+fn textureLoad_84dee1() {
+  var arg_1 = vec2<u32>();
+  var arg_2 = 1u;
+  var res : vec4<f32> = textureLoad(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_84dee1();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_84dee1();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_84dee1();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/8527b1.wgsl b/test/tint/builtins/gen/var/textureLoad/8527b1.wgsl
new file mode 100644
index 0000000..3e96430
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/8527b1.wgsl
@@ -0,0 +1,47 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_2d_array<u32>;
+
+// fn textureLoad(texture: texture_2d_array<u32>, coords: vec2<u32>, array_index: u32, level: u32) -> vec4<u32>
+fn textureLoad_8527b1() {
+  var arg_1 = vec2<u32>();
+  var arg_2 = 1u;
+  var arg_3 = 1u;
+  var res: vec4<u32> = textureLoad(arg_0, arg_1, arg_2, arg_3);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_8527b1();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_8527b1();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_8527b1();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/8527b1.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/8527b1.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..e084b64
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/8527b1.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture2DArray<uint4> arg_0 : register(t0, space1);
+
+void textureLoad_8527b1() {
+  uint2 arg_1 = (0u).xx;
+  uint arg_2 = 1u;
+  uint arg_3 = 1u;
+  uint4 res = arg_0.Load(uint4(uint3(arg_1, arg_2), arg_3));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_8527b1();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_8527b1();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_8527b1();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/8527b1.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/8527b1.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..e084b64
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/8527b1.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture2DArray<uint4> arg_0 : register(t0, space1);
+
+void textureLoad_8527b1() {
+  uint2 arg_1 = (0u).xx;
+  uint arg_2 = 1u;
+  uint arg_3 = 1u;
+  uint4 res = arg_0.Load(uint4(uint3(arg_1, arg_2), arg_3));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_8527b1();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_8527b1();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_8527b1();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/8527b1.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/8527b1.wgsl.expected.glsl
new file mode 100644
index 0000000..01a6c24
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/8527b1.wgsl.expected.glsl
@@ -0,0 +1,61 @@
+#version 310 es
+
+uniform highp usampler2DArray arg_0_1;
+void textureLoad_8527b1() {
+  uvec2 arg_1 = uvec2(0u);
+  uint arg_2 = 1u;
+  uint arg_3 = 1u;
+  uvec4 res = texelFetch(arg_0_1, ivec3(uvec3(arg_1, arg_2)), int(arg_3));
+}
+
+vec4 vertex_main() {
+  textureLoad_8527b1();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp usampler2DArray arg_0_1;
+void textureLoad_8527b1() {
+  uvec2 arg_1 = uvec2(0u);
+  uint arg_2 = 1u;
+  uint arg_3 = 1u;
+  uvec4 res = texelFetch(arg_0_1, ivec3(uvec3(arg_1, arg_2)), int(arg_3));
+}
+
+void fragment_main() {
+  textureLoad_8527b1();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp usampler2DArray arg_0_1;
+void textureLoad_8527b1() {
+  uvec2 arg_1 = uvec2(0u);
+  uint arg_2 = 1u;
+  uint arg_3 = 1u;
+  uvec4 res = texelFetch(arg_0_1, ivec3(uvec3(arg_1, arg_2)), int(arg_3));
+}
+
+void compute_main() {
+  textureLoad_8527b1();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/8527b1.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/8527b1.wgsl.expected.msl
new file mode 100644
index 0000000..c84a237
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/8527b1.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_8527b1(texture2d_array<uint, access::sample> tint_symbol_1) {
+  uint2 arg_1 = uint2(0u);
+  uint arg_2 = 1u;
+  uint arg_3 = 1u;
+  uint4 res = tint_symbol_1.read(uint2(arg_1), arg_2, arg_3);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<uint, access::sample> tint_symbol_2) {
+  textureLoad_8527b1(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<uint, access::sample> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<uint, access::sample> tint_symbol_4 [[texture(0)]]) {
+  textureLoad_8527b1(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d_array<uint, access::sample> tint_symbol_5 [[texture(0)]]) {
+  textureLoad_8527b1(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/8527b1.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/8527b1.wgsl.expected.spvasm
new file mode 100644
index 0000000..e8edef0
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/8527b1.wgsl.expected.spvasm
@@ -0,0 +1,96 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 53
+; 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 %textureLoad_8527b1 "textureLoad_8527b1"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %arg_3 "arg_3"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+     %v2uint = OpTypeVector %uint 2
+         %18 = OpConstantNull %v2uint
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %24 = OpConstantNull %uint
+     %v4uint = OpTypeVector %uint 4
+     %v3uint = OpTypeVector %uint 3
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+         %38 = OpConstantNull %v4uint
+         %39 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_8527b1 = OpFunction %void None %13
+         %16 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v2uint Function %18
+      %arg_2 = OpVariable %_ptr_Function_uint Function %24
+      %arg_3 = OpVariable %_ptr_Function_uint Function %24
+        %res = OpVariable %_ptr_Function_v4uint Function %38
+               OpStore %arg_1 %18
+               OpStore %arg_2 %uint_1
+               OpStore %arg_3 %uint_1
+         %28 = OpLoad %11 %arg_0
+         %30 = OpLoad %v2uint %arg_1
+         %31 = OpCompositeExtract %uint %30 0
+         %32 = OpCompositeExtract %uint %30 1
+         %33 = OpLoad %uint %arg_2
+         %34 = OpCompositeConstruct %v3uint %31 %32 %33
+         %35 = OpLoad %uint %arg_3
+         %26 = OpImageFetch %v4uint %28 %34 Lod %35
+               OpStore %res %26
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %39
+         %41 = OpLabel
+         %42 = OpFunctionCall %void %textureLoad_8527b1
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %44 = OpLabel
+         %45 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %45
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %48 = OpLabel
+         %49 = OpFunctionCall %void %textureLoad_8527b1
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %51 = OpLabel
+         %52 = OpFunctionCall %void %textureLoad_8527b1
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/8527b1.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/8527b1.wgsl.expected.wgsl
new file mode 100644
index 0000000..2f2f110
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/8527b1.wgsl.expected.wgsl
@@ -0,0 +1,24 @@
+@group(1) @binding(0) var arg_0 : texture_2d_array<u32>;
+
+fn textureLoad_8527b1() {
+  var arg_1 = vec2<u32>();
+  var arg_2 = 1u;
+  var arg_3 = 1u;
+  var res : vec4<u32> = textureLoad(arg_0, arg_1, arg_2, arg_3);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_8527b1();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_8527b1();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_8527b1();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/897cf3.wgsl b/test/tint/builtins/gen/var/textureLoad/897cf3.wgsl
new file mode 100644
index 0000000..cf0ac23
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/897cf3.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_2d<u32>;
+
+// fn textureLoad(texture: texture_2d<u32>, coords: vec2<u32>, level: u32) -> vec4<u32>
+fn textureLoad_897cf3() {
+  var arg_1 = vec2<u32>();
+  var arg_2 = 1u;
+  var res: vec4<u32> = textureLoad(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_897cf3();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_897cf3();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_897cf3();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/897cf3.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/897cf3.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..7f68c6d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/897cf3.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture2D<uint4> arg_0 : register(t0, space1);
+
+void textureLoad_897cf3() {
+  uint2 arg_1 = (0u).xx;
+  uint arg_2 = 1u;
+  uint4 res = arg_0.Load(uint3(arg_1, arg_2));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_897cf3();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_897cf3();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_897cf3();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/897cf3.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/897cf3.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..7f68c6d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/897cf3.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture2D<uint4> arg_0 : register(t0, space1);
+
+void textureLoad_897cf3() {
+  uint2 arg_1 = (0u).xx;
+  uint arg_2 = 1u;
+  uint4 res = arg_0.Load(uint3(arg_1, arg_2));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_897cf3();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_897cf3();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_897cf3();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/897cf3.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/897cf3.wgsl.expected.glsl
new file mode 100644
index 0000000..4c8f3f2
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/897cf3.wgsl.expected.glsl
@@ -0,0 +1,58 @@
+#version 310 es
+
+uniform highp usampler2D arg_0_1;
+void textureLoad_897cf3() {
+  uvec2 arg_1 = uvec2(0u);
+  uint arg_2 = 1u;
+  uvec4 res = texelFetch(arg_0_1, ivec2(arg_1), int(arg_2));
+}
+
+vec4 vertex_main() {
+  textureLoad_897cf3();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp usampler2D arg_0_1;
+void textureLoad_897cf3() {
+  uvec2 arg_1 = uvec2(0u);
+  uint arg_2 = 1u;
+  uvec4 res = texelFetch(arg_0_1, ivec2(arg_1), int(arg_2));
+}
+
+void fragment_main() {
+  textureLoad_897cf3();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp usampler2D arg_0_1;
+void textureLoad_897cf3() {
+  uvec2 arg_1 = uvec2(0u);
+  uint arg_2 = 1u;
+  uvec4 res = texelFetch(arg_0_1, ivec2(arg_1), int(arg_2));
+}
+
+void compute_main() {
+  textureLoad_897cf3();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/897cf3.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/897cf3.wgsl.expected.msl
new file mode 100644
index 0000000..004547d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/897cf3.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_897cf3(texture2d<uint, access::sample> tint_symbol_1) {
+  uint2 arg_1 = uint2(0u);
+  uint arg_2 = 1u;
+  uint4 res = tint_symbol_1.read(uint2(arg_1), arg_2);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<uint, access::sample> tint_symbol_2) {
+  textureLoad_897cf3(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<uint, access::sample> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<uint, access::sample> tint_symbol_4 [[texture(0)]]) {
+  textureLoad_897cf3(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d<uint, access::sample> tint_symbol_5 [[texture(0)]]) {
+  textureLoad_897cf3(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/897cf3.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/897cf3.wgsl.expected.spvasm
new file mode 100644
index 0000000..43e8cfb
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/897cf3.wgsl.expected.spvasm
@@ -0,0 +1,88 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 47
+; 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 %textureLoad_897cf3 "textureLoad_897cf3"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 2D 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+     %v2uint = OpTypeVector %uint 2
+         %18 = OpConstantNull %v2uint
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %24 = OpConstantNull %uint
+     %v4uint = OpTypeVector %uint 4
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+         %32 = OpConstantNull %v4uint
+         %33 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_897cf3 = OpFunction %void None %13
+         %16 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v2uint Function %18
+      %arg_2 = OpVariable %_ptr_Function_uint Function %24
+        %res = OpVariable %_ptr_Function_v4uint Function %32
+               OpStore %arg_1 %18
+               OpStore %arg_2 %uint_1
+         %27 = OpLoad %11 %arg_0
+         %28 = OpLoad %v2uint %arg_1
+         %29 = OpLoad %uint %arg_2
+         %25 = OpImageFetch %v4uint %27 %28 Lod %29
+               OpStore %res %25
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %33
+         %35 = OpLabel
+         %36 = OpFunctionCall %void %textureLoad_897cf3
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %38 = OpLabel
+         %39 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %39
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %42 = OpLabel
+         %43 = OpFunctionCall %void %textureLoad_897cf3
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %45 = OpLabel
+         %46 = OpFunctionCall %void %textureLoad_897cf3
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/897cf3.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/897cf3.wgsl.expected.wgsl
new file mode 100644
index 0000000..a690f92
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/897cf3.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(0) var arg_0 : texture_2d<u32>;
+
+fn textureLoad_897cf3() {
+  var arg_1 = vec2<u32>();
+  var arg_2 = 1u;
+  var res : vec4<u32> = textureLoad(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_897cf3();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_897cf3();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_897cf3();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/96efd5.wgsl b/test/tint/builtins/gen/var/textureLoad/96efd5.wgsl
new file mode 100644
index 0000000..7dd1032
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/96efd5.wgsl
@@ -0,0 +1,47 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_2d_array<f32>;
+
+// fn textureLoad(texture: texture_2d_array<f32>, coords: vec2<u32>, array_index: u32, level: u32) -> vec4<f32>
+fn textureLoad_96efd5() {
+  var arg_1 = vec2<u32>();
+  var arg_2 = 1u;
+  var arg_3 = 1u;
+  var res: vec4<f32> = textureLoad(arg_0, arg_1, arg_2, arg_3);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_96efd5();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_96efd5();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_96efd5();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/96efd5.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/96efd5.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..06c757a
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/96efd5.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+
+void textureLoad_96efd5() {
+  uint2 arg_1 = (0u).xx;
+  uint arg_2 = 1u;
+  uint arg_3 = 1u;
+  float4 res = arg_0.Load(uint4(uint3(arg_1, arg_2), arg_3));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_96efd5();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_96efd5();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_96efd5();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/96efd5.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/96efd5.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..06c757a
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/96efd5.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+
+void textureLoad_96efd5() {
+  uint2 arg_1 = (0u).xx;
+  uint arg_2 = 1u;
+  uint arg_3 = 1u;
+  float4 res = arg_0.Load(uint4(uint3(arg_1, arg_2), arg_3));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_96efd5();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_96efd5();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_96efd5();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/96efd5.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/96efd5.wgsl.expected.glsl
new file mode 100644
index 0000000..1949301
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/96efd5.wgsl.expected.glsl
@@ -0,0 +1,61 @@
+#version 310 es
+
+uniform highp sampler2DArray arg_0_1;
+void textureLoad_96efd5() {
+  uvec2 arg_1 = uvec2(0u);
+  uint arg_2 = 1u;
+  uint arg_3 = 1u;
+  vec4 res = texelFetch(arg_0_1, ivec3(uvec3(arg_1, arg_2)), int(arg_3));
+}
+
+vec4 vertex_main() {
+  textureLoad_96efd5();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2DArray arg_0_1;
+void textureLoad_96efd5() {
+  uvec2 arg_1 = uvec2(0u);
+  uint arg_2 = 1u;
+  uint arg_3 = 1u;
+  vec4 res = texelFetch(arg_0_1, ivec3(uvec3(arg_1, arg_2)), int(arg_3));
+}
+
+void fragment_main() {
+  textureLoad_96efd5();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp sampler2DArray arg_0_1;
+void textureLoad_96efd5() {
+  uvec2 arg_1 = uvec2(0u);
+  uint arg_2 = 1u;
+  uint arg_3 = 1u;
+  vec4 res = texelFetch(arg_0_1, ivec3(uvec3(arg_1, arg_2)), int(arg_3));
+}
+
+void compute_main() {
+  textureLoad_96efd5();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/96efd5.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/96efd5.wgsl.expected.msl
new file mode 100644
index 0000000..56325e3
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/96efd5.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_96efd5(texture2d_array<float, access::sample> tint_symbol_1) {
+  uint2 arg_1 = uint2(0u);
+  uint arg_2 = 1u;
+  uint arg_3 = 1u;
+  float4 res = tint_symbol_1.read(uint2(arg_1), arg_2, arg_3);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<float, access::sample> tint_symbol_2) {
+  textureLoad_96efd5(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<float, access::sample> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<float, access::sample> tint_symbol_4 [[texture(0)]]) {
+  textureLoad_96efd5(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d_array<float, access::sample> tint_symbol_5 [[texture(0)]]) {
+  textureLoad_96efd5(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/96efd5.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/96efd5.wgsl.expected.spvasm
new file mode 100644
index 0000000..7529e7e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/96efd5.wgsl.expected.spvasm
@@ -0,0 +1,94 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 51
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureLoad_96efd5 "textureLoad_96efd5"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %arg_3 "arg_3"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %12 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+         %18 = OpConstantNull %v2uint
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %24 = OpConstantNull %uint
+     %v3uint = OpTypeVector %uint 3
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+         %37 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_96efd5 = OpFunction %void None %12
+         %15 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v2uint Function %18
+      %arg_2 = OpVariable %_ptr_Function_uint Function %24
+      %arg_3 = OpVariable %_ptr_Function_uint Function %24
+        %res = OpVariable %_ptr_Function_v4float Function %5
+               OpStore %arg_1 %18
+               OpStore %arg_2 %uint_1
+               OpStore %arg_3 %uint_1
+         %27 = OpLoad %11 %arg_0
+         %29 = OpLoad %v2uint %arg_1
+         %30 = OpCompositeExtract %uint %29 0
+         %31 = OpCompositeExtract %uint %29 1
+         %32 = OpLoad %uint %arg_2
+         %33 = OpCompositeConstruct %v3uint %30 %31 %32
+         %34 = OpLoad %uint %arg_3
+         %26 = OpImageFetch %v4float %27 %33 Lod %34
+               OpStore %res %26
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %37
+         %39 = OpLabel
+         %40 = OpFunctionCall %void %textureLoad_96efd5
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+         %42 = OpLabel
+         %43 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %43
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+         %46 = OpLabel
+         %47 = OpFunctionCall %void %textureLoad_96efd5
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %12
+         %49 = OpLabel
+         %50 = OpFunctionCall %void %textureLoad_96efd5
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/96efd5.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/96efd5.wgsl.expected.wgsl
new file mode 100644
index 0000000..1dd4f6c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/96efd5.wgsl.expected.wgsl
@@ -0,0 +1,24 @@
+@group(1) @binding(0) var arg_0 : texture_2d_array<f32>;
+
+fn textureLoad_96efd5() {
+  var arg_1 = vec2<u32>();
+  var arg_2 = 1u;
+  var arg_3 = 1u;
+  var res : vec4<f32> = textureLoad(arg_0, arg_1, arg_2, arg_3);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_96efd5();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_96efd5();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_96efd5();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/9885b0.wgsl b/test/tint/builtins/gen/var/textureLoad/9885b0.wgsl
new file mode 100644
index 0000000..61e56bd
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/9885b0.wgsl
@@ -0,0 +1,47 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_2d_array<i32>;
+
+// fn textureLoad(texture: texture_2d_array<i32>, coords: vec2<u32>, array_index: u32, level: u32) -> vec4<i32>
+fn textureLoad_9885b0() {
+  var arg_1 = vec2<u32>();
+  var arg_2 = 1u;
+  var arg_3 = 1u;
+  var res: vec4<i32> = textureLoad(arg_0, arg_1, arg_2, arg_3);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_9885b0();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_9885b0();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_9885b0();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/9885b0.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/9885b0.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..70b8ef5
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/9885b0.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture2DArray<int4> arg_0 : register(t0, space1);
+
+void textureLoad_9885b0() {
+  uint2 arg_1 = (0u).xx;
+  uint arg_2 = 1u;
+  uint arg_3 = 1u;
+  int4 res = arg_0.Load(uint4(uint3(arg_1, arg_2), arg_3));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_9885b0();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_9885b0();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_9885b0();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/9885b0.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/9885b0.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..70b8ef5
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/9885b0.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture2DArray<int4> arg_0 : register(t0, space1);
+
+void textureLoad_9885b0() {
+  uint2 arg_1 = (0u).xx;
+  uint arg_2 = 1u;
+  uint arg_3 = 1u;
+  int4 res = arg_0.Load(uint4(uint3(arg_1, arg_2), arg_3));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_9885b0();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_9885b0();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_9885b0();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/9885b0.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/9885b0.wgsl.expected.glsl
new file mode 100644
index 0000000..6ecf66c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/9885b0.wgsl.expected.glsl
@@ -0,0 +1,61 @@
+#version 310 es
+
+uniform highp isampler2DArray arg_0_1;
+void textureLoad_9885b0() {
+  uvec2 arg_1 = uvec2(0u);
+  uint arg_2 = 1u;
+  uint arg_3 = 1u;
+  ivec4 res = texelFetch(arg_0_1, ivec3(uvec3(arg_1, arg_2)), int(arg_3));
+}
+
+vec4 vertex_main() {
+  textureLoad_9885b0();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp isampler2DArray arg_0_1;
+void textureLoad_9885b0() {
+  uvec2 arg_1 = uvec2(0u);
+  uint arg_2 = 1u;
+  uint arg_3 = 1u;
+  ivec4 res = texelFetch(arg_0_1, ivec3(uvec3(arg_1, arg_2)), int(arg_3));
+}
+
+void fragment_main() {
+  textureLoad_9885b0();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp isampler2DArray arg_0_1;
+void textureLoad_9885b0() {
+  uvec2 arg_1 = uvec2(0u);
+  uint arg_2 = 1u;
+  uint arg_3 = 1u;
+  ivec4 res = texelFetch(arg_0_1, ivec3(uvec3(arg_1, arg_2)), int(arg_3));
+}
+
+void compute_main() {
+  textureLoad_9885b0();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/9885b0.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/9885b0.wgsl.expected.msl
new file mode 100644
index 0000000..2f75ea8
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/9885b0.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_9885b0(texture2d_array<int, access::sample> tint_symbol_1) {
+  uint2 arg_1 = uint2(0u);
+  uint arg_2 = 1u;
+  uint arg_3 = 1u;
+  int4 res = tint_symbol_1.read(uint2(arg_1), arg_2, arg_3);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<int, access::sample> tint_symbol_2) {
+  textureLoad_9885b0(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<int, access::sample> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<int, access::sample> tint_symbol_4 [[texture(0)]]) {
+  textureLoad_9885b0(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d_array<int, access::sample> tint_symbol_5 [[texture(0)]]) {
+  textureLoad_9885b0(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/9885b0.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/9885b0.wgsl.expected.spvasm
new file mode 100644
index 0000000..6faf53b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/9885b0.wgsl.expected.spvasm
@@ -0,0 +1,97 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 54
+; 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 %textureLoad_9885b0 "textureLoad_9885b0"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %arg_3 "arg_3"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+         %19 = OpConstantNull %v2uint
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %25 = OpConstantNull %uint
+      %v4int = OpTypeVector %int 4
+     %v3uint = OpTypeVector %uint 3
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+         %39 = OpConstantNull %v4int
+         %40 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_9885b0 = OpFunction %void None %13
+         %16 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v2uint Function %19
+      %arg_2 = OpVariable %_ptr_Function_uint Function %25
+      %arg_3 = OpVariable %_ptr_Function_uint Function %25
+        %res = OpVariable %_ptr_Function_v4int Function %39
+               OpStore %arg_1 %19
+               OpStore %arg_2 %uint_1
+               OpStore %arg_3 %uint_1
+         %29 = OpLoad %11 %arg_0
+         %31 = OpLoad %v2uint %arg_1
+         %32 = OpCompositeExtract %uint %31 0
+         %33 = OpCompositeExtract %uint %31 1
+         %34 = OpLoad %uint %arg_2
+         %35 = OpCompositeConstruct %v3uint %32 %33 %34
+         %36 = OpLoad %uint %arg_3
+         %27 = OpImageFetch %v4int %29 %35 Lod %36
+               OpStore %res %27
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %40
+         %42 = OpLabel
+         %43 = OpFunctionCall %void %textureLoad_9885b0
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %45 = OpLabel
+         %46 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %46
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %49 = OpLabel
+         %50 = OpFunctionCall %void %textureLoad_9885b0
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %52 = OpLabel
+         %53 = OpFunctionCall %void %textureLoad_9885b0
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/9885b0.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/9885b0.wgsl.expected.wgsl
new file mode 100644
index 0000000..0ac0400
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/9885b0.wgsl.expected.wgsl
@@ -0,0 +1,24 @@
+@group(1) @binding(0) var arg_0 : texture_2d_array<i32>;
+
+fn textureLoad_9885b0() {
+  var arg_1 = vec2<u32>();
+  var arg_2 = 1u;
+  var arg_3 = 1u;
+  var res : vec4<i32> = textureLoad(arg_0, arg_1, arg_2, arg_3);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_9885b0();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_9885b0();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_9885b0();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/9ed19e.wgsl b/test/tint/builtins/gen/var/textureLoad/9ed19e.wgsl
new file mode 100644
index 0000000..48c2b12
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/9ed19e.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_depth_2d;
+
+// fn textureLoad(texture: texture_depth_2d, coords: vec2<u32>, level: u32) -> f32
+fn textureLoad_9ed19e() {
+  var arg_1 = vec2<u32>();
+  var arg_2 = 1u;
+  var res: f32 = textureLoad(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_9ed19e();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_9ed19e();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_9ed19e();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/9ed19e.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/9ed19e.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..90bb9c3
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/9ed19e.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture2D arg_0 : register(t0, space1);
+
+void textureLoad_9ed19e() {
+  uint2 arg_1 = (0u).xx;
+  uint arg_2 = 1u;
+  float res = arg_0.Load(uint3(arg_1, arg_2)).x;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_9ed19e();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_9ed19e();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_9ed19e();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/9ed19e.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/9ed19e.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..90bb9c3
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/9ed19e.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture2D arg_0 : register(t0, space1);
+
+void textureLoad_9ed19e() {
+  uint2 arg_1 = (0u).xx;
+  uint arg_2 = 1u;
+  float res = arg_0.Load(uint3(arg_1, arg_2)).x;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_9ed19e();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_9ed19e();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_9ed19e();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/9ed19e.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/9ed19e.wgsl.expected.glsl
new file mode 100644
index 0000000..43575c6
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/9ed19e.wgsl.expected.glsl
@@ -0,0 +1,58 @@
+#version 310 es
+
+uniform highp sampler2D arg_0_1;
+void textureLoad_9ed19e() {
+  uvec2 arg_1 = uvec2(0u);
+  uint arg_2 = 1u;
+  float res = texelFetch(arg_0_1, ivec2(arg_1), int(arg_2)).x;
+}
+
+vec4 vertex_main() {
+  textureLoad_9ed19e();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2D arg_0_1;
+void textureLoad_9ed19e() {
+  uvec2 arg_1 = uvec2(0u);
+  uint arg_2 = 1u;
+  float res = texelFetch(arg_0_1, ivec2(arg_1), int(arg_2)).x;
+}
+
+void fragment_main() {
+  textureLoad_9ed19e();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp sampler2D arg_0_1;
+void textureLoad_9ed19e() {
+  uvec2 arg_1 = uvec2(0u);
+  uint arg_2 = 1u;
+  float res = texelFetch(arg_0_1, ivec2(arg_1), int(arg_2)).x;
+}
+
+void compute_main() {
+  textureLoad_9ed19e();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/9ed19e.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/9ed19e.wgsl.expected.msl
new file mode 100644
index 0000000..e85b151
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/9ed19e.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_9ed19e(depth2d<float, access::sample> tint_symbol_1) {
+  uint2 arg_1 = uint2(0u);
+  uint arg_2 = 1u;
+  float res = tint_symbol_1.read(uint2(arg_1), arg_2);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(depth2d<float, access::sample> tint_symbol_2) {
+  textureLoad_9ed19e(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(depth2d<float, access::sample> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(depth2d<float, access::sample> tint_symbol_4 [[texture(0)]]) {
+  textureLoad_9ed19e(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(depth2d<float, access::sample> tint_symbol_5 [[texture(0)]]) {
+  textureLoad_9ed19e(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/9ed19e.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/9ed19e.wgsl.expected.spvasm
new file mode 100644
index 0000000..aa66bcb
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/9ed19e.wgsl.expected.spvasm
@@ -0,0 +1,87 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 46
+; 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 %textureLoad_9ed19e "textureLoad_9ed19e"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %12 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+         %18 = OpConstantNull %v2uint
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %24 = OpConstantNull %uint
+%_ptr_Function_float = OpTypePointer Function %float
+         %32 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_9ed19e = OpFunction %void None %12
+         %15 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v2uint Function %18
+      %arg_2 = OpVariable %_ptr_Function_uint Function %24
+        %res = OpVariable %_ptr_Function_float Function %8
+               OpStore %arg_1 %18
+               OpStore %arg_2 %uint_1
+         %27 = OpLoad %11 %arg_0
+         %28 = OpLoad %v2uint %arg_1
+         %29 = OpLoad %uint %arg_2
+         %26 = OpImageFetch %v4float %27 %28 Lod %29
+         %25 = OpCompositeExtract %float %26 0
+               OpStore %res %25
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %32
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %textureLoad_9ed19e
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+         %37 = OpLabel
+         %38 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %38
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+         %41 = OpLabel
+         %42 = OpFunctionCall %void %textureLoad_9ed19e
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %12
+         %44 = OpLabel
+         %45 = OpFunctionCall %void %textureLoad_9ed19e
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/9ed19e.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/9ed19e.wgsl.expected.wgsl
new file mode 100644
index 0000000..b50d5ff
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/9ed19e.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(0) var arg_0 : texture_depth_2d;
+
+fn textureLoad_9ed19e() {
+  var arg_1 = vec2<u32>();
+  var arg_2 = 1u;
+  var res : f32 = textureLoad(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_9ed19e();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_9ed19e();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_9ed19e();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/bc3201.wgsl b/test/tint/builtins/gen/var/textureLoad/bc3201.wgsl
new file mode 100644
index 0000000..4b2c143
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/bc3201.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_1d<u32>;
+
+// fn textureLoad(texture: texture_1d<u32>, coords: u32, level: u32) -> vec4<u32>
+fn textureLoad_bc3201() {
+  var arg_1 = 1u;
+  var arg_2 = 1u;
+  var res: vec4<u32> = textureLoad(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_bc3201();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_bc3201();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_bc3201();
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/bc3201.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/bc3201.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..36ab4d3
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/bc3201.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture1D<uint4> arg_0 : register(t0, space1);
+
+void textureLoad_bc3201() {
+  uint arg_1 = 1u;
+  uint arg_2 = 1u;
+  uint4 res = arg_0.Load(uint2(arg_1, arg_2));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_bc3201();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_bc3201();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_bc3201();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/bc3201.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/bc3201.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..36ab4d3
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/bc3201.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture1D<uint4> arg_0 : register(t0, space1);
+
+void textureLoad_bc3201() {
+  uint arg_1 = 1u;
+  uint arg_2 = 1u;
+  uint4 res = arg_0.Load(uint2(arg_1, arg_2));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_bc3201();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_bc3201();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_bc3201();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/bc3201.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/bc3201.wgsl.expected.glsl
new file mode 100644
index 0000000..9c502e0
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/bc3201.wgsl.expected.glsl
@@ -0,0 +1,81 @@
+SKIP: FAILED
+
+#version 310 es
+
+uniform highp usampler1D arg_0_1;
+void textureLoad_bc3201() {
+  uint arg_1 = 1u;
+  uint arg_2 = 1u;
+  uvec4 res = texelFetch(arg_0_1, int(arg_1), int(arg_2));
+}
+
+vec4 vertex_main() {
+  textureLoad_bc3201();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'usampler1D' : Reserved word. 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+uniform highp usampler1D arg_0_1;
+void textureLoad_bc3201() {
+  uint arg_1 = 1u;
+  uint arg_2 = 1u;
+  uvec4 res = texelFetch(arg_0_1, int(arg_1), int(arg_2));
+}
+
+void fragment_main() {
+  textureLoad_bc3201();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'usampler1D' : Reserved word. 
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+uniform highp usampler1D arg_0_1;
+void textureLoad_bc3201() {
+  uint arg_1 = 1u;
+  uint arg_2 = 1u;
+  uvec4 res = texelFetch(arg_0_1, int(arg_1), int(arg_2));
+}
+
+void compute_main() {
+  textureLoad_bc3201();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'usampler1D' : Reserved word. 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureLoad/bc3201.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/bc3201.wgsl.expected.msl
new file mode 100644
index 0000000..3f5c7f1
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/bc3201.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_bc3201(texture1d<uint, access::sample> tint_symbol_1) {
+  uint arg_1 = 1u;
+  uint arg_2 = 1u;
+  uint4 res = tint_symbol_1.read(uint(arg_1), 0);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<uint, access::sample> tint_symbol_2) {
+  textureLoad_bc3201(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<uint, access::sample> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<uint, access::sample> tint_symbol_4 [[texture(0)]]) {
+  textureLoad_bc3201(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture1d<uint, access::sample> tint_symbol_5 [[texture(0)]]) {
+  textureLoad_bc3201(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureLoad/bc3201.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/bc3201.wgsl.expected.spvasm
new file mode 100644
index 0000000..393bb93
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/bc3201.wgsl.expected.spvasm
@@ -0,0 +1,86 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 44
+; Schema: 0
+               OpCapability Shader
+               OpCapability Sampled1D
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureLoad_bc3201 "textureLoad_bc3201"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 1D 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %20 = OpConstantNull %uint
+     %v4uint = OpTypeVector %uint 4
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+         %29 = OpConstantNull %v4uint
+         %30 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_bc3201 = OpFunction %void None %13
+         %16 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_uint Function %20
+      %arg_2 = OpVariable %_ptr_Function_uint Function %20
+        %res = OpVariable %_ptr_Function_v4uint Function %29
+               OpStore %arg_1 %uint_1
+               OpStore %arg_2 %uint_1
+         %24 = OpLoad %11 %arg_0
+         %25 = OpLoad %uint %arg_1
+         %26 = OpLoad %uint %arg_2
+         %22 = OpImageFetch %v4uint %24 %25 Lod %26
+               OpStore %res %22
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %30
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %textureLoad_bc3201
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %35 = OpLabel
+         %36 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %36
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %39 = OpLabel
+         %40 = OpFunctionCall %void %textureLoad_bc3201
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %42 = OpLabel
+         %43 = OpFunctionCall %void %textureLoad_bc3201
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/bc3201.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/bc3201.wgsl.expected.wgsl
new file mode 100644
index 0000000..0d810d1
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureLoad/bc3201.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(0) var arg_0 : texture_1d<u32>;
+
+fn textureLoad_bc3201() {
+  var arg_1 = 1u;
+  var arg_2 = 1u;
+  var res : vec4<u32> = textureLoad(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_bc3201();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_bc3201();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_bc3201();
+}
diff --git a/test/tint/builtins/gen/var/textureSample/193203.wgsl b/test/tint/builtins/gen/var/textureSample/193203.wgsl
new file mode 100644
index 0000000..5531467
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSample/193203.wgsl
@@ -0,0 +1,37 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_2d_array<f32>;
+@group(1) @binding(1) var arg_1: sampler;
+
+// fn textureSample(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: u32, @const offset: vec2<i32>) -> vec4<f32>
+fn textureSample_193203() {
+  var arg_2 = vec2<f32>();
+  var arg_3 = 1u;
+  const arg_4 = vec2<i32>();
+  var res: vec4<f32> = textureSample(arg_0, arg_1, arg_2, arg_3, arg_4);
+}
+
+@fragment
+fn fragment_main() {
+  textureSample_193203();
+}
diff --git a/test/tint/builtins/gen/var/textureSample/193203.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSample/193203.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..c60f2c0
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSample/193203.wgsl.expected.dxc.hlsl
@@ -0,0 +1,13 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSample_193203() {
+  float2 arg_2 = (0.0f).xx;
+  uint arg_3 = 1u;
+  float4 res = arg_0.Sample(arg_1, float3(arg_2, float(arg_3)), (0).xx);
+}
+
+void fragment_main() {
+  textureSample_193203();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureSample/193203.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSample/193203.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..c60f2c0
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSample/193203.wgsl.expected.fxc.hlsl
@@ -0,0 +1,13 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSample_193203() {
+  float2 arg_2 = (0.0f).xx;
+  uint arg_3 = 1u;
+  float4 res = arg_0.Sample(arg_1, float3(arg_2, float(arg_3)), (0).xx);
+}
+
+void fragment_main() {
+  textureSample_193203();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureSample/193203.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSample/193203.wgsl.expected.glsl
new file mode 100644
index 0000000..4c0e571
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSample/193203.wgsl.expected.glsl
@@ -0,0 +1,19 @@
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2DArray arg_0_arg_1;
+
+void textureSample_193203() {
+  vec2 arg_2 = vec2(0.0f);
+  uint arg_3 = 1u;
+  vec4 res = textureOffset(arg_0_arg_1, vec3(arg_2, float(arg_3)), ivec2(0));
+}
+
+void fragment_main() {
+  textureSample_193203();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureSample/193203.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSample/193203.wgsl.expected.msl
new file mode 100644
index 0000000..ffe8266
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSample/193203.wgsl.expected.msl
@@ -0,0 +1,14 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureSample_193203(texture2d_array<float, access::sample> tint_symbol, sampler tint_symbol_1) {
+  float2 arg_2 = float2(0.0f);
+  uint arg_3 = 1u;
+  float4 res = tint_symbol.sample(tint_symbol_1, arg_2, arg_3, int2(0));
+}
+
+fragment void fragment_main(texture2d_array<float, access::sample> tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) {
+  textureSample_193203(tint_symbol_2, tint_symbol_3);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureSample/193203.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSample/193203.wgsl.expected.spvasm
new file mode 100644
index 0000000..bfa4c0d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSample/193203.wgsl.expected.spvasm
@@ -0,0 +1,69 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 43
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpName %arg_0 "arg_0"
+               OpName %arg_1 "arg_1"
+               OpName %textureSample_193203 "textureSample_193203"
+               OpName %arg_2 "arg_2"
+               OpName %arg_3 "arg_3"
+               OpName %res "res"
+               OpName %fragment_main "fragment_main"
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %arg_1 DescriptorSet 1
+               OpDecorate %arg_1 Binding 1
+      %float = OpTypeFloat 32
+          %3 = OpTypeImage %float 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_3 = OpTypePointer UniformConstant %3
+      %arg_0 = OpVariable %_ptr_UniformConstant_3 UniformConstant
+          %7 = OpTypeSampler
+%_ptr_UniformConstant_7 = OpTypePointer UniformConstant %7
+      %arg_1 = OpVariable %_ptr_UniformConstant_7 UniformConstant
+       %void = OpTypeVoid
+          %8 = OpTypeFunction %void
+    %v2float = OpTypeVector %float 2
+         %13 = OpConstantNull %v2float
+%_ptr_Function_v2float = OpTypePointer Function %v2float
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %20 = OpConstantNull %uint
+    %v4float = OpTypeVector %float 4
+         %25 = OpTypeSampledImage %3
+    %v3float = OpTypeVector %float 3
+        %int = OpTypeInt 32 1
+      %v2int = OpTypeVector %int 2
+         %36 = OpConstantNull %v2int
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+         %39 = OpConstantNull %v4float
+%textureSample_193203 = OpFunction %void None %8
+         %11 = OpLabel
+      %arg_2 = OpVariable %_ptr_Function_v2float Function %13
+      %arg_3 = OpVariable %_ptr_Function_uint Function %20
+        %res = OpVariable %_ptr_Function_v4float Function %39
+               OpStore %arg_2 %13
+               OpStore %arg_3 %uint_1
+         %23 = OpLoad %7 %arg_1
+         %24 = OpLoad %3 %arg_0
+         %26 = OpSampledImage %25 %24 %23
+         %28 = OpLoad %v2float %arg_2
+         %29 = OpCompositeExtract %float %28 0
+         %30 = OpCompositeExtract %float %28 1
+         %32 = OpLoad %uint %arg_3
+         %31 = OpConvertUToF %float %32
+         %33 = OpCompositeConstruct %v3float %29 %30 %31
+         %21 = OpImageSampleImplicitLod %v4float %26 %33 ConstOffset %36
+               OpStore %res %21
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %8
+         %41 = OpLabel
+         %42 = OpFunctionCall %void %textureSample_193203
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureSample/193203.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSample/193203.wgsl.expected.wgsl
new file mode 100644
index 0000000..0060bd1
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSample/193203.wgsl.expected.wgsl
@@ -0,0 +1,15 @@
+@group(1) @binding(0) var arg_0 : texture_2d_array<f32>;
+
+@group(1) @binding(1) var arg_1 : sampler;
+
+fn textureSample_193203() {
+  var arg_2 = vec2<f32>();
+  var arg_3 = 1u;
+  const arg_4 = vec2<i32>();
+  var res : vec4<f32> = textureSample(arg_0, arg_1, arg_2, arg_3, arg_4);
+}
+
+@fragment
+fn fragment_main() {
+  textureSample_193203();
+}
diff --git a/test/tint/builtins/gen/var/textureSample/1a4e1b.wgsl b/test/tint/builtins/gen/var/textureSample/1a4e1b.wgsl
new file mode 100644
index 0000000..b4f2ced
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSample/1a4e1b.wgsl
@@ -0,0 +1,36 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_depth_2d_array;
+@group(1) @binding(1) var arg_1: sampler;
+
+// fn textureSample(texture: texture_depth_2d_array, sampler: sampler, coords: vec2<f32>, array_index: u32) -> f32
+fn textureSample_1a4e1b() {
+  var arg_2 = vec2<f32>();
+  var arg_3 = 1u;
+  var res: f32 = textureSample(arg_0, arg_1, arg_2, arg_3);
+}
+
+@fragment
+fn fragment_main() {
+  textureSample_1a4e1b();
+}
diff --git a/test/tint/builtins/gen/var/textureSample/1a4e1b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSample/1a4e1b.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..8e8c108
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSample/1a4e1b.wgsl.expected.dxc.hlsl
@@ -0,0 +1,13 @@
+Texture2DArray arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSample_1a4e1b() {
+  float2 arg_2 = (0.0f).xx;
+  uint arg_3 = 1u;
+  float res = arg_0.Sample(arg_1, float3(arg_2, float(arg_3))).x;
+}
+
+void fragment_main() {
+  textureSample_1a4e1b();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureSample/1a4e1b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSample/1a4e1b.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..8e8c108
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSample/1a4e1b.wgsl.expected.fxc.hlsl
@@ -0,0 +1,13 @@
+Texture2DArray arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSample_1a4e1b() {
+  float2 arg_2 = (0.0f).xx;
+  uint arg_3 = 1u;
+  float res = arg_0.Sample(arg_1, float3(arg_2, float(arg_3))).x;
+}
+
+void fragment_main() {
+  textureSample_1a4e1b();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureSample/1a4e1b.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSample/1a4e1b.wgsl.expected.glsl
new file mode 100644
index 0000000..732d16f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSample/1a4e1b.wgsl.expected.glsl
@@ -0,0 +1,19 @@
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2DArrayShadow arg_0_arg_1;
+
+void textureSample_1a4e1b() {
+  vec2 arg_2 = vec2(0.0f);
+  uint arg_3 = 1u;
+  float res = texture(arg_0_arg_1, vec4(vec3(arg_2, float(arg_3)), 0.0f));
+}
+
+void fragment_main() {
+  textureSample_1a4e1b();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureSample/1a4e1b.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSample/1a4e1b.wgsl.expected.msl
new file mode 100644
index 0000000..f7bc435
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSample/1a4e1b.wgsl.expected.msl
@@ -0,0 +1,14 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureSample_1a4e1b(depth2d_array<float, access::sample> tint_symbol, sampler tint_symbol_1) {
+  float2 arg_2 = float2(0.0f);
+  uint arg_3 = 1u;
+  float res = tint_symbol.sample(tint_symbol_1, arg_2, arg_3);
+}
+
+fragment void fragment_main(depth2d_array<float, access::sample> tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) {
+  textureSample_1a4e1b(tint_symbol_2, tint_symbol_3);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureSample/1a4e1b.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSample/1a4e1b.wgsl.expected.spvasm
new file mode 100644
index 0000000..c89531b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSample/1a4e1b.wgsl.expected.spvasm
@@ -0,0 +1,67 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 41
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpName %arg_0 "arg_0"
+               OpName %arg_1 "arg_1"
+               OpName %textureSample_1a4e1b "textureSample_1a4e1b"
+               OpName %arg_2 "arg_2"
+               OpName %arg_3 "arg_3"
+               OpName %res "res"
+               OpName %fragment_main "fragment_main"
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %arg_1 DescriptorSet 1
+               OpDecorate %arg_1 Binding 1
+      %float = OpTypeFloat 32
+          %3 = OpTypeImage %float 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_3 = OpTypePointer UniformConstant %3
+      %arg_0 = OpVariable %_ptr_UniformConstant_3 UniformConstant
+          %7 = OpTypeSampler
+%_ptr_UniformConstant_7 = OpTypePointer UniformConstant %7
+      %arg_1 = OpVariable %_ptr_UniformConstant_7 UniformConstant
+       %void = OpTypeVoid
+          %8 = OpTypeFunction %void
+    %v2float = OpTypeVector %float 2
+         %13 = OpConstantNull %v2float
+%_ptr_Function_v2float = OpTypePointer Function %v2float
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %20 = OpConstantNull %uint
+    %v4float = OpTypeVector %float 4
+         %26 = OpTypeSampledImage %3
+    %v3float = OpTypeVector %float 3
+%_ptr_Function_float = OpTypePointer Function %float
+         %37 = OpConstantNull %float
+%textureSample_1a4e1b = OpFunction %void None %8
+         %11 = OpLabel
+      %arg_2 = OpVariable %_ptr_Function_v2float Function %13
+      %arg_3 = OpVariable %_ptr_Function_uint Function %20
+        %res = OpVariable %_ptr_Function_float Function %37
+               OpStore %arg_2 %13
+               OpStore %arg_3 %uint_1
+         %24 = OpLoad %7 %arg_1
+         %25 = OpLoad %3 %arg_0
+         %27 = OpSampledImage %26 %25 %24
+         %29 = OpLoad %v2float %arg_2
+         %30 = OpCompositeExtract %float %29 0
+         %31 = OpCompositeExtract %float %29 1
+         %33 = OpLoad %uint %arg_3
+         %32 = OpConvertUToF %float %33
+         %34 = OpCompositeConstruct %v3float %30 %31 %32
+         %22 = OpImageSampleImplicitLod %v4float %27 %34
+         %21 = OpCompositeExtract %float %22 0
+               OpStore %res %21
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %8
+         %39 = OpLabel
+         %40 = OpFunctionCall %void %textureSample_1a4e1b
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureSample/1a4e1b.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSample/1a4e1b.wgsl.expected.wgsl
new file mode 100644
index 0000000..3b49da8
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSample/1a4e1b.wgsl.expected.wgsl
@@ -0,0 +1,14 @@
+@group(1) @binding(0) var arg_0 : texture_depth_2d_array;
+
+@group(1) @binding(1) var arg_1 : sampler;
+
+fn textureSample_1a4e1b() {
+  var arg_2 = vec2<f32>();
+  var arg_3 = 1u;
+  var res : f32 = textureSample(arg_0, arg_1, arg_2, arg_3);
+}
+
+@fragment
+fn fragment_main() {
+  textureSample_1a4e1b();
+}
diff --git a/test/tint/builtins/gen/var/textureSample/4703d0.wgsl b/test/tint/builtins/gen/var/textureSample/4703d0.wgsl
new file mode 100644
index 0000000..96ff918
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSample/4703d0.wgsl
@@ -0,0 +1,37 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_depth_2d_array;
+@group(1) @binding(1) var arg_1: sampler;
+
+// fn textureSample(texture: texture_depth_2d_array, sampler: sampler, coords: vec2<f32>, array_index: u32, @const offset: vec2<i32>) -> f32
+fn textureSample_4703d0() {
+  var arg_2 = vec2<f32>();
+  var arg_3 = 1u;
+  const arg_4 = vec2<i32>();
+  var res: f32 = textureSample(arg_0, arg_1, arg_2, arg_3, arg_4);
+}
+
+@fragment
+fn fragment_main() {
+  textureSample_4703d0();
+}
diff --git a/test/tint/builtins/gen/var/textureSample/4703d0.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSample/4703d0.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..3761e5a
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSample/4703d0.wgsl.expected.dxc.hlsl
@@ -0,0 +1,13 @@
+Texture2DArray arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSample_4703d0() {
+  float2 arg_2 = (0.0f).xx;
+  uint arg_3 = 1u;
+  float res = arg_0.Sample(arg_1, float3(arg_2, float(arg_3)), (0).xx).x;
+}
+
+void fragment_main() {
+  textureSample_4703d0();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureSample/4703d0.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSample/4703d0.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..3761e5a
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSample/4703d0.wgsl.expected.fxc.hlsl
@@ -0,0 +1,13 @@
+Texture2DArray arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSample_4703d0() {
+  float2 arg_2 = (0.0f).xx;
+  uint arg_3 = 1u;
+  float res = arg_0.Sample(arg_1, float3(arg_2, float(arg_3)), (0).xx).x;
+}
+
+void fragment_main() {
+  textureSample_4703d0();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureSample/4703d0.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSample/4703d0.wgsl.expected.glsl
new file mode 100644
index 0000000..fc371e2
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSample/4703d0.wgsl.expected.glsl
@@ -0,0 +1,28 @@
+SKIP: FAILED
+
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2DArrayShadow arg_0_arg_1;
+
+void textureSample_4703d0() {
+  vec2 arg_2 = vec2(0.0f);
+  uint arg_3 = 1u;
+  float res = textureOffset(arg_0_arg_1, vec4(vec3(arg_2, float(arg_3)), 0.0f), ivec2(0));
+}
+
+void fragment_main() {
+  textureSample_4703d0();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:9: 'sampler' : TextureOffset does not support sampler2DArrayShadow :  ES Profile
+ERROR: 0:9: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureSample/4703d0.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSample/4703d0.wgsl.expected.msl
new file mode 100644
index 0000000..77d8949
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSample/4703d0.wgsl.expected.msl
@@ -0,0 +1,14 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureSample_4703d0(depth2d_array<float, access::sample> tint_symbol, sampler tint_symbol_1) {
+  float2 arg_2 = float2(0.0f);
+  uint arg_3 = 1u;
+  float res = tint_symbol.sample(tint_symbol_1, arg_2, arg_3, int2(0));
+}
+
+fragment void fragment_main(depth2d_array<float, access::sample> tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) {
+  textureSample_4703d0(tint_symbol_2, tint_symbol_3);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureSample/4703d0.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSample/4703d0.wgsl.expected.spvasm
new file mode 100644
index 0000000..ed2182b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSample/4703d0.wgsl.expected.spvasm
@@ -0,0 +1,70 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 44
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpName %arg_0 "arg_0"
+               OpName %arg_1 "arg_1"
+               OpName %textureSample_4703d0 "textureSample_4703d0"
+               OpName %arg_2 "arg_2"
+               OpName %arg_3 "arg_3"
+               OpName %res "res"
+               OpName %fragment_main "fragment_main"
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %arg_1 DescriptorSet 1
+               OpDecorate %arg_1 Binding 1
+      %float = OpTypeFloat 32
+          %3 = OpTypeImage %float 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_3 = OpTypePointer UniformConstant %3
+      %arg_0 = OpVariable %_ptr_UniformConstant_3 UniformConstant
+          %7 = OpTypeSampler
+%_ptr_UniformConstant_7 = OpTypePointer UniformConstant %7
+      %arg_1 = OpVariable %_ptr_UniformConstant_7 UniformConstant
+       %void = OpTypeVoid
+          %8 = OpTypeFunction %void
+    %v2float = OpTypeVector %float 2
+         %13 = OpConstantNull %v2float
+%_ptr_Function_v2float = OpTypePointer Function %v2float
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %20 = OpConstantNull %uint
+    %v4float = OpTypeVector %float 4
+         %26 = OpTypeSampledImage %3
+    %v3float = OpTypeVector %float 3
+        %int = OpTypeInt 32 1
+      %v2int = OpTypeVector %int 2
+         %37 = OpConstantNull %v2int
+%_ptr_Function_float = OpTypePointer Function %float
+         %40 = OpConstantNull %float
+%textureSample_4703d0 = OpFunction %void None %8
+         %11 = OpLabel
+      %arg_2 = OpVariable %_ptr_Function_v2float Function %13
+      %arg_3 = OpVariable %_ptr_Function_uint Function %20
+        %res = OpVariable %_ptr_Function_float Function %40
+               OpStore %arg_2 %13
+               OpStore %arg_3 %uint_1
+         %24 = OpLoad %7 %arg_1
+         %25 = OpLoad %3 %arg_0
+         %27 = OpSampledImage %26 %25 %24
+         %29 = OpLoad %v2float %arg_2
+         %30 = OpCompositeExtract %float %29 0
+         %31 = OpCompositeExtract %float %29 1
+         %33 = OpLoad %uint %arg_3
+         %32 = OpConvertUToF %float %33
+         %34 = OpCompositeConstruct %v3float %30 %31 %32
+         %22 = OpImageSampleImplicitLod %v4float %27 %34 ConstOffset %37
+         %21 = OpCompositeExtract %float %22 0
+               OpStore %res %21
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %8
+         %42 = OpLabel
+         %43 = OpFunctionCall %void %textureSample_4703d0
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureSample/4703d0.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSample/4703d0.wgsl.expected.wgsl
new file mode 100644
index 0000000..00781e5
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSample/4703d0.wgsl.expected.wgsl
@@ -0,0 +1,15 @@
+@group(1) @binding(0) var arg_0 : texture_depth_2d_array;
+
+@group(1) @binding(1) var arg_1 : sampler;
+
+fn textureSample_4703d0() {
+  var arg_2 = vec2<f32>();
+  var arg_3 = 1u;
+  const arg_4 = vec2<i32>();
+  var res : f32 = textureSample(arg_0, arg_1, arg_2, arg_3, arg_4);
+}
+
+@fragment
+fn fragment_main() {
+  textureSample_4703d0();
+}
diff --git a/test/tint/builtins/gen/var/textureSample/7fd8cb.wgsl b/test/tint/builtins/gen/var/textureSample/7fd8cb.wgsl
new file mode 100644
index 0000000..a31832c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSample/7fd8cb.wgsl
@@ -0,0 +1,36 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_depth_cube_array;
+@group(1) @binding(1) var arg_1: sampler;
+
+// fn textureSample(texture: texture_depth_cube_array, sampler: sampler, coords: vec3<f32>, array_index: u32) -> f32
+fn textureSample_7fd8cb() {
+  var arg_2 = vec3<f32>();
+  var arg_3 = 1u;
+  var res: f32 = textureSample(arg_0, arg_1, arg_2, arg_3);
+}
+
+@fragment
+fn fragment_main() {
+  textureSample_7fd8cb();
+}
diff --git a/test/tint/builtins/gen/var/textureSample/7fd8cb.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSample/7fd8cb.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..ddbeb1a
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSample/7fd8cb.wgsl.expected.dxc.hlsl
@@ -0,0 +1,13 @@
+TextureCubeArray arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSample_7fd8cb() {
+  float3 arg_2 = (0.0f).xxx;
+  uint arg_3 = 1u;
+  float res = arg_0.Sample(arg_1, float4(arg_2, float(arg_3))).x;
+}
+
+void fragment_main() {
+  textureSample_7fd8cb();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureSample/7fd8cb.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSample/7fd8cb.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..ddbeb1a
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSample/7fd8cb.wgsl.expected.fxc.hlsl
@@ -0,0 +1,13 @@
+TextureCubeArray arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSample_7fd8cb() {
+  float3 arg_2 = (0.0f).xxx;
+  uint arg_3 = 1u;
+  float res = arg_0.Sample(arg_1, float4(arg_2, float(arg_3))).x;
+}
+
+void fragment_main() {
+  textureSample_7fd8cb();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureSample/7fd8cb.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSample/7fd8cb.wgsl.expected.glsl
new file mode 100644
index 0000000..d95de69
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSample/7fd8cb.wgsl.expected.glsl
@@ -0,0 +1,28 @@
+SKIP: FAILED
+
+#version 310 es
+precision mediump float;
+
+uniform highp samplerCubeArrayShadow arg_0_arg_1;
+
+void textureSample_7fd8cb() {
+  vec3 arg_2 = vec3(0.0f);
+  uint arg_3 = 1u;
+  float res = texture(arg_0_arg_1, vec4(arg_2, float(arg_3)), 0.0f);
+}
+
+void fragment_main() {
+  textureSample_7fd8cb();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'samplerCubeArrayShadow' : Reserved word. 
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureSample/7fd8cb.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSample/7fd8cb.wgsl.expected.msl
new file mode 100644
index 0000000..80016e7
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSample/7fd8cb.wgsl.expected.msl
@@ -0,0 +1,14 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureSample_7fd8cb(depthcube_array<float, access::sample> tint_symbol, sampler tint_symbol_1) {
+  float3 arg_2 = float3(0.0f);
+  uint arg_3 = 1u;
+  float res = tint_symbol.sample(tint_symbol_1, arg_2, arg_3);
+}
+
+fragment void fragment_main(depthcube_array<float, access::sample> tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) {
+  textureSample_7fd8cb(tint_symbol_2, tint_symbol_3);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureSample/7fd8cb.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSample/7fd8cb.wgsl.expected.spvasm
new file mode 100644
index 0000000..962925e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSample/7fd8cb.wgsl.expected.spvasm
@@ -0,0 +1,68 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 41
+; Schema: 0
+               OpCapability Shader
+               OpCapability SampledCubeArray
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpName %arg_0 "arg_0"
+               OpName %arg_1 "arg_1"
+               OpName %textureSample_7fd8cb "textureSample_7fd8cb"
+               OpName %arg_2 "arg_2"
+               OpName %arg_3 "arg_3"
+               OpName %res "res"
+               OpName %fragment_main "fragment_main"
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %arg_1 DescriptorSet 1
+               OpDecorate %arg_1 Binding 1
+      %float = OpTypeFloat 32
+          %3 = OpTypeImage %float Cube 0 1 0 1 Unknown
+%_ptr_UniformConstant_3 = OpTypePointer UniformConstant %3
+      %arg_0 = OpVariable %_ptr_UniformConstant_3 UniformConstant
+          %7 = OpTypeSampler
+%_ptr_UniformConstant_7 = OpTypePointer UniformConstant %7
+      %arg_1 = OpVariable %_ptr_UniformConstant_7 UniformConstant
+       %void = OpTypeVoid
+          %8 = OpTypeFunction %void
+    %v3float = OpTypeVector %float 3
+         %13 = OpConstantNull %v3float
+%_ptr_Function_v3float = OpTypePointer Function %v3float
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %20 = OpConstantNull %uint
+    %v4float = OpTypeVector %float 4
+         %26 = OpTypeSampledImage %3
+%_ptr_Function_float = OpTypePointer Function %float
+         %37 = OpConstantNull %float
+%textureSample_7fd8cb = OpFunction %void None %8
+         %11 = OpLabel
+      %arg_2 = OpVariable %_ptr_Function_v3float Function %13
+      %arg_3 = OpVariable %_ptr_Function_uint Function %20
+        %res = OpVariable %_ptr_Function_float Function %37
+               OpStore %arg_2 %13
+               OpStore %arg_3 %uint_1
+         %24 = OpLoad %7 %arg_1
+         %25 = OpLoad %3 %arg_0
+         %27 = OpSampledImage %26 %25 %24
+         %28 = OpLoad %v3float %arg_2
+         %29 = OpCompositeExtract %float %28 0
+         %30 = OpCompositeExtract %float %28 1
+         %31 = OpCompositeExtract %float %28 2
+         %33 = OpLoad %uint %arg_3
+         %32 = OpConvertUToF %float %33
+         %34 = OpCompositeConstruct %v4float %29 %30 %31 %32
+         %22 = OpImageSampleImplicitLod %v4float %27 %34
+         %21 = OpCompositeExtract %float %22 0
+               OpStore %res %21
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %8
+         %39 = OpLabel
+         %40 = OpFunctionCall %void %textureSample_7fd8cb
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureSample/7fd8cb.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSample/7fd8cb.wgsl.expected.wgsl
new file mode 100644
index 0000000..6ed7b4c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSample/7fd8cb.wgsl.expected.wgsl
@@ -0,0 +1,14 @@
+@group(1) @binding(0) var arg_0 : texture_depth_cube_array;
+
+@group(1) @binding(1) var arg_1 : sampler;
+
+fn textureSample_7fd8cb() {
+  var arg_2 = vec3<f32>();
+  var arg_3 = 1u;
+  var res : f32 = textureSample(arg_0, arg_1, arg_2, arg_3);
+}
+
+@fragment
+fn fragment_main() {
+  textureSample_7fd8cb();
+}
diff --git a/test/tint/builtins/gen/var/textureSample/bc7477.wgsl b/test/tint/builtins/gen/var/textureSample/bc7477.wgsl
new file mode 100644
index 0000000..6f0116e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSample/bc7477.wgsl
@@ -0,0 +1,36 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_cube_array<f32>;
+@group(1) @binding(1) var arg_1: sampler;
+
+// fn textureSample(texture: texture_cube_array<f32>, sampler: sampler, coords: vec3<f32>, array_index: u32) -> vec4<f32>
+fn textureSample_bc7477() {
+  var arg_2 = vec3<f32>();
+  var arg_3 = 1u;
+  var res: vec4<f32> = textureSample(arg_0, arg_1, arg_2, arg_3);
+}
+
+@fragment
+fn fragment_main() {
+  textureSample_bc7477();
+}
diff --git a/test/tint/builtins/gen/var/textureSample/bc7477.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSample/bc7477.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..5ef25be
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSample/bc7477.wgsl.expected.dxc.hlsl
@@ -0,0 +1,13 @@
+TextureCubeArray<float4> arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSample_bc7477() {
+  float3 arg_2 = (0.0f).xxx;
+  uint arg_3 = 1u;
+  float4 res = arg_0.Sample(arg_1, float4(arg_2, float(arg_3)));
+}
+
+void fragment_main() {
+  textureSample_bc7477();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureSample/bc7477.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSample/bc7477.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..5ef25be
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSample/bc7477.wgsl.expected.fxc.hlsl
@@ -0,0 +1,13 @@
+TextureCubeArray<float4> arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSample_bc7477() {
+  float3 arg_2 = (0.0f).xxx;
+  uint arg_3 = 1u;
+  float4 res = arg_0.Sample(arg_1, float4(arg_2, float(arg_3)));
+}
+
+void fragment_main() {
+  textureSample_bc7477();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureSample/bc7477.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSample/bc7477.wgsl.expected.glsl
new file mode 100644
index 0000000..1354303
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSample/bc7477.wgsl.expected.glsl
@@ -0,0 +1,28 @@
+SKIP: FAILED
+
+#version 310 es
+precision mediump float;
+
+uniform highp samplerCubeArray arg_0_arg_1;
+
+void textureSample_bc7477() {
+  vec3 arg_2 = vec3(0.0f);
+  uint arg_3 = 1u;
+  vec4 res = texture(arg_0_arg_1, vec4(arg_2, float(arg_3)));
+}
+
+void fragment_main() {
+  textureSample_bc7477();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'samplerCubeArray' : Reserved word. 
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureSample/bc7477.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSample/bc7477.wgsl.expected.msl
new file mode 100644
index 0000000..8b3614e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSample/bc7477.wgsl.expected.msl
@@ -0,0 +1,14 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureSample_bc7477(texturecube_array<float, access::sample> tint_symbol, sampler tint_symbol_1) {
+  float3 arg_2 = float3(0.0f);
+  uint arg_3 = 1u;
+  float4 res = tint_symbol.sample(tint_symbol_1, arg_2, arg_3);
+}
+
+fragment void fragment_main(texturecube_array<float, access::sample> tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) {
+  textureSample_bc7477(tint_symbol_2, tint_symbol_3);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureSample/bc7477.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSample/bc7477.wgsl.expected.spvasm
new file mode 100644
index 0000000..4a09842
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSample/bc7477.wgsl.expected.spvasm
@@ -0,0 +1,67 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 40
+; Schema: 0
+               OpCapability Shader
+               OpCapability SampledCubeArray
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpName %arg_0 "arg_0"
+               OpName %arg_1 "arg_1"
+               OpName %textureSample_bc7477 "textureSample_bc7477"
+               OpName %arg_2 "arg_2"
+               OpName %arg_3 "arg_3"
+               OpName %res "res"
+               OpName %fragment_main "fragment_main"
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %arg_1 DescriptorSet 1
+               OpDecorate %arg_1 Binding 1
+      %float = OpTypeFloat 32
+          %3 = OpTypeImage %float Cube 0 1 0 1 Unknown
+%_ptr_UniformConstant_3 = OpTypePointer UniformConstant %3
+      %arg_0 = OpVariable %_ptr_UniformConstant_3 UniformConstant
+          %7 = OpTypeSampler
+%_ptr_UniformConstant_7 = OpTypePointer UniformConstant %7
+      %arg_1 = OpVariable %_ptr_UniformConstant_7 UniformConstant
+       %void = OpTypeVoid
+          %8 = OpTypeFunction %void
+    %v3float = OpTypeVector %float 3
+         %13 = OpConstantNull %v3float
+%_ptr_Function_v3float = OpTypePointer Function %v3float
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %20 = OpConstantNull %uint
+    %v4float = OpTypeVector %float 4
+         %25 = OpTypeSampledImage %3
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+         %36 = OpConstantNull %v4float
+%textureSample_bc7477 = OpFunction %void None %8
+         %11 = OpLabel
+      %arg_2 = OpVariable %_ptr_Function_v3float Function %13
+      %arg_3 = OpVariable %_ptr_Function_uint Function %20
+        %res = OpVariable %_ptr_Function_v4float Function %36
+               OpStore %arg_2 %13
+               OpStore %arg_3 %uint_1
+         %23 = OpLoad %7 %arg_1
+         %24 = OpLoad %3 %arg_0
+         %26 = OpSampledImage %25 %24 %23
+         %27 = OpLoad %v3float %arg_2
+         %28 = OpCompositeExtract %float %27 0
+         %29 = OpCompositeExtract %float %27 1
+         %30 = OpCompositeExtract %float %27 2
+         %32 = OpLoad %uint %arg_3
+         %31 = OpConvertUToF %float %32
+         %33 = OpCompositeConstruct %v4float %28 %29 %30 %31
+         %21 = OpImageSampleImplicitLod %v4float %26 %33
+               OpStore %res %21
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %8
+         %38 = OpLabel
+         %39 = OpFunctionCall %void %textureSample_bc7477
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureSample/bc7477.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSample/bc7477.wgsl.expected.wgsl
new file mode 100644
index 0000000..48a05ae
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSample/bc7477.wgsl.expected.wgsl
@@ -0,0 +1,14 @@
+@group(1) @binding(0) var arg_0 : texture_cube_array<f32>;
+
+@group(1) @binding(1) var arg_1 : sampler;
+
+fn textureSample_bc7477() {
+  var arg_2 = vec3<f32>();
+  var arg_3 = 1u;
+  var res : vec4<f32> = textureSample(arg_0, arg_1, arg_2, arg_3);
+}
+
+@fragment
+fn fragment_main() {
+  textureSample_bc7477();
+}
diff --git a/test/tint/builtins/gen/var/textureSample/d6b281.wgsl b/test/tint/builtins/gen/var/textureSample/d6b281.wgsl
new file mode 100644
index 0000000..653e5a4
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSample/d6b281.wgsl
@@ -0,0 +1,36 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_2d_array<f32>;
+@group(1) @binding(1) var arg_1: sampler;
+
+// fn textureSample(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: u32) -> vec4<f32>
+fn textureSample_d6b281() {
+  var arg_2 = vec2<f32>();
+  var arg_3 = 1u;
+  var res: vec4<f32> = textureSample(arg_0, arg_1, arg_2, arg_3);
+}
+
+@fragment
+fn fragment_main() {
+  textureSample_d6b281();
+}
diff --git a/test/tint/builtins/gen/var/textureSample/d6b281.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSample/d6b281.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..40fc858
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSample/d6b281.wgsl.expected.dxc.hlsl
@@ -0,0 +1,13 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSample_d6b281() {
+  float2 arg_2 = (0.0f).xx;
+  uint arg_3 = 1u;
+  float4 res = arg_0.Sample(arg_1, float3(arg_2, float(arg_3)));
+}
+
+void fragment_main() {
+  textureSample_d6b281();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureSample/d6b281.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSample/d6b281.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..40fc858
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSample/d6b281.wgsl.expected.fxc.hlsl
@@ -0,0 +1,13 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSample_d6b281() {
+  float2 arg_2 = (0.0f).xx;
+  uint arg_3 = 1u;
+  float4 res = arg_0.Sample(arg_1, float3(arg_2, float(arg_3)));
+}
+
+void fragment_main() {
+  textureSample_d6b281();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureSample/d6b281.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSample/d6b281.wgsl.expected.glsl
new file mode 100644
index 0000000..bab02f6
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSample/d6b281.wgsl.expected.glsl
@@ -0,0 +1,19 @@
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2DArray arg_0_arg_1;
+
+void textureSample_d6b281() {
+  vec2 arg_2 = vec2(0.0f);
+  uint arg_3 = 1u;
+  vec4 res = texture(arg_0_arg_1, vec3(arg_2, float(arg_3)));
+}
+
+void fragment_main() {
+  textureSample_d6b281();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureSample/d6b281.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSample/d6b281.wgsl.expected.msl
new file mode 100644
index 0000000..cac3226
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSample/d6b281.wgsl.expected.msl
@@ -0,0 +1,14 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureSample_d6b281(texture2d_array<float, access::sample> tint_symbol, sampler tint_symbol_1) {
+  float2 arg_2 = float2(0.0f);
+  uint arg_3 = 1u;
+  float4 res = tint_symbol.sample(tint_symbol_1, arg_2, arg_3);
+}
+
+fragment void fragment_main(texture2d_array<float, access::sample> tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) {
+  textureSample_d6b281(tint_symbol_2, tint_symbol_3);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureSample/d6b281.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSample/d6b281.wgsl.expected.spvasm
new file mode 100644
index 0000000..df39671
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSample/d6b281.wgsl.expected.spvasm
@@ -0,0 +1,66 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 40
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpName %arg_0 "arg_0"
+               OpName %arg_1 "arg_1"
+               OpName %textureSample_d6b281 "textureSample_d6b281"
+               OpName %arg_2 "arg_2"
+               OpName %arg_3 "arg_3"
+               OpName %res "res"
+               OpName %fragment_main "fragment_main"
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %arg_1 DescriptorSet 1
+               OpDecorate %arg_1 Binding 1
+      %float = OpTypeFloat 32
+          %3 = OpTypeImage %float 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_3 = OpTypePointer UniformConstant %3
+      %arg_0 = OpVariable %_ptr_UniformConstant_3 UniformConstant
+          %7 = OpTypeSampler
+%_ptr_UniformConstant_7 = OpTypePointer UniformConstant %7
+      %arg_1 = OpVariable %_ptr_UniformConstant_7 UniformConstant
+       %void = OpTypeVoid
+          %8 = OpTypeFunction %void
+    %v2float = OpTypeVector %float 2
+         %13 = OpConstantNull %v2float
+%_ptr_Function_v2float = OpTypePointer Function %v2float
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %20 = OpConstantNull %uint
+    %v4float = OpTypeVector %float 4
+         %25 = OpTypeSampledImage %3
+    %v3float = OpTypeVector %float 3
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+         %36 = OpConstantNull %v4float
+%textureSample_d6b281 = OpFunction %void None %8
+         %11 = OpLabel
+      %arg_2 = OpVariable %_ptr_Function_v2float Function %13
+      %arg_3 = OpVariable %_ptr_Function_uint Function %20
+        %res = OpVariable %_ptr_Function_v4float Function %36
+               OpStore %arg_2 %13
+               OpStore %arg_3 %uint_1
+         %23 = OpLoad %7 %arg_1
+         %24 = OpLoad %3 %arg_0
+         %26 = OpSampledImage %25 %24 %23
+         %28 = OpLoad %v2float %arg_2
+         %29 = OpCompositeExtract %float %28 0
+         %30 = OpCompositeExtract %float %28 1
+         %32 = OpLoad %uint %arg_3
+         %31 = OpConvertUToF %float %32
+         %33 = OpCompositeConstruct %v3float %29 %30 %31
+         %21 = OpImageSampleImplicitLod %v4float %26 %33
+               OpStore %res %21
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %8
+         %38 = OpLabel
+         %39 = OpFunctionCall %void %textureSample_d6b281
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureSample/d6b281.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSample/d6b281.wgsl.expected.wgsl
new file mode 100644
index 0000000..56e467d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSample/d6b281.wgsl.expected.wgsl
@@ -0,0 +1,14 @@
+@group(1) @binding(0) var arg_0 : texture_2d_array<f32>;
+
+@group(1) @binding(1) var arg_1 : sampler;
+
+fn textureSample_d6b281() {
+  var arg_2 = vec2<f32>();
+  var arg_3 = 1u;
+  var res : vec4<f32> = textureSample(arg_0, arg_1, arg_2, arg_3);
+}
+
+@fragment
+fn fragment_main() {
+  textureSample_d6b281();
+}
diff --git a/test/tint/builtins/gen/var/textureSampleBias/1c707e.wgsl b/test/tint/builtins/gen/var/textureSampleBias/1c707e.wgsl
new file mode 100644
index 0000000..328137e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleBias/1c707e.wgsl
@@ -0,0 +1,37 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_2d_array<f32>;
+@group(1) @binding(1) var arg_1: sampler;
+
+// fn textureSampleBias(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: u32, bias: f32) -> vec4<f32>
+fn textureSampleBias_1c707e() {
+  var arg_2 = vec2<f32>();
+  var arg_3 = 1u;
+  var arg_4 = 1.f;
+  var res: vec4<f32> = textureSampleBias(arg_0, arg_1, arg_2, arg_3, arg_4);
+}
+
+@fragment
+fn fragment_main() {
+  textureSampleBias_1c707e();
+}
diff --git a/test/tint/builtins/gen/var/textureSampleBias/1c707e.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleBias/1c707e.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..0812196
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleBias/1c707e.wgsl.expected.dxc.hlsl
@@ -0,0 +1,14 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSampleBias_1c707e() {
+  float2 arg_2 = (0.0f).xx;
+  uint arg_3 = 1u;
+  float arg_4 = 1.0f;
+  float4 res = arg_0.SampleBias(arg_1, float3(arg_2, float(arg_3)), arg_4);
+}
+
+void fragment_main() {
+  textureSampleBias_1c707e();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureSampleBias/1c707e.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleBias/1c707e.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..0812196
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleBias/1c707e.wgsl.expected.fxc.hlsl
@@ -0,0 +1,14 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSampleBias_1c707e() {
+  float2 arg_2 = (0.0f).xx;
+  uint arg_3 = 1u;
+  float arg_4 = 1.0f;
+  float4 res = arg_0.SampleBias(arg_1, float3(arg_2, float(arg_3)), arg_4);
+}
+
+void fragment_main() {
+  textureSampleBias_1c707e();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureSampleBias/1c707e.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSampleBias/1c707e.wgsl.expected.glsl
new file mode 100644
index 0000000..2185407
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleBias/1c707e.wgsl.expected.glsl
@@ -0,0 +1,20 @@
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2DArray arg_0_arg_1;
+
+void textureSampleBias_1c707e() {
+  vec2 arg_2 = vec2(0.0f);
+  uint arg_3 = 1u;
+  float arg_4 = 1.0f;
+  vec4 res = texture(arg_0_arg_1, vec3(arg_2, float(arg_3)), arg_4);
+}
+
+void fragment_main() {
+  textureSampleBias_1c707e();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureSampleBias/1c707e.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleBias/1c707e.wgsl.expected.msl
new file mode 100644
index 0000000..a7de0c8
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleBias/1c707e.wgsl.expected.msl
@@ -0,0 +1,15 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureSampleBias_1c707e(texture2d_array<float, access::sample> tint_symbol, sampler tint_symbol_1) {
+  float2 arg_2 = float2(0.0f);
+  uint arg_3 = 1u;
+  float arg_4 = 1.0f;
+  float4 res = tint_symbol.sample(tint_symbol_1, arg_2, arg_3, bias(arg_4));
+}
+
+fragment void fragment_main(texture2d_array<float, access::sample> tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) {
+  textureSampleBias_1c707e(tint_symbol_2, tint_symbol_3);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureSampleBias/1c707e.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleBias/1c707e.wgsl.expected.spvasm
new file mode 100644
index 0000000..22a6cde
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleBias/1c707e.wgsl.expected.spvasm
@@ -0,0 +1,73 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 45
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpName %arg_0 "arg_0"
+               OpName %arg_1 "arg_1"
+               OpName %textureSampleBias_1c707e "textureSampleBias_1c707e"
+               OpName %arg_2 "arg_2"
+               OpName %arg_3 "arg_3"
+               OpName %arg_4 "arg_4"
+               OpName %res "res"
+               OpName %fragment_main "fragment_main"
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %arg_1 DescriptorSet 1
+               OpDecorate %arg_1 Binding 1
+      %float = OpTypeFloat 32
+          %3 = OpTypeImage %float 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_3 = OpTypePointer UniformConstant %3
+      %arg_0 = OpVariable %_ptr_UniformConstant_3 UniformConstant
+          %7 = OpTypeSampler
+%_ptr_UniformConstant_7 = OpTypePointer UniformConstant %7
+      %arg_1 = OpVariable %_ptr_UniformConstant_7 UniformConstant
+       %void = OpTypeVoid
+          %8 = OpTypeFunction %void
+    %v2float = OpTypeVector %float 2
+         %13 = OpConstantNull %v2float
+%_ptr_Function_v2float = OpTypePointer Function %v2float
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %20 = OpConstantNull %uint
+    %float_1 = OpConstant %float 1
+%_ptr_Function_float = OpTypePointer Function %float
+         %24 = OpConstantNull %float
+    %v4float = OpTypeVector %float 4
+         %29 = OpTypeSampledImage %3
+    %v3float = OpTypeVector %float 3
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+         %41 = OpConstantNull %v4float
+%textureSampleBias_1c707e = OpFunction %void None %8
+         %11 = OpLabel
+      %arg_2 = OpVariable %_ptr_Function_v2float Function %13
+      %arg_3 = OpVariable %_ptr_Function_uint Function %20
+      %arg_4 = OpVariable %_ptr_Function_float Function %24
+        %res = OpVariable %_ptr_Function_v4float Function %41
+               OpStore %arg_2 %13
+               OpStore %arg_3 %uint_1
+               OpStore %arg_4 %float_1
+         %27 = OpLoad %7 %arg_1
+         %28 = OpLoad %3 %arg_0
+         %30 = OpSampledImage %29 %28 %27
+         %32 = OpLoad %v2float %arg_2
+         %33 = OpCompositeExtract %float %32 0
+         %34 = OpCompositeExtract %float %32 1
+         %36 = OpLoad %uint %arg_3
+         %35 = OpConvertUToF %float %36
+         %37 = OpCompositeConstruct %v3float %33 %34 %35
+         %38 = OpLoad %float %arg_4
+         %25 = OpImageSampleImplicitLod %v4float %30 %37 Bias %38
+               OpStore %res %25
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %8
+         %43 = OpLabel
+         %44 = OpFunctionCall %void %textureSampleBias_1c707e
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureSampleBias/1c707e.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleBias/1c707e.wgsl.expected.wgsl
new file mode 100644
index 0000000..674136f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleBias/1c707e.wgsl.expected.wgsl
@@ -0,0 +1,15 @@
+@group(1) @binding(0) var arg_0 : texture_2d_array<f32>;
+
+@group(1) @binding(1) var arg_1 : sampler;
+
+fn textureSampleBias_1c707e() {
+  var arg_2 = vec2<f32>();
+  var arg_3 = 1u;
+  var arg_4 = 1.0f;
+  var res : vec4<f32> = textureSampleBias(arg_0, arg_1, arg_2, arg_3, arg_4);
+}
+
+@fragment
+fn fragment_main() {
+  textureSampleBias_1c707e();
+}
diff --git a/test/tint/builtins/gen/var/textureSampleBias/87915c.wgsl b/test/tint/builtins/gen/var/textureSampleBias/87915c.wgsl
new file mode 100644
index 0000000..2ffa8d4
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleBias/87915c.wgsl
@@ -0,0 +1,38 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_2d_array<f32>;
+@group(1) @binding(1) var arg_1: sampler;
+
+// fn textureSampleBias(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: u32, bias: f32, @const offset: vec2<i32>) -> vec4<f32>
+fn textureSampleBias_87915c() {
+  var arg_2 = vec2<f32>();
+  var arg_3 = 1u;
+  var arg_4 = 1.f;
+  const arg_5 = vec2<i32>();
+  var res: vec4<f32> = textureSampleBias(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5);
+}
+
+@fragment
+fn fragment_main() {
+  textureSampleBias_87915c();
+}
diff --git a/test/tint/builtins/gen/var/textureSampleBias/87915c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleBias/87915c.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..b1edf8b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleBias/87915c.wgsl.expected.dxc.hlsl
@@ -0,0 +1,14 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSampleBias_87915c() {
+  float2 arg_2 = (0.0f).xx;
+  uint arg_3 = 1u;
+  float arg_4 = 1.0f;
+  float4 res = arg_0.SampleBias(arg_1, float3(arg_2, float(arg_3)), arg_4, (0).xx);
+}
+
+void fragment_main() {
+  textureSampleBias_87915c();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureSampleBias/87915c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleBias/87915c.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..b1edf8b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleBias/87915c.wgsl.expected.fxc.hlsl
@@ -0,0 +1,14 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSampleBias_87915c() {
+  float2 arg_2 = (0.0f).xx;
+  uint arg_3 = 1u;
+  float arg_4 = 1.0f;
+  float4 res = arg_0.SampleBias(arg_1, float3(arg_2, float(arg_3)), arg_4, (0).xx);
+}
+
+void fragment_main() {
+  textureSampleBias_87915c();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureSampleBias/87915c.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSampleBias/87915c.wgsl.expected.glsl
new file mode 100644
index 0000000..b2b2648
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleBias/87915c.wgsl.expected.glsl
@@ -0,0 +1,20 @@
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2DArray arg_0_arg_1;
+
+void textureSampleBias_87915c() {
+  vec2 arg_2 = vec2(0.0f);
+  uint arg_3 = 1u;
+  float arg_4 = 1.0f;
+  vec4 res = textureOffset(arg_0_arg_1, vec3(arg_2, float(arg_3)), ivec2(0), arg_4);
+}
+
+void fragment_main() {
+  textureSampleBias_87915c();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureSampleBias/87915c.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleBias/87915c.wgsl.expected.msl
new file mode 100644
index 0000000..37303ae
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleBias/87915c.wgsl.expected.msl
@@ -0,0 +1,15 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureSampleBias_87915c(texture2d_array<float, access::sample> tint_symbol, sampler tint_symbol_1) {
+  float2 arg_2 = float2(0.0f);
+  uint arg_3 = 1u;
+  float arg_4 = 1.0f;
+  float4 res = tint_symbol.sample(tint_symbol_1, arg_2, arg_3, bias(arg_4), int2(0));
+}
+
+fragment void fragment_main(texture2d_array<float, access::sample> tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) {
+  textureSampleBias_87915c(tint_symbol_2, tint_symbol_3);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureSampleBias/87915c.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleBias/87915c.wgsl.expected.spvasm
new file mode 100644
index 0000000..d8da7ba
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleBias/87915c.wgsl.expected.spvasm
@@ -0,0 +1,76 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 48
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpName %arg_0 "arg_0"
+               OpName %arg_1 "arg_1"
+               OpName %textureSampleBias_87915c "textureSampleBias_87915c"
+               OpName %arg_2 "arg_2"
+               OpName %arg_3 "arg_3"
+               OpName %arg_4 "arg_4"
+               OpName %res "res"
+               OpName %fragment_main "fragment_main"
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %arg_1 DescriptorSet 1
+               OpDecorate %arg_1 Binding 1
+      %float = OpTypeFloat 32
+          %3 = OpTypeImage %float 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_3 = OpTypePointer UniformConstant %3
+      %arg_0 = OpVariable %_ptr_UniformConstant_3 UniformConstant
+          %7 = OpTypeSampler
+%_ptr_UniformConstant_7 = OpTypePointer UniformConstant %7
+      %arg_1 = OpVariable %_ptr_UniformConstant_7 UniformConstant
+       %void = OpTypeVoid
+          %8 = OpTypeFunction %void
+    %v2float = OpTypeVector %float 2
+         %13 = OpConstantNull %v2float
+%_ptr_Function_v2float = OpTypePointer Function %v2float
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %20 = OpConstantNull %uint
+    %float_1 = OpConstant %float 1
+%_ptr_Function_float = OpTypePointer Function %float
+         %24 = OpConstantNull %float
+    %v4float = OpTypeVector %float 4
+         %29 = OpTypeSampledImage %3
+    %v3float = OpTypeVector %float 3
+        %int = OpTypeInt 32 1
+      %v2int = OpTypeVector %int 2
+         %41 = OpConstantNull %v2int
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+         %44 = OpConstantNull %v4float
+%textureSampleBias_87915c = OpFunction %void None %8
+         %11 = OpLabel
+      %arg_2 = OpVariable %_ptr_Function_v2float Function %13
+      %arg_3 = OpVariable %_ptr_Function_uint Function %20
+      %arg_4 = OpVariable %_ptr_Function_float Function %24
+        %res = OpVariable %_ptr_Function_v4float Function %44
+               OpStore %arg_2 %13
+               OpStore %arg_3 %uint_1
+               OpStore %arg_4 %float_1
+         %27 = OpLoad %7 %arg_1
+         %28 = OpLoad %3 %arg_0
+         %30 = OpSampledImage %29 %28 %27
+         %32 = OpLoad %v2float %arg_2
+         %33 = OpCompositeExtract %float %32 0
+         %34 = OpCompositeExtract %float %32 1
+         %36 = OpLoad %uint %arg_3
+         %35 = OpConvertUToF %float %36
+         %37 = OpCompositeConstruct %v3float %33 %34 %35
+         %38 = OpLoad %float %arg_4
+         %25 = OpImageSampleImplicitLod %v4float %30 %37 Bias|ConstOffset %38 %41
+               OpStore %res %25
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %8
+         %46 = OpLabel
+         %47 = OpFunctionCall %void %textureSampleBias_87915c
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureSampleBias/87915c.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleBias/87915c.wgsl.expected.wgsl
new file mode 100644
index 0000000..ff54de7
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleBias/87915c.wgsl.expected.wgsl
@@ -0,0 +1,16 @@
+@group(1) @binding(0) var arg_0 : texture_2d_array<f32>;
+
+@group(1) @binding(1) var arg_1 : sampler;
+
+fn textureSampleBias_87915c() {
+  var arg_2 = vec2<f32>();
+  var arg_3 = 1u;
+  var arg_4 = 1.0f;
+  const arg_5 = vec2<i32>();
+  var res : vec4<f32> = textureSampleBias(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5);
+}
+
+@fragment
+fn fragment_main() {
+  textureSampleBias_87915c();
+}
diff --git a/test/tint/builtins/gen/var/textureSampleBias/c6953d.wgsl b/test/tint/builtins/gen/var/textureSampleBias/c6953d.wgsl
new file mode 100644
index 0000000..666511e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleBias/c6953d.wgsl
@@ -0,0 +1,37 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_cube_array<f32>;
+@group(1) @binding(1) var arg_1: sampler;
+
+// fn textureSampleBias(texture: texture_cube_array<f32>, sampler: sampler, coords: vec3<f32>, array_index: u32, bias: f32) -> vec4<f32>
+fn textureSampleBias_c6953d() {
+  var arg_2 = vec3<f32>();
+  var arg_3 = 1u;
+  var arg_4 = 1.f;
+  var res: vec4<f32> = textureSampleBias(arg_0, arg_1, arg_2, arg_3, arg_4);
+}
+
+@fragment
+fn fragment_main() {
+  textureSampleBias_c6953d();
+}
diff --git a/test/tint/builtins/gen/var/textureSampleBias/c6953d.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleBias/c6953d.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..f8272ae
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleBias/c6953d.wgsl.expected.dxc.hlsl
@@ -0,0 +1,14 @@
+TextureCubeArray<float4> arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSampleBias_c6953d() {
+  float3 arg_2 = (0.0f).xxx;
+  uint arg_3 = 1u;
+  float arg_4 = 1.0f;
+  float4 res = arg_0.SampleBias(arg_1, float4(arg_2, float(arg_3)), arg_4);
+}
+
+void fragment_main() {
+  textureSampleBias_c6953d();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureSampleBias/c6953d.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleBias/c6953d.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..f8272ae
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleBias/c6953d.wgsl.expected.fxc.hlsl
@@ -0,0 +1,14 @@
+TextureCubeArray<float4> arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSampleBias_c6953d() {
+  float3 arg_2 = (0.0f).xxx;
+  uint arg_3 = 1u;
+  float arg_4 = 1.0f;
+  float4 res = arg_0.SampleBias(arg_1, float4(arg_2, float(arg_3)), arg_4);
+}
+
+void fragment_main() {
+  textureSampleBias_c6953d();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureSampleBias/c6953d.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSampleBias/c6953d.wgsl.expected.glsl
new file mode 100644
index 0000000..aeeabb1
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleBias/c6953d.wgsl.expected.glsl
@@ -0,0 +1,29 @@
+SKIP: FAILED
+
+#version 310 es
+precision mediump float;
+
+uniform highp samplerCubeArray arg_0_arg_1;
+
+void textureSampleBias_c6953d() {
+  vec3 arg_2 = vec3(0.0f);
+  uint arg_3 = 1u;
+  float arg_4 = 1.0f;
+  vec4 res = texture(arg_0_arg_1, vec4(arg_2, float(arg_3)), arg_4);
+}
+
+void fragment_main() {
+  textureSampleBias_c6953d();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'samplerCubeArray' : Reserved word. 
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureSampleBias/c6953d.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleBias/c6953d.wgsl.expected.msl
new file mode 100644
index 0000000..b06231c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleBias/c6953d.wgsl.expected.msl
@@ -0,0 +1,15 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureSampleBias_c6953d(texturecube_array<float, access::sample> tint_symbol, sampler tint_symbol_1) {
+  float3 arg_2 = float3(0.0f);
+  uint arg_3 = 1u;
+  float arg_4 = 1.0f;
+  float4 res = tint_symbol.sample(tint_symbol_1, arg_2, arg_3, bias(arg_4));
+}
+
+fragment void fragment_main(texturecube_array<float, access::sample> tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) {
+  textureSampleBias_c6953d(tint_symbol_2, tint_symbol_3);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureSampleBias/c6953d.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleBias/c6953d.wgsl.expected.spvasm
new file mode 100644
index 0000000..966a391
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleBias/c6953d.wgsl.expected.spvasm
@@ -0,0 +1,74 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 45
+; Schema: 0
+               OpCapability Shader
+               OpCapability SampledCubeArray
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpName %arg_0 "arg_0"
+               OpName %arg_1 "arg_1"
+               OpName %textureSampleBias_c6953d "textureSampleBias_c6953d"
+               OpName %arg_2 "arg_2"
+               OpName %arg_3 "arg_3"
+               OpName %arg_4 "arg_4"
+               OpName %res "res"
+               OpName %fragment_main "fragment_main"
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %arg_1 DescriptorSet 1
+               OpDecorate %arg_1 Binding 1
+      %float = OpTypeFloat 32
+          %3 = OpTypeImage %float Cube 0 1 0 1 Unknown
+%_ptr_UniformConstant_3 = OpTypePointer UniformConstant %3
+      %arg_0 = OpVariable %_ptr_UniformConstant_3 UniformConstant
+          %7 = OpTypeSampler
+%_ptr_UniformConstant_7 = OpTypePointer UniformConstant %7
+      %arg_1 = OpVariable %_ptr_UniformConstant_7 UniformConstant
+       %void = OpTypeVoid
+          %8 = OpTypeFunction %void
+    %v3float = OpTypeVector %float 3
+         %13 = OpConstantNull %v3float
+%_ptr_Function_v3float = OpTypePointer Function %v3float
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %20 = OpConstantNull %uint
+    %float_1 = OpConstant %float 1
+%_ptr_Function_float = OpTypePointer Function %float
+         %24 = OpConstantNull %float
+    %v4float = OpTypeVector %float 4
+         %29 = OpTypeSampledImage %3
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+         %41 = OpConstantNull %v4float
+%textureSampleBias_c6953d = OpFunction %void None %8
+         %11 = OpLabel
+      %arg_2 = OpVariable %_ptr_Function_v3float Function %13
+      %arg_3 = OpVariable %_ptr_Function_uint Function %20
+      %arg_4 = OpVariable %_ptr_Function_float Function %24
+        %res = OpVariable %_ptr_Function_v4float Function %41
+               OpStore %arg_2 %13
+               OpStore %arg_3 %uint_1
+               OpStore %arg_4 %float_1
+         %27 = OpLoad %7 %arg_1
+         %28 = OpLoad %3 %arg_0
+         %30 = OpSampledImage %29 %28 %27
+         %31 = OpLoad %v3float %arg_2
+         %32 = OpCompositeExtract %float %31 0
+         %33 = OpCompositeExtract %float %31 1
+         %34 = OpCompositeExtract %float %31 2
+         %36 = OpLoad %uint %arg_3
+         %35 = OpConvertUToF %float %36
+         %37 = OpCompositeConstruct %v4float %32 %33 %34 %35
+         %38 = OpLoad %float %arg_4
+         %25 = OpImageSampleImplicitLod %v4float %30 %37 Bias %38
+               OpStore %res %25
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %8
+         %43 = OpLabel
+         %44 = OpFunctionCall %void %textureSampleBias_c6953d
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureSampleBias/c6953d.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleBias/c6953d.wgsl.expected.wgsl
new file mode 100644
index 0000000..31476a4
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleBias/c6953d.wgsl.expected.wgsl
@@ -0,0 +1,15 @@
+@group(1) @binding(0) var arg_0 : texture_cube_array<f32>;
+
+@group(1) @binding(1) var arg_1 : sampler;
+
+fn textureSampleBias_c6953d() {
+  var arg_2 = vec3<f32>();
+  var arg_3 = 1u;
+  var arg_4 = 1.0f;
+  var res : vec4<f32> = textureSampleBias(arg_0, arg_1, arg_2, arg_3, arg_4);
+}
+
+@fragment
+fn fragment_main() {
+  textureSampleBias_c6953d();
+}
diff --git a/test/tint/builtins/gen/var/textureSampleCompare/1912e5.wgsl b/test/tint/builtins/gen/var/textureSampleCompare/1912e5.wgsl
new file mode 100644
index 0000000..25c3c54
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleCompare/1912e5.wgsl
@@ -0,0 +1,37 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_depth_cube_array;
+@group(1) @binding(1) var arg_1: sampler_comparison;
+
+// fn textureSampleCompare(texture: texture_depth_cube_array, sampler: sampler_comparison, coords: vec3<f32>, array_index: u32, depth_ref: f32) -> f32
+fn textureSampleCompare_1912e5() {
+  var arg_2 = vec3<f32>();
+  var arg_3 = 1u;
+  var arg_4 = 1.f;
+  var res: f32 = textureSampleCompare(arg_0, arg_1, arg_2, arg_3, arg_4);
+}
+
+@fragment
+fn fragment_main() {
+  textureSampleCompare_1912e5();
+}
diff --git a/test/tint/builtins/gen/var/textureSampleCompare/1912e5.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleCompare/1912e5.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..88f73a7
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleCompare/1912e5.wgsl.expected.dxc.hlsl
@@ -0,0 +1,14 @@
+TextureCubeArray arg_0 : register(t0, space1);
+SamplerComparisonState arg_1 : register(s1, space1);
+
+void textureSampleCompare_1912e5() {
+  float3 arg_2 = (0.0f).xxx;
+  uint arg_3 = 1u;
+  float arg_4 = 1.0f;
+  float res = arg_0.SampleCmp(arg_1, float4(arg_2, float(arg_3)), arg_4);
+}
+
+void fragment_main() {
+  textureSampleCompare_1912e5();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureSampleCompare/1912e5.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleCompare/1912e5.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..88f73a7
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleCompare/1912e5.wgsl.expected.fxc.hlsl
@@ -0,0 +1,14 @@
+TextureCubeArray arg_0 : register(t0, space1);
+SamplerComparisonState arg_1 : register(s1, space1);
+
+void textureSampleCompare_1912e5() {
+  float3 arg_2 = (0.0f).xxx;
+  uint arg_3 = 1u;
+  float arg_4 = 1.0f;
+  float res = arg_0.SampleCmp(arg_1, float4(arg_2, float(arg_3)), arg_4);
+}
+
+void fragment_main() {
+  textureSampleCompare_1912e5();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureSampleCompare/1912e5.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSampleCompare/1912e5.wgsl.expected.glsl
new file mode 100644
index 0000000..794ee02
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleCompare/1912e5.wgsl.expected.glsl
@@ -0,0 +1,29 @@
+SKIP: FAILED
+
+#version 310 es
+precision mediump float;
+
+uniform highp samplerCubeArrayShadow arg_0_arg_1;
+
+void textureSampleCompare_1912e5() {
+  vec3 arg_2 = vec3(0.0f);
+  uint arg_3 = 1u;
+  float arg_4 = 1.0f;
+  float res = texture(arg_0_arg_1, vec4(arg_2, float(arg_3)), arg_4);
+}
+
+void fragment_main() {
+  textureSampleCompare_1912e5();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'samplerCubeArrayShadow' : Reserved word. 
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureSampleCompare/1912e5.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleCompare/1912e5.wgsl.expected.msl
new file mode 100644
index 0000000..223d875
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleCompare/1912e5.wgsl.expected.msl
@@ -0,0 +1,15 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureSampleCompare_1912e5(depthcube_array<float, access::sample> tint_symbol, sampler tint_symbol_1) {
+  float3 arg_2 = float3(0.0f);
+  uint arg_3 = 1u;
+  float arg_4 = 1.0f;
+  float res = tint_symbol.sample_compare(tint_symbol_1, arg_2, arg_3, arg_4);
+}
+
+fragment void fragment_main(depthcube_array<float, access::sample> tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) {
+  textureSampleCompare_1912e5(tint_symbol_2, tint_symbol_3);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureSampleCompare/1912e5.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleCompare/1912e5.wgsl.expected.spvasm
new file mode 100644
index 0000000..1cd357b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleCompare/1912e5.wgsl.expected.spvasm
@@ -0,0 +1,72 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 43
+; Schema: 0
+               OpCapability Shader
+               OpCapability SampledCubeArray
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpName %arg_0 "arg_0"
+               OpName %arg_1 "arg_1"
+               OpName %textureSampleCompare_1912e5 "textureSampleCompare_1912e5"
+               OpName %arg_2 "arg_2"
+               OpName %arg_3 "arg_3"
+               OpName %arg_4 "arg_4"
+               OpName %res "res"
+               OpName %fragment_main "fragment_main"
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %arg_1 DescriptorSet 1
+               OpDecorate %arg_1 Binding 1
+      %float = OpTypeFloat 32
+          %3 = OpTypeImage %float Cube 0 1 0 1 Unknown
+%_ptr_UniformConstant_3 = OpTypePointer UniformConstant %3
+      %arg_0 = OpVariable %_ptr_UniformConstant_3 UniformConstant
+          %7 = OpTypeSampler
+%_ptr_UniformConstant_7 = OpTypePointer UniformConstant %7
+      %arg_1 = OpVariable %_ptr_UniformConstant_7 UniformConstant
+       %void = OpTypeVoid
+          %8 = OpTypeFunction %void
+    %v3float = OpTypeVector %float 3
+         %13 = OpConstantNull %v3float
+%_ptr_Function_v3float = OpTypePointer Function %v3float
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %20 = OpConstantNull %uint
+    %float_1 = OpConstant %float 1
+%_ptr_Function_float = OpTypePointer Function %float
+         %24 = OpConstantNull %float
+         %28 = OpTypeSampledImage %3
+    %v4float = OpTypeVector %float 4
+%textureSampleCompare_1912e5 = OpFunction %void None %8
+         %11 = OpLabel
+      %arg_2 = OpVariable %_ptr_Function_v3float Function %13
+      %arg_3 = OpVariable %_ptr_Function_uint Function %20
+      %arg_4 = OpVariable %_ptr_Function_float Function %24
+        %res = OpVariable %_ptr_Function_float Function %24
+               OpStore %arg_2 %13
+               OpStore %arg_3 %uint_1
+               OpStore %arg_4 %float_1
+         %26 = OpLoad %7 %arg_1
+         %27 = OpLoad %3 %arg_0
+         %29 = OpSampledImage %28 %27 %26
+         %31 = OpLoad %v3float %arg_2
+         %32 = OpCompositeExtract %float %31 0
+         %33 = OpCompositeExtract %float %31 1
+         %34 = OpCompositeExtract %float %31 2
+         %36 = OpLoad %uint %arg_3
+         %35 = OpConvertUToF %float %36
+         %37 = OpCompositeConstruct %v4float %32 %33 %34 %35
+         %38 = OpLoad %float %arg_4
+         %25 = OpImageSampleDrefImplicitLod %float %29 %37 %38
+               OpStore %res %25
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %8
+         %41 = OpLabel
+         %42 = OpFunctionCall %void %textureSampleCompare_1912e5
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureSampleCompare/1912e5.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleCompare/1912e5.wgsl.expected.wgsl
new file mode 100644
index 0000000..c8a2275
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleCompare/1912e5.wgsl.expected.wgsl
@@ -0,0 +1,15 @@
+@group(1) @binding(0) var arg_0 : texture_depth_cube_array;
+
+@group(1) @binding(1) var arg_1 : sampler_comparison;
+
+fn textureSampleCompare_1912e5() {
+  var arg_2 = vec3<f32>();
+  var arg_3 = 1u;
+  var arg_4 = 1.0f;
+  var res : f32 = textureSampleCompare(arg_0, arg_1, arg_2, arg_3, arg_4);
+}
+
+@fragment
+fn fragment_main() {
+  textureSampleCompare_1912e5();
+}
diff --git a/test/tint/builtins/gen/var/textureSampleCompare/7b5025.wgsl b/test/tint/builtins/gen/var/textureSampleCompare/7b5025.wgsl
new file mode 100644
index 0000000..88b89b0
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleCompare/7b5025.wgsl
@@ -0,0 +1,38 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_depth_2d_array;
+@group(1) @binding(1) var arg_1: sampler_comparison;
+
+// fn textureSampleCompare(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2<f32>, array_index: u32, depth_ref: f32, @const offset: vec2<i32>) -> f32
+fn textureSampleCompare_7b5025() {
+  var arg_2 = vec2<f32>();
+  var arg_3 = 1u;
+  var arg_4 = 1.f;
+  const arg_5 = vec2<i32>();
+  var res: f32 = textureSampleCompare(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5);
+}
+
+@fragment
+fn fragment_main() {
+  textureSampleCompare_7b5025();
+}
diff --git a/test/tint/builtins/gen/var/textureSampleCompare/7b5025.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleCompare/7b5025.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..e57c768
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleCompare/7b5025.wgsl.expected.dxc.hlsl
@@ -0,0 +1,14 @@
+Texture2DArray arg_0 : register(t0, space1);
+SamplerComparisonState arg_1 : register(s1, space1);
+
+void textureSampleCompare_7b5025() {
+  float2 arg_2 = (0.0f).xx;
+  uint arg_3 = 1u;
+  float arg_4 = 1.0f;
+  float res = arg_0.SampleCmp(arg_1, float3(arg_2, float(arg_3)), arg_4, (0).xx);
+}
+
+void fragment_main() {
+  textureSampleCompare_7b5025();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureSampleCompare/7b5025.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleCompare/7b5025.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..e57c768
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleCompare/7b5025.wgsl.expected.fxc.hlsl
@@ -0,0 +1,14 @@
+Texture2DArray arg_0 : register(t0, space1);
+SamplerComparisonState arg_1 : register(s1, space1);
+
+void textureSampleCompare_7b5025() {
+  float2 arg_2 = (0.0f).xx;
+  uint arg_3 = 1u;
+  float arg_4 = 1.0f;
+  float res = arg_0.SampleCmp(arg_1, float3(arg_2, float(arg_3)), arg_4, (0).xx);
+}
+
+void fragment_main() {
+  textureSampleCompare_7b5025();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureSampleCompare/7b5025.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSampleCompare/7b5025.wgsl.expected.glsl
new file mode 100644
index 0000000..1fb97d6
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleCompare/7b5025.wgsl.expected.glsl
@@ -0,0 +1,29 @@
+SKIP: FAILED
+
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2DArrayShadow arg_0_arg_1;
+
+void textureSampleCompare_7b5025() {
+  vec2 arg_2 = vec2(0.0f);
+  uint arg_3 = 1u;
+  float arg_4 = 1.0f;
+  float res = textureOffset(arg_0_arg_1, vec4(vec3(arg_2, float(arg_3)), arg_4), ivec2(0));
+}
+
+void fragment_main() {
+  textureSampleCompare_7b5025();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:10: 'sampler' : TextureOffset does not support sampler2DArrayShadow :  ES Profile
+ERROR: 0:10: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureSampleCompare/7b5025.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleCompare/7b5025.wgsl.expected.msl
new file mode 100644
index 0000000..1a601d2
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleCompare/7b5025.wgsl.expected.msl
@@ -0,0 +1,15 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureSampleCompare_7b5025(depth2d_array<float, access::sample> tint_symbol, sampler tint_symbol_1) {
+  float2 arg_2 = float2(0.0f);
+  uint arg_3 = 1u;
+  float arg_4 = 1.0f;
+  float res = tint_symbol.sample_compare(tint_symbol_1, arg_2, arg_3, arg_4, int2(0));
+}
+
+fragment void fragment_main(depth2d_array<float, access::sample> tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) {
+  textureSampleCompare_7b5025(tint_symbol_2, tint_symbol_3);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureSampleCompare/7b5025.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleCompare/7b5025.wgsl.expected.spvasm
new file mode 100644
index 0000000..66b0add
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleCompare/7b5025.wgsl.expected.spvasm
@@ -0,0 +1,73 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 45
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpName %arg_0 "arg_0"
+               OpName %arg_1 "arg_1"
+               OpName %textureSampleCompare_7b5025 "textureSampleCompare_7b5025"
+               OpName %arg_2 "arg_2"
+               OpName %arg_3 "arg_3"
+               OpName %arg_4 "arg_4"
+               OpName %res "res"
+               OpName %fragment_main "fragment_main"
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %arg_1 DescriptorSet 1
+               OpDecorate %arg_1 Binding 1
+      %float = OpTypeFloat 32
+          %3 = OpTypeImage %float 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_3 = OpTypePointer UniformConstant %3
+      %arg_0 = OpVariable %_ptr_UniformConstant_3 UniformConstant
+          %7 = OpTypeSampler
+%_ptr_UniformConstant_7 = OpTypePointer UniformConstant %7
+      %arg_1 = OpVariable %_ptr_UniformConstant_7 UniformConstant
+       %void = OpTypeVoid
+          %8 = OpTypeFunction %void
+    %v2float = OpTypeVector %float 2
+         %13 = OpConstantNull %v2float
+%_ptr_Function_v2float = OpTypePointer Function %v2float
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %20 = OpConstantNull %uint
+    %float_1 = OpConstant %float 1
+%_ptr_Function_float = OpTypePointer Function %float
+         %24 = OpConstantNull %float
+         %28 = OpTypeSampledImage %3
+    %v3float = OpTypeVector %float 3
+        %int = OpTypeInt 32 1
+      %v2int = OpTypeVector %int 2
+         %40 = OpConstantNull %v2int
+%textureSampleCompare_7b5025 = OpFunction %void None %8
+         %11 = OpLabel
+      %arg_2 = OpVariable %_ptr_Function_v2float Function %13
+      %arg_3 = OpVariable %_ptr_Function_uint Function %20
+      %arg_4 = OpVariable %_ptr_Function_float Function %24
+        %res = OpVariable %_ptr_Function_float Function %24
+               OpStore %arg_2 %13
+               OpStore %arg_3 %uint_1
+               OpStore %arg_4 %float_1
+         %26 = OpLoad %7 %arg_1
+         %27 = OpLoad %3 %arg_0
+         %29 = OpSampledImage %28 %27 %26
+         %31 = OpLoad %v2float %arg_2
+         %32 = OpCompositeExtract %float %31 0
+         %33 = OpCompositeExtract %float %31 1
+         %35 = OpLoad %uint %arg_3
+         %34 = OpConvertUToF %float %35
+         %36 = OpCompositeConstruct %v3float %32 %33 %34
+         %37 = OpLoad %float %arg_4
+         %25 = OpImageSampleDrefImplicitLod %float %29 %36 %37 ConstOffset %40
+               OpStore %res %25
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %8
+         %43 = OpLabel
+         %44 = OpFunctionCall %void %textureSampleCompare_7b5025
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureSampleCompare/7b5025.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleCompare/7b5025.wgsl.expected.wgsl
new file mode 100644
index 0000000..a2f8e2d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleCompare/7b5025.wgsl.expected.wgsl
@@ -0,0 +1,16 @@
+@group(1) @binding(0) var arg_0 : texture_depth_2d_array;
+
+@group(1) @binding(1) var arg_1 : sampler_comparison;
+
+fn textureSampleCompare_7b5025() {
+  var arg_2 = vec2<f32>();
+  var arg_3 = 1u;
+  var arg_4 = 1.0f;
+  const arg_5 = vec2<i32>();
+  var res : f32 = textureSampleCompare(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5);
+}
+
+@fragment
+fn fragment_main() {
+  textureSampleCompare_7b5025();
+}
diff --git a/test/tint/builtins/gen/var/textureSampleCompare/90ae56.wgsl b/test/tint/builtins/gen/var/textureSampleCompare/90ae56.wgsl
new file mode 100644
index 0000000..6f2ab25
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleCompare/90ae56.wgsl
@@ -0,0 +1,37 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_depth_2d_array;
+@group(1) @binding(1) var arg_1: sampler_comparison;
+
+// fn textureSampleCompare(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2<f32>, array_index: u32, depth_ref: f32) -> f32
+fn textureSampleCompare_90ae56() {
+  var arg_2 = vec2<f32>();
+  var arg_3 = 1u;
+  var arg_4 = 1.f;
+  var res: f32 = textureSampleCompare(arg_0, arg_1, arg_2, arg_3, arg_4);
+}
+
+@fragment
+fn fragment_main() {
+  textureSampleCompare_90ae56();
+}
diff --git a/test/tint/builtins/gen/var/textureSampleCompare/90ae56.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleCompare/90ae56.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..048e28e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleCompare/90ae56.wgsl.expected.dxc.hlsl
@@ -0,0 +1,14 @@
+Texture2DArray arg_0 : register(t0, space1);
+SamplerComparisonState arg_1 : register(s1, space1);
+
+void textureSampleCompare_90ae56() {
+  float2 arg_2 = (0.0f).xx;
+  uint arg_3 = 1u;
+  float arg_4 = 1.0f;
+  float res = arg_0.SampleCmp(arg_1, float3(arg_2, float(arg_3)), arg_4);
+}
+
+void fragment_main() {
+  textureSampleCompare_90ae56();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureSampleCompare/90ae56.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleCompare/90ae56.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..048e28e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleCompare/90ae56.wgsl.expected.fxc.hlsl
@@ -0,0 +1,14 @@
+Texture2DArray arg_0 : register(t0, space1);
+SamplerComparisonState arg_1 : register(s1, space1);
+
+void textureSampleCompare_90ae56() {
+  float2 arg_2 = (0.0f).xx;
+  uint arg_3 = 1u;
+  float arg_4 = 1.0f;
+  float res = arg_0.SampleCmp(arg_1, float3(arg_2, float(arg_3)), arg_4);
+}
+
+void fragment_main() {
+  textureSampleCompare_90ae56();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureSampleCompare/90ae56.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSampleCompare/90ae56.wgsl.expected.glsl
new file mode 100644
index 0000000..aab30eb
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleCompare/90ae56.wgsl.expected.glsl
@@ -0,0 +1,20 @@
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2DArrayShadow arg_0_arg_1;
+
+void textureSampleCompare_90ae56() {
+  vec2 arg_2 = vec2(0.0f);
+  uint arg_3 = 1u;
+  float arg_4 = 1.0f;
+  float res = texture(arg_0_arg_1, vec4(vec3(arg_2, float(arg_3)), arg_4));
+}
+
+void fragment_main() {
+  textureSampleCompare_90ae56();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureSampleCompare/90ae56.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleCompare/90ae56.wgsl.expected.msl
new file mode 100644
index 0000000..5b7cfbd
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleCompare/90ae56.wgsl.expected.msl
@@ -0,0 +1,15 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureSampleCompare_90ae56(depth2d_array<float, access::sample> tint_symbol, sampler tint_symbol_1) {
+  float2 arg_2 = float2(0.0f);
+  uint arg_3 = 1u;
+  float arg_4 = 1.0f;
+  float res = tint_symbol.sample_compare(tint_symbol_1, arg_2, arg_3, arg_4);
+}
+
+fragment void fragment_main(depth2d_array<float, access::sample> tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) {
+  textureSampleCompare_90ae56(tint_symbol_2, tint_symbol_3);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureSampleCompare/90ae56.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleCompare/90ae56.wgsl.expected.spvasm
new file mode 100644
index 0000000..ccfd3f4
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleCompare/90ae56.wgsl.expected.spvasm
@@ -0,0 +1,70 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 42
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpName %arg_0 "arg_0"
+               OpName %arg_1 "arg_1"
+               OpName %textureSampleCompare_90ae56 "textureSampleCompare_90ae56"
+               OpName %arg_2 "arg_2"
+               OpName %arg_3 "arg_3"
+               OpName %arg_4 "arg_4"
+               OpName %res "res"
+               OpName %fragment_main "fragment_main"
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %arg_1 DescriptorSet 1
+               OpDecorate %arg_1 Binding 1
+      %float = OpTypeFloat 32
+          %3 = OpTypeImage %float 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_3 = OpTypePointer UniformConstant %3
+      %arg_0 = OpVariable %_ptr_UniformConstant_3 UniformConstant
+          %7 = OpTypeSampler
+%_ptr_UniformConstant_7 = OpTypePointer UniformConstant %7
+      %arg_1 = OpVariable %_ptr_UniformConstant_7 UniformConstant
+       %void = OpTypeVoid
+          %8 = OpTypeFunction %void
+    %v2float = OpTypeVector %float 2
+         %13 = OpConstantNull %v2float
+%_ptr_Function_v2float = OpTypePointer Function %v2float
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %20 = OpConstantNull %uint
+    %float_1 = OpConstant %float 1
+%_ptr_Function_float = OpTypePointer Function %float
+         %24 = OpConstantNull %float
+         %28 = OpTypeSampledImage %3
+    %v3float = OpTypeVector %float 3
+%textureSampleCompare_90ae56 = OpFunction %void None %8
+         %11 = OpLabel
+      %arg_2 = OpVariable %_ptr_Function_v2float Function %13
+      %arg_3 = OpVariable %_ptr_Function_uint Function %20
+      %arg_4 = OpVariable %_ptr_Function_float Function %24
+        %res = OpVariable %_ptr_Function_float Function %24
+               OpStore %arg_2 %13
+               OpStore %arg_3 %uint_1
+               OpStore %arg_4 %float_1
+         %26 = OpLoad %7 %arg_1
+         %27 = OpLoad %3 %arg_0
+         %29 = OpSampledImage %28 %27 %26
+         %31 = OpLoad %v2float %arg_2
+         %32 = OpCompositeExtract %float %31 0
+         %33 = OpCompositeExtract %float %31 1
+         %35 = OpLoad %uint %arg_3
+         %34 = OpConvertUToF %float %35
+         %36 = OpCompositeConstruct %v3float %32 %33 %34
+         %37 = OpLoad %float %arg_4
+         %25 = OpImageSampleDrefImplicitLod %float %29 %36 %37
+               OpStore %res %25
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %8
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %textureSampleCompare_90ae56
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureSampleCompare/90ae56.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleCompare/90ae56.wgsl.expected.wgsl
new file mode 100644
index 0000000..97cb0eb
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleCompare/90ae56.wgsl.expected.wgsl
@@ -0,0 +1,15 @@
+@group(1) @binding(0) var arg_0 : texture_depth_2d_array;
+
+@group(1) @binding(1) var arg_1 : sampler_comparison;
+
+fn textureSampleCompare_90ae56() {
+  var arg_2 = vec2<f32>();
+  var arg_3 = 1u;
+  var arg_4 = 1.0f;
+  var res : f32 = textureSampleCompare(arg_0, arg_1, arg_2, arg_3, arg_4);
+}
+
+@fragment
+fn fragment_main() {
+  textureSampleCompare_90ae56();
+}
diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/7dc3c0.wgsl b/test/tint/builtins/gen/var/textureSampleCompareLevel/7dc3c0.wgsl
new file mode 100644
index 0000000..1bcb431
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/7dc3c0.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_depth_2d_array;
+@group(1) @binding(1) var arg_1: sampler_comparison;
+
+// fn textureSampleCompareLevel(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2<f32>, array_index: u32, depth_ref: f32) -> f32
+fn textureSampleCompareLevel_7dc3c0() {
+  var arg_2 = vec2<f32>();
+  var arg_3 = 1u;
+  var arg_4 = 1.f;
+  var res: f32 = textureSampleCompareLevel(arg_0, arg_1, arg_2, arg_3, arg_4);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureSampleCompareLevel_7dc3c0();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureSampleCompareLevel_7dc3c0();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureSampleCompareLevel_7dc3c0();
+}
diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/7dc3c0.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleCompareLevel/7dc3c0.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..0283909
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/7dc3c0.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray arg_0 : register(t0, space1);
+SamplerComparisonState arg_1 : register(s1, space1);
+
+void textureSampleCompareLevel_7dc3c0() {
+  float2 arg_2 = (0.0f).xx;
+  uint arg_3 = 1u;
+  float arg_4 = 1.0f;
+  float res = arg_0.SampleCmpLevelZero(arg_1, float3(arg_2, float(arg_3)), arg_4);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureSampleCompareLevel_7dc3c0();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureSampleCompareLevel_7dc3c0();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureSampleCompareLevel_7dc3c0();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/7dc3c0.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleCompareLevel/7dc3c0.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..0283909
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/7dc3c0.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray arg_0 : register(t0, space1);
+SamplerComparisonState arg_1 : register(s1, space1);
+
+void textureSampleCompareLevel_7dc3c0() {
+  float2 arg_2 = (0.0f).xx;
+  uint arg_3 = 1u;
+  float arg_4 = 1.0f;
+  float res = arg_0.SampleCmpLevelZero(arg_1, float3(arg_2, float(arg_3)), arg_4);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureSampleCompareLevel_7dc3c0();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureSampleCompareLevel_7dc3c0();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureSampleCompareLevel_7dc3c0();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/7dc3c0.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSampleCompareLevel/7dc3c0.wgsl.expected.glsl
new file mode 100644
index 0000000..88a12ca
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/7dc3c0.wgsl.expected.glsl
@@ -0,0 +1,64 @@
+#version 310 es
+
+uniform highp sampler2DArrayShadow arg_0_arg_1;
+
+void textureSampleCompareLevel_7dc3c0() {
+  vec2 arg_2 = vec2(0.0f);
+  uint arg_3 = 1u;
+  float arg_4 = 1.0f;
+  float res = texture(arg_0_arg_1, vec4(vec3(arg_2, float(arg_3)), arg_4));
+}
+
+vec4 vertex_main() {
+  textureSampleCompareLevel_7dc3c0();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2DArrayShadow arg_0_arg_1;
+
+void textureSampleCompareLevel_7dc3c0() {
+  vec2 arg_2 = vec2(0.0f);
+  uint arg_3 = 1u;
+  float arg_4 = 1.0f;
+  float res = texture(arg_0_arg_1, vec4(vec3(arg_2, float(arg_3)), arg_4));
+}
+
+void fragment_main() {
+  textureSampleCompareLevel_7dc3c0();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp sampler2DArrayShadow arg_0_arg_1;
+
+void textureSampleCompareLevel_7dc3c0() {
+  vec2 arg_2 = vec2(0.0f);
+  uint arg_3 = 1u;
+  float arg_4 = 1.0f;
+  float res = texture(arg_0_arg_1, vec4(vec3(arg_2, float(arg_3)), arg_4));
+}
+
+void compute_main() {
+  textureSampleCompareLevel_7dc3c0();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/7dc3c0.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleCompareLevel/7dc3c0.wgsl.expected.msl
new file mode 100644
index 0000000..27a6c6e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/7dc3c0.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureSampleCompareLevel_7dc3c0(depth2d_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+  float2 arg_2 = float2(0.0f);
+  uint arg_3 = 1u;
+  float arg_4 = 1.0f;
+  float res = tint_symbol_1.sample_compare(tint_symbol_2, arg_2, arg_3, arg_4, level(0));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(depth2d_array<float, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+  textureSampleCompareLevel_7dc3c0(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(depth2d_array<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(depth2d_array<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+  textureSampleCompareLevel_7dc3c0(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(depth2d_array<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+  textureSampleCompareLevel_7dc3c0(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/7dc3c0.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleCompareLevel/7dc3c0.wgsl.expected.spvasm
new file mode 100644
index 0000000..e8bacfc
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/7dc3c0.wgsl.expected.spvasm
@@ -0,0 +1,105 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 59
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %arg_1 "arg_1"
+               OpName %textureSampleCompareLevel_7dc3c0 "textureSampleCompareLevel_7dc3c0"
+               OpName %arg_2 "arg_2"
+               OpName %arg_3 "arg_3"
+               OpName %arg_4 "arg_4"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %arg_1 DescriptorSet 1
+               OpDecorate %arg_1 Binding 1
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+         %14 = OpTypeSampler
+%_ptr_UniformConstant_14 = OpTypePointer UniformConstant %14
+      %arg_1 = OpVariable %_ptr_UniformConstant_14 UniformConstant
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+    %v2float = OpTypeVector %float 2
+         %20 = OpConstantNull %v2float
+%_ptr_Function_v2float = OpTypePointer Function %v2float
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %27 = OpConstantNull %uint
+    %float_1 = OpConstant %float 1
+%_ptr_Function_float = OpTypePointer Function %float
+         %34 = OpTypeSampledImage %11
+    %v3float = OpTypeVector %float 3
+    %float_0 = OpConstant %float 0
+         %46 = OpTypeFunction %v4float
+%textureSampleCompareLevel_7dc3c0 = OpFunction %void None %15
+         %18 = OpLabel
+      %arg_2 = OpVariable %_ptr_Function_v2float Function %20
+      %arg_3 = OpVariable %_ptr_Function_uint Function %27
+      %arg_4 = OpVariable %_ptr_Function_float Function %8
+        %res = OpVariable %_ptr_Function_float Function %8
+               OpStore %arg_2 %20
+               OpStore %arg_3 %uint_1
+               OpStore %arg_4 %float_1
+         %32 = OpLoad %14 %arg_1
+         %33 = OpLoad %11 %arg_0
+         %35 = OpSampledImage %34 %33 %32
+         %37 = OpLoad %v2float %arg_2
+         %38 = OpCompositeExtract %float %37 0
+         %39 = OpCompositeExtract %float %37 1
+         %41 = OpLoad %uint %arg_3
+         %40 = OpConvertUToF %float %41
+         %42 = OpCompositeConstruct %v3float %38 %39 %40
+         %43 = OpLoad %float %arg_4
+         %31 = OpImageSampleDrefExplicitLod %float %35 %42 %43 Lod %float_0
+               OpStore %res %31
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %46
+         %48 = OpLabel
+         %49 = OpFunctionCall %void %textureSampleCompareLevel_7dc3c0
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %51 = OpLabel
+         %52 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %52
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %54 = OpLabel
+         %55 = OpFunctionCall %void %textureSampleCompareLevel_7dc3c0
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %57 = OpLabel
+         %58 = OpFunctionCall %void %textureSampleCompareLevel_7dc3c0
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/7dc3c0.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleCompareLevel/7dc3c0.wgsl.expected.wgsl
new file mode 100644
index 0000000..b15d2d4
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/7dc3c0.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+@group(1) @binding(0) var arg_0 : texture_depth_2d_array;
+
+@group(1) @binding(1) var arg_1 : sampler_comparison;
+
+fn textureSampleCompareLevel_7dc3c0() {
+  var arg_2 = vec2<f32>();
+  var arg_3 = 1u;
+  var arg_4 = 1.0f;
+  var res : f32 = textureSampleCompareLevel(arg_0, arg_1, arg_2, arg_3, arg_4);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureSampleCompareLevel_7dc3c0();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureSampleCompareLevel_7dc3c0();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureSampleCompareLevel_7dc3c0();
+}
diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/958c87.wgsl b/test/tint/builtins/gen/var/textureSampleCompareLevel/958c87.wgsl
new file mode 100644
index 0000000..b6cd370
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/958c87.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_depth_cube_array;
+@group(1) @binding(1) var arg_1: sampler_comparison;
+
+// fn textureSampleCompareLevel(texture: texture_depth_cube_array, sampler: sampler_comparison, coords: vec3<f32>, array_index: u32, depth_ref: f32) -> f32
+fn textureSampleCompareLevel_958c87() {
+  var arg_2 = vec3<f32>();
+  var arg_3 = 1u;
+  var arg_4 = 1.f;
+  var res: f32 = textureSampleCompareLevel(arg_0, arg_1, arg_2, arg_3, arg_4);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureSampleCompareLevel_958c87();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureSampleCompareLevel_958c87();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureSampleCompareLevel_958c87();
+}
diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/958c87.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleCompareLevel/958c87.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..052b573
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/958c87.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+TextureCubeArray arg_0 : register(t0, space1);
+SamplerComparisonState arg_1 : register(s1, space1);
+
+void textureSampleCompareLevel_958c87() {
+  float3 arg_2 = (0.0f).xxx;
+  uint arg_3 = 1u;
+  float arg_4 = 1.0f;
+  float res = arg_0.SampleCmpLevelZero(arg_1, float4(arg_2, float(arg_3)), arg_4);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureSampleCompareLevel_958c87();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureSampleCompareLevel_958c87();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureSampleCompareLevel_958c87();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/958c87.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleCompareLevel/958c87.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..052b573
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/958c87.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+TextureCubeArray arg_0 : register(t0, space1);
+SamplerComparisonState arg_1 : register(s1, space1);
+
+void textureSampleCompareLevel_958c87() {
+  float3 arg_2 = (0.0f).xxx;
+  uint arg_3 = 1u;
+  float arg_4 = 1.0f;
+  float res = arg_0.SampleCmpLevelZero(arg_1, float4(arg_2, float(arg_3)), arg_4);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureSampleCompareLevel_958c87();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureSampleCompareLevel_958c87();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureSampleCompareLevel_958c87();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/958c87.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSampleCompareLevel/958c87.wgsl.expected.glsl
new file mode 100644
index 0000000..e765407
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/958c87.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+uniform highp samplerCubeArrayShadow arg_0_arg_1;
+
+void textureSampleCompareLevel_958c87() {
+  vec3 arg_2 = vec3(0.0f);
+  uint arg_3 = 1u;
+  float arg_4 = 1.0f;
+  float res = texture(arg_0_arg_1, vec4(arg_2, float(arg_3)), arg_4);
+}
+
+vec4 vertex_main() {
+  textureSampleCompareLevel_958c87();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  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: 'samplerCubeArrayShadow' : Reserved word. 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+uniform highp samplerCubeArrayShadow arg_0_arg_1;
+
+void textureSampleCompareLevel_958c87() {
+  vec3 arg_2 = vec3(0.0f);
+  uint arg_3 = 1u;
+  float arg_4 = 1.0f;
+  float res = texture(arg_0_arg_1, vec4(arg_2, float(arg_3)), arg_4);
+}
+
+void fragment_main() {
+  textureSampleCompareLevel_958c87();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'samplerCubeArrayShadow' : Reserved word. 
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+uniform highp samplerCubeArrayShadow arg_0_arg_1;
+
+void textureSampleCompareLevel_958c87() {
+  vec3 arg_2 = vec3(0.0f);
+  uint arg_3 = 1u;
+  float arg_4 = 1.0f;
+  float res = texture(arg_0_arg_1, vec4(arg_2, float(arg_3)), arg_4);
+}
+
+void compute_main() {
+  textureSampleCompareLevel_958c87();
+}
+
+layout(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: 'samplerCubeArrayShadow' : Reserved word. 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/958c87.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleCompareLevel/958c87.wgsl.expected.msl
new file mode 100644
index 0000000..bda2ec6
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/958c87.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureSampleCompareLevel_958c87(depthcube_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+  float3 arg_2 = float3(0.0f);
+  uint arg_3 = 1u;
+  float arg_4 = 1.0f;
+  float res = tint_symbol_1.sample_compare(tint_symbol_2, arg_2, arg_3, arg_4, level(0));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(depthcube_array<float, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+  textureSampleCompareLevel_958c87(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(depthcube_array<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(depthcube_array<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+  textureSampleCompareLevel_958c87(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(depthcube_array<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+  textureSampleCompareLevel_958c87(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/958c87.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleCompareLevel/958c87.wgsl.expected.spvasm
new file mode 100644
index 0000000..6f5a6ae
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/958c87.wgsl.expected.spvasm
@@ -0,0 +1,106 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 59
+; Schema: 0
+               OpCapability Shader
+               OpCapability SampledCubeArray
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %arg_1 "arg_1"
+               OpName %textureSampleCompareLevel_958c87 "textureSampleCompareLevel_958c87"
+               OpName %arg_2 "arg_2"
+               OpName %arg_3 "arg_3"
+               OpName %arg_4 "arg_4"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %arg_1 DescriptorSet 1
+               OpDecorate %arg_1 Binding 1
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float Cube 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+         %14 = OpTypeSampler
+%_ptr_UniformConstant_14 = OpTypePointer UniformConstant %14
+      %arg_1 = OpVariable %_ptr_UniformConstant_14 UniformConstant
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+    %v3float = OpTypeVector %float 3
+         %20 = OpConstantNull %v3float
+%_ptr_Function_v3float = OpTypePointer Function %v3float
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %27 = OpConstantNull %uint
+    %float_1 = OpConstant %float 1
+%_ptr_Function_float = OpTypePointer Function %float
+         %34 = OpTypeSampledImage %11
+    %float_0 = OpConstant %float 0
+         %46 = OpTypeFunction %v4float
+%textureSampleCompareLevel_958c87 = OpFunction %void None %15
+         %18 = OpLabel
+      %arg_2 = OpVariable %_ptr_Function_v3float Function %20
+      %arg_3 = OpVariable %_ptr_Function_uint Function %27
+      %arg_4 = OpVariable %_ptr_Function_float Function %8
+        %res = OpVariable %_ptr_Function_float Function %8
+               OpStore %arg_2 %20
+               OpStore %arg_3 %uint_1
+               OpStore %arg_4 %float_1
+         %32 = OpLoad %14 %arg_1
+         %33 = OpLoad %11 %arg_0
+         %35 = OpSampledImage %34 %33 %32
+         %36 = OpLoad %v3float %arg_2
+         %37 = OpCompositeExtract %float %36 0
+         %38 = OpCompositeExtract %float %36 1
+         %39 = OpCompositeExtract %float %36 2
+         %41 = OpLoad %uint %arg_3
+         %40 = OpConvertUToF %float %41
+         %42 = OpCompositeConstruct %v4float %37 %38 %39 %40
+         %43 = OpLoad %float %arg_4
+         %31 = OpImageSampleDrefExplicitLod %float %35 %42 %43 Lod %float_0
+               OpStore %res %31
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %46
+         %48 = OpLabel
+         %49 = OpFunctionCall %void %textureSampleCompareLevel_958c87
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %51 = OpLabel
+         %52 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %52
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %54 = OpLabel
+         %55 = OpFunctionCall %void %textureSampleCompareLevel_958c87
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %57 = OpLabel
+         %58 = OpFunctionCall %void %textureSampleCompareLevel_958c87
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/958c87.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleCompareLevel/958c87.wgsl.expected.wgsl
new file mode 100644
index 0000000..176df62
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/958c87.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+@group(1) @binding(0) var arg_0 : texture_depth_cube_array;
+
+@group(1) @binding(1) var arg_1 : sampler_comparison;
+
+fn textureSampleCompareLevel_958c87() {
+  var arg_2 = vec3<f32>();
+  var arg_3 = 1u;
+  var arg_4 = 1.0f;
+  var res : f32 = textureSampleCompareLevel(arg_0, arg_1, arg_2, arg_3, arg_4);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureSampleCompareLevel_958c87();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureSampleCompareLevel_958c87();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureSampleCompareLevel_958c87();
+}
diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/bcb3dd.wgsl b/test/tint/builtins/gen/var/textureSampleCompareLevel/bcb3dd.wgsl
new file mode 100644
index 0000000..b25925f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/bcb3dd.wgsl
@@ -0,0 +1,49 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_depth_2d_array;
+@group(1) @binding(1) var arg_1: sampler_comparison;
+
+// fn textureSampleCompareLevel(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2<f32>, array_index: u32, depth_ref: f32, @const offset: vec2<i32>) -> f32
+fn textureSampleCompareLevel_bcb3dd() {
+  var arg_2 = vec2<f32>();
+  var arg_3 = 1u;
+  var arg_4 = 1.f;
+  const arg_5 = vec2<i32>();
+  var res: f32 = textureSampleCompareLevel(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureSampleCompareLevel_bcb3dd();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureSampleCompareLevel_bcb3dd();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureSampleCompareLevel_bcb3dd();
+}
diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/bcb3dd.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleCompareLevel/bcb3dd.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..a184617
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/bcb3dd.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray arg_0 : register(t0, space1);
+SamplerComparisonState arg_1 : register(s1, space1);
+
+void textureSampleCompareLevel_bcb3dd() {
+  float2 arg_2 = (0.0f).xx;
+  uint arg_3 = 1u;
+  float arg_4 = 1.0f;
+  float res = arg_0.SampleCmpLevelZero(arg_1, float3(arg_2, float(arg_3)), arg_4, (0).xx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureSampleCompareLevel_bcb3dd();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureSampleCompareLevel_bcb3dd();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureSampleCompareLevel_bcb3dd();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/bcb3dd.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleCompareLevel/bcb3dd.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..a184617
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/bcb3dd.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray arg_0 : register(t0, space1);
+SamplerComparisonState arg_1 : register(s1, space1);
+
+void textureSampleCompareLevel_bcb3dd() {
+  float2 arg_2 = (0.0f).xx;
+  uint arg_3 = 1u;
+  float arg_4 = 1.0f;
+  float res = arg_0.SampleCmpLevelZero(arg_1, float3(arg_2, float(arg_3)), arg_4, (0).xx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureSampleCompareLevel_bcb3dd();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureSampleCompareLevel_bcb3dd();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureSampleCompareLevel_bcb3dd();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/bcb3dd.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSampleCompareLevel/bcb3dd.wgsl.expected.glsl
new file mode 100644
index 0000000..75de5c7
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/bcb3dd.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+uniform highp sampler2DArrayShadow arg_0_arg_1;
+
+void textureSampleCompareLevel_bcb3dd() {
+  vec2 arg_2 = vec2(0.0f);
+  uint arg_3 = 1u;
+  float arg_4 = 1.0f;
+  float res = textureOffset(arg_0_arg_1, vec4(vec3(arg_2, float(arg_3)), arg_4), ivec2(0));
+}
+
+vec4 vertex_main() {
+  textureSampleCompareLevel_bcb3dd();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:9: 'sampler' : TextureOffset does not support sampler2DArrayShadow :  ES Profile
+ERROR: 0:9: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2DArrayShadow arg_0_arg_1;
+
+void textureSampleCompareLevel_bcb3dd() {
+  vec2 arg_2 = vec2(0.0f);
+  uint arg_3 = 1u;
+  float arg_4 = 1.0f;
+  float res = textureOffset(arg_0_arg_1, vec4(vec3(arg_2, float(arg_3)), arg_4), ivec2(0));
+}
+
+void fragment_main() {
+  textureSampleCompareLevel_bcb3dd();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:10: 'sampler' : TextureOffset does not support sampler2DArrayShadow :  ES Profile
+ERROR: 0:10: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+uniform highp sampler2DArrayShadow arg_0_arg_1;
+
+void textureSampleCompareLevel_bcb3dd() {
+  vec2 arg_2 = vec2(0.0f);
+  uint arg_3 = 1u;
+  float arg_4 = 1.0f;
+  float res = textureOffset(arg_0_arg_1, vec4(vec3(arg_2, float(arg_3)), arg_4), ivec2(0));
+}
+
+void compute_main() {
+  textureSampleCompareLevel_bcb3dd();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:9: 'sampler' : TextureOffset does not support sampler2DArrayShadow :  ES Profile
+ERROR: 0:9: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/bcb3dd.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleCompareLevel/bcb3dd.wgsl.expected.msl
new file mode 100644
index 0000000..ece69aa
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/bcb3dd.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureSampleCompareLevel_bcb3dd(depth2d_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+  float2 arg_2 = float2(0.0f);
+  uint arg_3 = 1u;
+  float arg_4 = 1.0f;
+  float res = tint_symbol_1.sample_compare(tint_symbol_2, arg_2, arg_3, arg_4, level(0), int2(0));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(depth2d_array<float, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+  textureSampleCompareLevel_bcb3dd(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(depth2d_array<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(depth2d_array<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+  textureSampleCompareLevel_bcb3dd(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(depth2d_array<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+  textureSampleCompareLevel_bcb3dd(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/bcb3dd.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleCompareLevel/bcb3dd.wgsl.expected.spvasm
new file mode 100644
index 0000000..3900cd8
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/bcb3dd.wgsl.expected.spvasm
@@ -0,0 +1,108 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 62
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %arg_1 "arg_1"
+               OpName %textureSampleCompareLevel_bcb3dd "textureSampleCompareLevel_bcb3dd"
+               OpName %arg_2 "arg_2"
+               OpName %arg_3 "arg_3"
+               OpName %arg_4 "arg_4"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %arg_1 DescriptorSet 1
+               OpDecorate %arg_1 Binding 1
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+         %14 = OpTypeSampler
+%_ptr_UniformConstant_14 = OpTypePointer UniformConstant %14
+      %arg_1 = OpVariable %_ptr_UniformConstant_14 UniformConstant
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+    %v2float = OpTypeVector %float 2
+         %20 = OpConstantNull %v2float
+%_ptr_Function_v2float = OpTypePointer Function %v2float
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %27 = OpConstantNull %uint
+    %float_1 = OpConstant %float 1
+%_ptr_Function_float = OpTypePointer Function %float
+         %34 = OpTypeSampledImage %11
+    %v3float = OpTypeVector %float 3
+    %float_0 = OpConstant %float 0
+        %int = OpTypeInt 32 1
+      %v2int = OpTypeVector %int 2
+         %47 = OpConstantNull %v2int
+         %49 = OpTypeFunction %v4float
+%textureSampleCompareLevel_bcb3dd = OpFunction %void None %15
+         %18 = OpLabel
+      %arg_2 = OpVariable %_ptr_Function_v2float Function %20
+      %arg_3 = OpVariable %_ptr_Function_uint Function %27
+      %arg_4 = OpVariable %_ptr_Function_float Function %8
+        %res = OpVariable %_ptr_Function_float Function %8
+               OpStore %arg_2 %20
+               OpStore %arg_3 %uint_1
+               OpStore %arg_4 %float_1
+         %32 = OpLoad %14 %arg_1
+         %33 = OpLoad %11 %arg_0
+         %35 = OpSampledImage %34 %33 %32
+         %37 = OpLoad %v2float %arg_2
+         %38 = OpCompositeExtract %float %37 0
+         %39 = OpCompositeExtract %float %37 1
+         %41 = OpLoad %uint %arg_3
+         %40 = OpConvertUToF %float %41
+         %42 = OpCompositeConstruct %v3float %38 %39 %40
+         %43 = OpLoad %float %arg_4
+         %31 = OpImageSampleDrefExplicitLod %float %35 %42 %43 Lod|ConstOffset %float_0 %47
+               OpStore %res %31
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %49
+         %51 = OpLabel
+         %52 = OpFunctionCall %void %textureSampleCompareLevel_bcb3dd
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %54 = OpLabel
+         %55 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %55
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %57 = OpLabel
+         %58 = OpFunctionCall %void %textureSampleCompareLevel_bcb3dd
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %60 = OpLabel
+         %61 = OpFunctionCall %void %textureSampleCompareLevel_bcb3dd
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/bcb3dd.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleCompareLevel/bcb3dd.wgsl.expected.wgsl
new file mode 100644
index 0000000..1a2974a
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/bcb3dd.wgsl.expected.wgsl
@@ -0,0 +1,27 @@
+@group(1) @binding(0) var arg_0 : texture_depth_2d_array;
+
+@group(1) @binding(1) var arg_1 : sampler_comparison;
+
+fn textureSampleCompareLevel_bcb3dd() {
+  var arg_2 = vec2<f32>();
+  var arg_3 = 1u;
+  var arg_4 = 1.0f;
+  const arg_5 = vec2<i32>();
+  var res : f32 = textureSampleCompareLevel(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureSampleCompareLevel_bcb3dd();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureSampleCompareLevel_bcb3dd();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureSampleCompareLevel_bcb3dd();
+}
diff --git a/test/tint/builtins/gen/var/textureSampleGrad/7cd6de.wgsl b/test/tint/builtins/gen/var/textureSampleGrad/7cd6de.wgsl
new file mode 100644
index 0000000..d77c4f5
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleGrad/7cd6de.wgsl
@@ -0,0 +1,50 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_2d_array<f32>;
+@group(1) @binding(1) var arg_1: sampler;
+
+// fn textureSampleGrad(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: u32, ddx: vec2<f32>, ddy: vec2<f32>, @const offset: vec2<i32>) -> vec4<f32>
+fn textureSampleGrad_7cd6de() {
+  var arg_2 = vec2<f32>();
+  var arg_3 = 1u;
+  var arg_4 = vec2<f32>();
+  var arg_5 = vec2<f32>();
+  const arg_6 = vec2<i32>();
+  var res: vec4<f32> = textureSampleGrad(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5, arg_6);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureSampleGrad_7cd6de();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureSampleGrad_7cd6de();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureSampleGrad_7cd6de();
+}
diff --git a/test/tint/builtins/gen/var/textureSampleGrad/7cd6de.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleGrad/7cd6de.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..9bbb852
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleGrad/7cd6de.wgsl.expected.dxc.hlsl
@@ -0,0 +1,37 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSampleGrad_7cd6de() {
+  float2 arg_2 = (0.0f).xx;
+  uint arg_3 = 1u;
+  float2 arg_4 = (0.0f).xx;
+  float2 arg_5 = (0.0f).xx;
+  float4 res = arg_0.SampleGrad(arg_1, float3(arg_2, float(arg_3)), arg_4, arg_5, (0).xx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureSampleGrad_7cd6de();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureSampleGrad_7cd6de();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureSampleGrad_7cd6de();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureSampleGrad/7cd6de.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleGrad/7cd6de.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..9bbb852
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleGrad/7cd6de.wgsl.expected.fxc.hlsl
@@ -0,0 +1,37 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSampleGrad_7cd6de() {
+  float2 arg_2 = (0.0f).xx;
+  uint arg_3 = 1u;
+  float2 arg_4 = (0.0f).xx;
+  float2 arg_5 = (0.0f).xx;
+  float4 res = arg_0.SampleGrad(arg_1, float3(arg_2, float(arg_3)), arg_4, arg_5, (0).xx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureSampleGrad_7cd6de();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureSampleGrad_7cd6de();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureSampleGrad_7cd6de();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureSampleGrad/7cd6de.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSampleGrad/7cd6de.wgsl.expected.glsl
new file mode 100644
index 0000000..876815f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleGrad/7cd6de.wgsl.expected.glsl
@@ -0,0 +1,67 @@
+#version 310 es
+
+uniform highp sampler2DArray arg_0_arg_1;
+
+void textureSampleGrad_7cd6de() {
+  vec2 arg_2 = vec2(0.0f);
+  uint arg_3 = 1u;
+  vec2 arg_4 = vec2(0.0f);
+  vec2 arg_5 = vec2(0.0f);
+  vec4 res = textureGradOffset(arg_0_arg_1, vec3(arg_2, float(arg_3)), arg_4, arg_5, ivec2(0));
+}
+
+vec4 vertex_main() {
+  textureSampleGrad_7cd6de();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2DArray arg_0_arg_1;
+
+void textureSampleGrad_7cd6de() {
+  vec2 arg_2 = vec2(0.0f);
+  uint arg_3 = 1u;
+  vec2 arg_4 = vec2(0.0f);
+  vec2 arg_5 = vec2(0.0f);
+  vec4 res = textureGradOffset(arg_0_arg_1, vec3(arg_2, float(arg_3)), arg_4, arg_5, ivec2(0));
+}
+
+void fragment_main() {
+  textureSampleGrad_7cd6de();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp sampler2DArray arg_0_arg_1;
+
+void textureSampleGrad_7cd6de() {
+  vec2 arg_2 = vec2(0.0f);
+  uint arg_3 = 1u;
+  vec2 arg_4 = vec2(0.0f);
+  vec2 arg_5 = vec2(0.0f);
+  vec4 res = textureGradOffset(arg_0_arg_1, vec3(arg_2, float(arg_3)), arg_4, arg_5, ivec2(0));
+}
+
+void compute_main() {
+  textureSampleGrad_7cd6de();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureSampleGrad/7cd6de.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleGrad/7cd6de.wgsl.expected.msl
new file mode 100644
index 0000000..b8f980b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleGrad/7cd6de.wgsl.expected.msl
@@ -0,0 +1,37 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureSampleGrad_7cd6de(texture2d_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+  float2 arg_2 = float2(0.0f);
+  uint arg_3 = 1u;
+  float2 arg_4 = float2(0.0f);
+  float2 arg_5 = float2(0.0f);
+  float4 res = tint_symbol_1.sample(tint_symbol_2, arg_2, arg_3, gradient2d(arg_4, arg_5), int2(0));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<float, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+  textureSampleGrad_7cd6de(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+  textureSampleGrad_7cd6de(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+  textureSampleGrad_7cd6de(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureSampleGrad/7cd6de.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleGrad/7cd6de.wgsl.expected.spvasm
new file mode 100644
index 0000000..174acb5
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleGrad/7cd6de.wgsl.expected.spvasm
@@ -0,0 +1,111 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 63
+; 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 %arg_1 "arg_1"
+               OpName %textureSampleGrad_7cd6de "textureSampleGrad_7cd6de"
+               OpName %arg_2 "arg_2"
+               OpName %arg_3 "arg_3"
+               OpName %arg_4 "arg_4"
+               OpName %arg_5 "arg_5"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %arg_1 DescriptorSet 1
+               OpDecorate %arg_1 Binding 1
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+         %14 = OpTypeSampler
+%_ptr_UniformConstant_14 = OpTypePointer UniformConstant %14
+      %arg_1 = OpVariable %_ptr_UniformConstant_14 UniformConstant
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+    %v2float = OpTypeVector %float 2
+         %20 = OpConstantNull %v2float
+%_ptr_Function_v2float = OpTypePointer Function %v2float
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %27 = OpConstantNull %uint
+         %33 = OpTypeSampledImage %11
+    %v3float = OpTypeVector %float 3
+        %int = OpTypeInt 32 1
+      %v2int = OpTypeVector %int 2
+         %46 = OpConstantNull %v2int
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+         %49 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureSampleGrad_7cd6de = OpFunction %void None %15
+         %18 = OpLabel
+      %arg_2 = OpVariable %_ptr_Function_v2float Function %20
+      %arg_3 = OpVariable %_ptr_Function_uint Function %27
+      %arg_4 = OpVariable %_ptr_Function_v2float Function %20
+      %arg_5 = OpVariable %_ptr_Function_v2float Function %20
+        %res = OpVariable %_ptr_Function_v4float Function %5
+               OpStore %arg_2 %20
+               OpStore %arg_3 %uint_1
+               OpStore %arg_4 %20
+               OpStore %arg_5 %20
+         %31 = OpLoad %14 %arg_1
+         %32 = OpLoad %11 %arg_0
+         %34 = OpSampledImage %33 %32 %31
+         %36 = OpLoad %v2float %arg_2
+         %37 = OpCompositeExtract %float %36 0
+         %38 = OpCompositeExtract %float %36 1
+         %40 = OpLoad %uint %arg_3
+         %39 = OpConvertUToF %float %40
+         %41 = OpCompositeConstruct %v3float %37 %38 %39
+         %42 = OpLoad %v2float %arg_4
+         %43 = OpLoad %v2float %arg_5
+         %30 = OpImageSampleExplicitLod %v4float %34 %41 Grad|ConstOffset %42 %43 %46
+               OpStore %res %30
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %49
+         %51 = OpLabel
+         %52 = OpFunctionCall %void %textureSampleGrad_7cd6de
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %54 = OpLabel
+         %55 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %55
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %58 = OpLabel
+         %59 = OpFunctionCall %void %textureSampleGrad_7cd6de
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %61 = OpLabel
+         %62 = OpFunctionCall %void %textureSampleGrad_7cd6de
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureSampleGrad/7cd6de.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleGrad/7cd6de.wgsl.expected.wgsl
new file mode 100644
index 0000000..96e7b81
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleGrad/7cd6de.wgsl.expected.wgsl
@@ -0,0 +1,28 @@
+@group(1) @binding(0) var arg_0 : texture_2d_array<f32>;
+
+@group(1) @binding(1) var arg_1 : sampler;
+
+fn textureSampleGrad_7cd6de() {
+  var arg_2 = vec2<f32>();
+  var arg_3 = 1u;
+  var arg_4 = vec2<f32>();
+  var arg_5 = vec2<f32>();
+  const arg_6 = vec2<i32>();
+  var res : vec4<f32> = textureSampleGrad(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5, arg_6);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureSampleGrad_7cd6de();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureSampleGrad_7cd6de();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureSampleGrad_7cd6de();
+}
diff --git a/test/tint/builtins/gen/var/textureSampleGrad/a09131.wgsl b/test/tint/builtins/gen/var/textureSampleGrad/a09131.wgsl
new file mode 100644
index 0000000..b741911
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleGrad/a09131.wgsl
@@ -0,0 +1,49 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_2d_array<f32>;
+@group(1) @binding(1) var arg_1: sampler;
+
+// fn textureSampleGrad(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: u32, ddx: vec2<f32>, ddy: vec2<f32>) -> vec4<f32>
+fn textureSampleGrad_a09131() {
+  var arg_2 = vec2<f32>();
+  var arg_3 = 1u;
+  var arg_4 = vec2<f32>();
+  var arg_5 = vec2<f32>();
+  var res: vec4<f32> = textureSampleGrad(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureSampleGrad_a09131();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureSampleGrad_a09131();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureSampleGrad_a09131();
+}
diff --git a/test/tint/builtins/gen/var/textureSampleGrad/a09131.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleGrad/a09131.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..408ec2f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleGrad/a09131.wgsl.expected.dxc.hlsl
@@ -0,0 +1,37 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSampleGrad_a09131() {
+  float2 arg_2 = (0.0f).xx;
+  uint arg_3 = 1u;
+  float2 arg_4 = (0.0f).xx;
+  float2 arg_5 = (0.0f).xx;
+  float4 res = arg_0.SampleGrad(arg_1, float3(arg_2, float(arg_3)), arg_4, arg_5);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureSampleGrad_a09131();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureSampleGrad_a09131();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureSampleGrad_a09131();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureSampleGrad/a09131.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleGrad/a09131.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..408ec2f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleGrad/a09131.wgsl.expected.fxc.hlsl
@@ -0,0 +1,37 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSampleGrad_a09131() {
+  float2 arg_2 = (0.0f).xx;
+  uint arg_3 = 1u;
+  float2 arg_4 = (0.0f).xx;
+  float2 arg_5 = (0.0f).xx;
+  float4 res = arg_0.SampleGrad(arg_1, float3(arg_2, float(arg_3)), arg_4, arg_5);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureSampleGrad_a09131();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureSampleGrad_a09131();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureSampleGrad_a09131();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureSampleGrad/a09131.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSampleGrad/a09131.wgsl.expected.glsl
new file mode 100644
index 0000000..ce8038c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleGrad/a09131.wgsl.expected.glsl
@@ -0,0 +1,67 @@
+#version 310 es
+
+uniform highp sampler2DArray arg_0_arg_1;
+
+void textureSampleGrad_a09131() {
+  vec2 arg_2 = vec2(0.0f);
+  uint arg_3 = 1u;
+  vec2 arg_4 = vec2(0.0f);
+  vec2 arg_5 = vec2(0.0f);
+  vec4 res = textureGrad(arg_0_arg_1, vec3(arg_2, float(arg_3)), arg_4, arg_5);
+}
+
+vec4 vertex_main() {
+  textureSampleGrad_a09131();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2DArray arg_0_arg_1;
+
+void textureSampleGrad_a09131() {
+  vec2 arg_2 = vec2(0.0f);
+  uint arg_3 = 1u;
+  vec2 arg_4 = vec2(0.0f);
+  vec2 arg_5 = vec2(0.0f);
+  vec4 res = textureGrad(arg_0_arg_1, vec3(arg_2, float(arg_3)), arg_4, arg_5);
+}
+
+void fragment_main() {
+  textureSampleGrad_a09131();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp sampler2DArray arg_0_arg_1;
+
+void textureSampleGrad_a09131() {
+  vec2 arg_2 = vec2(0.0f);
+  uint arg_3 = 1u;
+  vec2 arg_4 = vec2(0.0f);
+  vec2 arg_5 = vec2(0.0f);
+  vec4 res = textureGrad(arg_0_arg_1, vec3(arg_2, float(arg_3)), arg_4, arg_5);
+}
+
+void compute_main() {
+  textureSampleGrad_a09131();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureSampleGrad/a09131.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleGrad/a09131.wgsl.expected.msl
new file mode 100644
index 0000000..1065f83
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleGrad/a09131.wgsl.expected.msl
@@ -0,0 +1,37 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureSampleGrad_a09131(texture2d_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+  float2 arg_2 = float2(0.0f);
+  uint arg_3 = 1u;
+  float2 arg_4 = float2(0.0f);
+  float2 arg_5 = float2(0.0f);
+  float4 res = tint_symbol_1.sample(tint_symbol_2, arg_2, arg_3, gradient2d(arg_4, arg_5));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<float, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+  textureSampleGrad_a09131(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+  textureSampleGrad_a09131(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+  textureSampleGrad_a09131(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureSampleGrad/a09131.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleGrad/a09131.wgsl.expected.spvasm
new file mode 100644
index 0000000..031b5d1
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleGrad/a09131.wgsl.expected.spvasm
@@ -0,0 +1,108 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 60
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %arg_1 "arg_1"
+               OpName %textureSampleGrad_a09131 "textureSampleGrad_a09131"
+               OpName %arg_2 "arg_2"
+               OpName %arg_3 "arg_3"
+               OpName %arg_4 "arg_4"
+               OpName %arg_5 "arg_5"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %arg_1 DescriptorSet 1
+               OpDecorate %arg_1 Binding 1
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+         %14 = OpTypeSampler
+%_ptr_UniformConstant_14 = OpTypePointer UniformConstant %14
+      %arg_1 = OpVariable %_ptr_UniformConstant_14 UniformConstant
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+    %v2float = OpTypeVector %float 2
+         %20 = OpConstantNull %v2float
+%_ptr_Function_v2float = OpTypePointer Function %v2float
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %27 = OpConstantNull %uint
+         %33 = OpTypeSampledImage %11
+    %v3float = OpTypeVector %float 3
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+         %46 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureSampleGrad_a09131 = OpFunction %void None %15
+         %18 = OpLabel
+      %arg_2 = OpVariable %_ptr_Function_v2float Function %20
+      %arg_3 = OpVariable %_ptr_Function_uint Function %27
+      %arg_4 = OpVariable %_ptr_Function_v2float Function %20
+      %arg_5 = OpVariable %_ptr_Function_v2float Function %20
+        %res = OpVariable %_ptr_Function_v4float Function %5
+               OpStore %arg_2 %20
+               OpStore %arg_3 %uint_1
+               OpStore %arg_4 %20
+               OpStore %arg_5 %20
+         %31 = OpLoad %14 %arg_1
+         %32 = OpLoad %11 %arg_0
+         %34 = OpSampledImage %33 %32 %31
+         %36 = OpLoad %v2float %arg_2
+         %37 = OpCompositeExtract %float %36 0
+         %38 = OpCompositeExtract %float %36 1
+         %40 = OpLoad %uint %arg_3
+         %39 = OpConvertUToF %float %40
+         %41 = OpCompositeConstruct %v3float %37 %38 %39
+         %42 = OpLoad %v2float %arg_4
+         %43 = OpLoad %v2float %arg_5
+         %30 = OpImageSampleExplicitLod %v4float %34 %41 Grad %42 %43
+               OpStore %res %30
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %46
+         %48 = OpLabel
+         %49 = OpFunctionCall %void %textureSampleGrad_a09131
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %51 = OpLabel
+         %52 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %52
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %55 = OpLabel
+         %56 = OpFunctionCall %void %textureSampleGrad_a09131
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %58 = OpLabel
+         %59 = OpFunctionCall %void %textureSampleGrad_a09131
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureSampleGrad/a09131.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleGrad/a09131.wgsl.expected.wgsl
new file mode 100644
index 0000000..b15bd3a
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleGrad/a09131.wgsl.expected.wgsl
@@ -0,0 +1,27 @@
+@group(1) @binding(0) var arg_0 : texture_2d_array<f32>;
+
+@group(1) @binding(1) var arg_1 : sampler;
+
+fn textureSampleGrad_a09131() {
+  var arg_2 = vec2<f32>();
+  var arg_3 = 1u;
+  var arg_4 = vec2<f32>();
+  var arg_5 = vec2<f32>();
+  var res : vec4<f32> = textureSampleGrad(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureSampleGrad_a09131();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureSampleGrad_a09131();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureSampleGrad_a09131();
+}
diff --git a/test/tint/builtins/gen/var/textureSampleGrad/bbb58f.wgsl b/test/tint/builtins/gen/var/textureSampleGrad/bbb58f.wgsl
new file mode 100644
index 0000000..0df48a1
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleGrad/bbb58f.wgsl
@@ -0,0 +1,49 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_cube_array<f32>;
+@group(1) @binding(1) var arg_1: sampler;
+
+// fn textureSampleGrad(texture: texture_cube_array<f32>, sampler: sampler, coords: vec3<f32>, array_index: u32, ddx: vec3<f32>, ddy: vec3<f32>) -> vec4<f32>
+fn textureSampleGrad_bbb58f() {
+  var arg_2 = vec3<f32>();
+  var arg_3 = 1u;
+  var arg_4 = vec3<f32>();
+  var arg_5 = vec3<f32>();
+  var res: vec4<f32> = textureSampleGrad(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureSampleGrad_bbb58f();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureSampleGrad_bbb58f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureSampleGrad_bbb58f();
+}
diff --git a/test/tint/builtins/gen/var/textureSampleGrad/bbb58f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleGrad/bbb58f.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..da308d6
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleGrad/bbb58f.wgsl.expected.dxc.hlsl
@@ -0,0 +1,37 @@
+TextureCubeArray<float4> arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSampleGrad_bbb58f() {
+  float3 arg_2 = (0.0f).xxx;
+  uint arg_3 = 1u;
+  float3 arg_4 = (0.0f).xxx;
+  float3 arg_5 = (0.0f).xxx;
+  float4 res = arg_0.SampleGrad(arg_1, float4(arg_2, float(arg_3)), arg_4, arg_5);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureSampleGrad_bbb58f();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureSampleGrad_bbb58f();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureSampleGrad_bbb58f();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureSampleGrad/bbb58f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleGrad/bbb58f.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..da308d6
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleGrad/bbb58f.wgsl.expected.fxc.hlsl
@@ -0,0 +1,37 @@
+TextureCubeArray<float4> arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSampleGrad_bbb58f() {
+  float3 arg_2 = (0.0f).xxx;
+  uint arg_3 = 1u;
+  float3 arg_4 = (0.0f).xxx;
+  float3 arg_5 = (0.0f).xxx;
+  float4 res = arg_0.SampleGrad(arg_1, float4(arg_2, float(arg_3)), arg_4, arg_5);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureSampleGrad_bbb58f();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureSampleGrad_bbb58f();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureSampleGrad_bbb58f();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureSampleGrad/bbb58f.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSampleGrad/bbb58f.wgsl.expected.glsl
new file mode 100644
index 0000000..19810e7
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleGrad/bbb58f.wgsl.expected.glsl
@@ -0,0 +1,90 @@
+SKIP: FAILED
+
+#version 310 es
+
+uniform highp samplerCubeArray arg_0_arg_1;
+
+void textureSampleGrad_bbb58f() {
+  vec3 arg_2 = vec3(0.0f);
+  uint arg_3 = 1u;
+  vec3 arg_4 = vec3(0.0f);
+  vec3 arg_5 = vec3(0.0f);
+  vec4 res = textureGrad(arg_0_arg_1, vec4(arg_2, float(arg_3)), arg_4, arg_5);
+}
+
+vec4 vertex_main() {
+  textureSampleGrad_bbb58f();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'samplerCubeArray' : Reserved word. 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+uniform highp samplerCubeArray arg_0_arg_1;
+
+void textureSampleGrad_bbb58f() {
+  vec3 arg_2 = vec3(0.0f);
+  uint arg_3 = 1u;
+  vec3 arg_4 = vec3(0.0f);
+  vec3 arg_5 = vec3(0.0f);
+  vec4 res = textureGrad(arg_0_arg_1, vec4(arg_2, float(arg_3)), arg_4, arg_5);
+}
+
+void fragment_main() {
+  textureSampleGrad_bbb58f();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'samplerCubeArray' : Reserved word. 
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+uniform highp samplerCubeArray arg_0_arg_1;
+
+void textureSampleGrad_bbb58f() {
+  vec3 arg_2 = vec3(0.0f);
+  uint arg_3 = 1u;
+  vec3 arg_4 = vec3(0.0f);
+  vec3 arg_5 = vec3(0.0f);
+  vec4 res = textureGrad(arg_0_arg_1, vec4(arg_2, float(arg_3)), arg_4, arg_5);
+}
+
+void compute_main() {
+  textureSampleGrad_bbb58f();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'samplerCubeArray' : Reserved word. 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureSampleGrad/bbb58f.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleGrad/bbb58f.wgsl.expected.msl
new file mode 100644
index 0000000..53879d7
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleGrad/bbb58f.wgsl.expected.msl
@@ -0,0 +1,37 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureSampleGrad_bbb58f(texturecube_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+  float3 arg_2 = float3(0.0f);
+  uint arg_3 = 1u;
+  float3 arg_4 = float3(0.0f);
+  float3 arg_5 = float3(0.0f);
+  float4 res = tint_symbol_1.sample(tint_symbol_2, arg_2, arg_3, gradientcube(arg_4, arg_5));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texturecube_array<float, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+  textureSampleGrad_bbb58f(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texturecube_array<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texturecube_array<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+  textureSampleGrad_bbb58f(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texturecube_array<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+  textureSampleGrad_bbb58f(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureSampleGrad/bbb58f.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleGrad/bbb58f.wgsl.expected.spvasm
new file mode 100644
index 0000000..4905a93
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleGrad/bbb58f.wgsl.expected.spvasm
@@ -0,0 +1,109 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 60
+; Schema: 0
+               OpCapability Shader
+               OpCapability SampledCubeArray
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %arg_1 "arg_1"
+               OpName %textureSampleGrad_bbb58f "textureSampleGrad_bbb58f"
+               OpName %arg_2 "arg_2"
+               OpName %arg_3 "arg_3"
+               OpName %arg_4 "arg_4"
+               OpName %arg_5 "arg_5"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %arg_1 DescriptorSet 1
+               OpDecorate %arg_1 Binding 1
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float Cube 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+         %14 = OpTypeSampler
+%_ptr_UniformConstant_14 = OpTypePointer UniformConstant %14
+      %arg_1 = OpVariable %_ptr_UniformConstant_14 UniformConstant
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+    %v3float = OpTypeVector %float 3
+         %20 = OpConstantNull %v3float
+%_ptr_Function_v3float = OpTypePointer Function %v3float
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %27 = OpConstantNull %uint
+         %33 = OpTypeSampledImage %11
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+         %46 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureSampleGrad_bbb58f = OpFunction %void None %15
+         %18 = OpLabel
+      %arg_2 = OpVariable %_ptr_Function_v3float Function %20
+      %arg_3 = OpVariable %_ptr_Function_uint Function %27
+      %arg_4 = OpVariable %_ptr_Function_v3float Function %20
+      %arg_5 = OpVariable %_ptr_Function_v3float Function %20
+        %res = OpVariable %_ptr_Function_v4float Function %5
+               OpStore %arg_2 %20
+               OpStore %arg_3 %uint_1
+               OpStore %arg_4 %20
+               OpStore %arg_5 %20
+         %31 = OpLoad %14 %arg_1
+         %32 = OpLoad %11 %arg_0
+         %34 = OpSampledImage %33 %32 %31
+         %35 = OpLoad %v3float %arg_2
+         %36 = OpCompositeExtract %float %35 0
+         %37 = OpCompositeExtract %float %35 1
+         %38 = OpCompositeExtract %float %35 2
+         %40 = OpLoad %uint %arg_3
+         %39 = OpConvertUToF %float %40
+         %41 = OpCompositeConstruct %v4float %36 %37 %38 %39
+         %42 = OpLoad %v3float %arg_4
+         %43 = OpLoad %v3float %arg_5
+         %30 = OpImageSampleExplicitLod %v4float %34 %41 Grad %42 %43
+               OpStore %res %30
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %46
+         %48 = OpLabel
+         %49 = OpFunctionCall %void %textureSampleGrad_bbb58f
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %51 = OpLabel
+         %52 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %52
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %55 = OpLabel
+         %56 = OpFunctionCall %void %textureSampleGrad_bbb58f
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %58 = OpLabel
+         %59 = OpFunctionCall %void %textureSampleGrad_bbb58f
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureSampleGrad/bbb58f.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleGrad/bbb58f.wgsl.expected.wgsl
new file mode 100644
index 0000000..2419db8
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleGrad/bbb58f.wgsl.expected.wgsl
@@ -0,0 +1,27 @@
+@group(1) @binding(0) var arg_0 : texture_cube_array<f32>;
+
+@group(1) @binding(1) var arg_1 : sampler;
+
+fn textureSampleGrad_bbb58f() {
+  var arg_2 = vec3<f32>();
+  var arg_3 = 1u;
+  var arg_4 = vec3<f32>();
+  var arg_5 = vec3<f32>();
+  var res : vec4<f32> = textureSampleGrad(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureSampleGrad_bbb58f();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureSampleGrad_bbb58f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureSampleGrad_bbb58f();
+}
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/265cc7.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/265cc7.wgsl
new file mode 100644
index 0000000..20ae0d8
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleLevel/265cc7.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_2d_array<f32>;
+@group(1) @binding(1) var arg_1: sampler;
+
+// fn textureSampleLevel(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: u32, level: f32) -> vec4<f32>
+fn textureSampleLevel_265cc7() {
+  var arg_2 = vec2<f32>();
+  var arg_3 = 1u;
+  var arg_4 = 1.f;
+  var res: vec4<f32> = textureSampleLevel(arg_0, arg_1, arg_2, arg_3, arg_4);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureSampleLevel_265cc7();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureSampleLevel_265cc7();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureSampleLevel_265cc7();
+}
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/265cc7.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleLevel/265cc7.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..b5bdc03
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleLevel/265cc7.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSampleLevel_265cc7() {
+  float2 arg_2 = (0.0f).xx;
+  uint arg_3 = 1u;
+  float arg_4 = 1.0f;
+  float4 res = arg_0.SampleLevel(arg_1, float3(arg_2, float(arg_3)), arg_4);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureSampleLevel_265cc7();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureSampleLevel_265cc7();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureSampleLevel_265cc7();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/265cc7.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleLevel/265cc7.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..b5bdc03
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleLevel/265cc7.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSampleLevel_265cc7() {
+  float2 arg_2 = (0.0f).xx;
+  uint arg_3 = 1u;
+  float arg_4 = 1.0f;
+  float4 res = arg_0.SampleLevel(arg_1, float3(arg_2, float(arg_3)), arg_4);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureSampleLevel_265cc7();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureSampleLevel_265cc7();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureSampleLevel_265cc7();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/265cc7.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSampleLevel/265cc7.wgsl.expected.glsl
new file mode 100644
index 0000000..e6ee969
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleLevel/265cc7.wgsl.expected.glsl
@@ -0,0 +1,64 @@
+#version 310 es
+
+uniform highp sampler2DArray arg_0_arg_1;
+
+void textureSampleLevel_265cc7() {
+  vec2 arg_2 = vec2(0.0f);
+  uint arg_3 = 1u;
+  float arg_4 = 1.0f;
+  vec4 res = textureLod(arg_0_arg_1, vec3(arg_2, float(arg_3)), arg_4);
+}
+
+vec4 vertex_main() {
+  textureSampleLevel_265cc7();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2DArray arg_0_arg_1;
+
+void textureSampleLevel_265cc7() {
+  vec2 arg_2 = vec2(0.0f);
+  uint arg_3 = 1u;
+  float arg_4 = 1.0f;
+  vec4 res = textureLod(arg_0_arg_1, vec3(arg_2, float(arg_3)), arg_4);
+}
+
+void fragment_main() {
+  textureSampleLevel_265cc7();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp sampler2DArray arg_0_arg_1;
+
+void textureSampleLevel_265cc7() {
+  vec2 arg_2 = vec2(0.0f);
+  uint arg_3 = 1u;
+  float arg_4 = 1.0f;
+  vec4 res = textureLod(arg_0_arg_1, vec3(arg_2, float(arg_3)), arg_4);
+}
+
+void compute_main() {
+  textureSampleLevel_265cc7();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/265cc7.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleLevel/265cc7.wgsl.expected.msl
new file mode 100644
index 0000000..87765ee
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleLevel/265cc7.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureSampleLevel_265cc7(texture2d_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+  float2 arg_2 = float2(0.0f);
+  uint arg_3 = 1u;
+  float arg_4 = 1.0f;
+  float4 res = tint_symbol_1.sample(tint_symbol_2, arg_2, arg_3, level(arg_4));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<float, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+  textureSampleLevel_265cc7(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+  textureSampleLevel_265cc7(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+  textureSampleLevel_265cc7(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/265cc7.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleLevel/265cc7.wgsl.expected.spvasm
new file mode 100644
index 0000000..1c0eae9
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleLevel/265cc7.wgsl.expected.spvasm
@@ -0,0 +1,105 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 59
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %arg_1 "arg_1"
+               OpName %textureSampleLevel_265cc7 "textureSampleLevel_265cc7"
+               OpName %arg_2 "arg_2"
+               OpName %arg_3 "arg_3"
+               OpName %arg_4 "arg_4"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %arg_1 DescriptorSet 1
+               OpDecorate %arg_1 Binding 1
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+         %14 = OpTypeSampler
+%_ptr_UniformConstant_14 = OpTypePointer UniformConstant %14
+      %arg_1 = OpVariable %_ptr_UniformConstant_14 UniformConstant
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+    %v2float = OpTypeVector %float 2
+         %20 = OpConstantNull %v2float
+%_ptr_Function_v2float = OpTypePointer Function %v2float
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %27 = OpConstantNull %uint
+    %float_1 = OpConstant %float 1
+%_ptr_Function_float = OpTypePointer Function %float
+         %34 = OpTypeSampledImage %11
+    %v3float = OpTypeVector %float 3
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+         %46 = OpTypeFunction %v4float
+%textureSampleLevel_265cc7 = OpFunction %void None %15
+         %18 = OpLabel
+      %arg_2 = OpVariable %_ptr_Function_v2float Function %20
+      %arg_3 = OpVariable %_ptr_Function_uint Function %27
+      %arg_4 = OpVariable %_ptr_Function_float Function %8
+        %res = OpVariable %_ptr_Function_v4float Function %5
+               OpStore %arg_2 %20
+               OpStore %arg_3 %uint_1
+               OpStore %arg_4 %float_1
+         %32 = OpLoad %14 %arg_1
+         %33 = OpLoad %11 %arg_0
+         %35 = OpSampledImage %34 %33 %32
+         %37 = OpLoad %v2float %arg_2
+         %38 = OpCompositeExtract %float %37 0
+         %39 = OpCompositeExtract %float %37 1
+         %41 = OpLoad %uint %arg_3
+         %40 = OpConvertUToF %float %41
+         %42 = OpCompositeConstruct %v3float %38 %39 %40
+         %43 = OpLoad %float %arg_4
+         %31 = OpImageSampleExplicitLod %v4float %35 %42 Lod %43
+               OpStore %res %31
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %46
+         %48 = OpLabel
+         %49 = OpFunctionCall %void %textureSampleLevel_265cc7
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %51 = OpLabel
+         %52 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %52
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %54 = OpLabel
+         %55 = OpFunctionCall %void %textureSampleLevel_265cc7
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %57 = OpLabel
+         %58 = OpFunctionCall %void %textureSampleLevel_265cc7
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/265cc7.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/265cc7.wgsl.expected.wgsl
new file mode 100644
index 0000000..d46530b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleLevel/265cc7.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+@group(1) @binding(0) var arg_0 : texture_2d_array<f32>;
+
+@group(1) @binding(1) var arg_1 : sampler;
+
+fn textureSampleLevel_265cc7() {
+  var arg_2 = vec2<f32>();
+  var arg_3 = 1u;
+  var arg_4 = 1.0f;
+  var res : vec4<f32> = textureSampleLevel(arg_0, arg_1, arg_2, arg_3, arg_4);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureSampleLevel_265cc7();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureSampleLevel_265cc7();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureSampleLevel_265cc7();
+}
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/615583.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/615583.wgsl
new file mode 100644
index 0000000..e158313
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleLevel/615583.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_depth_2d_array;
+@group(1) @binding(1) var arg_1: sampler;
+
+// fn textureSampleLevel(texture: texture_depth_2d_array, sampler: sampler, coords: vec2<f32>, array_index: u32, level: u32) -> f32
+fn textureSampleLevel_615583() {
+  var arg_2 = vec2<f32>();
+  var arg_3 = 1u;
+  var arg_4 = 1u;
+  var res: f32 = textureSampleLevel(arg_0, arg_1, arg_2, arg_3, arg_4);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureSampleLevel_615583();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureSampleLevel_615583();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureSampleLevel_615583();
+}
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/615583.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleLevel/615583.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..cbc17e9
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleLevel/615583.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSampleLevel_615583() {
+  float2 arg_2 = (0.0f).xx;
+  uint arg_3 = 1u;
+  uint arg_4 = 1u;
+  float res = arg_0.SampleLevel(arg_1, float3(arg_2, float(arg_3)), arg_4).x;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureSampleLevel_615583();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureSampleLevel_615583();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureSampleLevel_615583();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/615583.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleLevel/615583.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..cbc17e9
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleLevel/615583.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSampleLevel_615583() {
+  float2 arg_2 = (0.0f).xx;
+  uint arg_3 = 1u;
+  uint arg_4 = 1u;
+  float res = arg_0.SampleLevel(arg_1, float3(arg_2, float(arg_3)), arg_4).x;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureSampleLevel_615583();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureSampleLevel_615583();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureSampleLevel_615583();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/615583.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSampleLevel/615583.wgsl.expected.glsl
new file mode 100644
index 0000000..1a8bebf
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleLevel/615583.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+uniform highp sampler2DArrayShadow arg_0_arg_1;
+
+void textureSampleLevel_615583() {
+  vec2 arg_2 = vec2(0.0f);
+  uint arg_3 = 1u;
+  uint arg_4 = 1u;
+  float res = textureLod(arg_0_arg_1, vec4(vec3(arg_2, float(arg_3)), 0.0f), float(arg_4));
+}
+
+vec4 vertex_main() {
+  textureSampleLevel_615583();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:9: 'textureLod' : no matching overloaded function found 
+ERROR: 0:9: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2DArrayShadow arg_0_arg_1;
+
+void textureSampleLevel_615583() {
+  vec2 arg_2 = vec2(0.0f);
+  uint arg_3 = 1u;
+  uint arg_4 = 1u;
+  float res = textureLod(arg_0_arg_1, vec4(vec3(arg_2, float(arg_3)), 0.0f), float(arg_4));
+}
+
+void fragment_main() {
+  textureSampleLevel_615583();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:10: 'textureLod' : no matching overloaded function found 
+ERROR: 0:10: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+uniform highp sampler2DArrayShadow arg_0_arg_1;
+
+void textureSampleLevel_615583() {
+  vec2 arg_2 = vec2(0.0f);
+  uint arg_3 = 1u;
+  uint arg_4 = 1u;
+  float res = textureLod(arg_0_arg_1, vec4(vec3(arg_2, float(arg_3)), 0.0f), float(arg_4));
+}
+
+void compute_main() {
+  textureSampleLevel_615583();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:9: 'textureLod' : no matching overloaded function found 
+ERROR: 0:9: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/615583.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleLevel/615583.wgsl.expected.msl
new file mode 100644
index 0000000..34af000
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleLevel/615583.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureSampleLevel_615583(depth2d_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+  float2 arg_2 = float2(0.0f);
+  uint arg_3 = 1u;
+  uint arg_4 = 1u;
+  float res = tint_symbol_1.sample(tint_symbol_2, arg_2, arg_3, level(arg_4));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(depth2d_array<float, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+  textureSampleLevel_615583(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(depth2d_array<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(depth2d_array<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+  textureSampleLevel_615583(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(depth2d_array<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+  textureSampleLevel_615583(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/615583.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleLevel/615583.wgsl.expected.spvasm
new file mode 100644
index 0000000..68e107d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleLevel/615583.wgsl.expected.spvasm
@@ -0,0 +1,106 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 60
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %arg_1 "arg_1"
+               OpName %textureSampleLevel_615583 "textureSampleLevel_615583"
+               OpName %arg_2 "arg_2"
+               OpName %arg_3 "arg_3"
+               OpName %arg_4 "arg_4"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %arg_1 DescriptorSet 1
+               OpDecorate %arg_1 Binding 1
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+         %14 = OpTypeSampler
+%_ptr_UniformConstant_14 = OpTypePointer UniformConstant %14
+      %arg_1 = OpVariable %_ptr_UniformConstant_14 UniformConstant
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+    %v2float = OpTypeVector %float 2
+         %20 = OpConstantNull %v2float
+%_ptr_Function_v2float = OpTypePointer Function %v2float
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %27 = OpConstantNull %uint
+         %33 = OpTypeSampledImage %11
+    %v3float = OpTypeVector %float 3
+%_ptr_Function_float = OpTypePointer Function %float
+         %46 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureSampleLevel_615583 = OpFunction %void None %15
+         %18 = OpLabel
+      %arg_2 = OpVariable %_ptr_Function_v2float Function %20
+      %arg_3 = OpVariable %_ptr_Function_uint Function %27
+      %arg_4 = OpVariable %_ptr_Function_uint Function %27
+        %res = OpVariable %_ptr_Function_float Function %8
+               OpStore %arg_2 %20
+               OpStore %arg_3 %uint_1
+               OpStore %arg_4 %uint_1
+         %31 = OpLoad %14 %arg_1
+         %32 = OpLoad %11 %arg_0
+         %34 = OpSampledImage %33 %32 %31
+         %36 = OpLoad %v2float %arg_2
+         %37 = OpCompositeExtract %float %36 0
+         %38 = OpCompositeExtract %float %36 1
+         %40 = OpLoad %uint %arg_3
+         %39 = OpConvertUToF %float %40
+         %41 = OpCompositeConstruct %v3float %37 %38 %39
+         %43 = OpLoad %uint %arg_4
+         %42 = OpConvertSToF %float %43
+         %30 = OpImageSampleExplicitLod %v4float %34 %41 Lod %42
+         %29 = OpCompositeExtract %float %30 0
+               OpStore %res %29
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %46
+         %48 = OpLabel
+         %49 = OpFunctionCall %void %textureSampleLevel_615583
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %51 = OpLabel
+         %52 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %52
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %55 = OpLabel
+         %56 = OpFunctionCall %void %textureSampleLevel_615583
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %58 = OpLabel
+         %59 = OpFunctionCall %void %textureSampleLevel_615583
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/615583.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/615583.wgsl.expected.wgsl
new file mode 100644
index 0000000..0c0d65d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleLevel/615583.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+@group(1) @binding(0) var arg_0 : texture_depth_2d_array;
+
+@group(1) @binding(1) var arg_1 : sampler;
+
+fn textureSampleLevel_615583() {
+  var arg_2 = vec2<f32>();
+  var arg_3 = 1u;
+  var arg_4 = 1u;
+  var res : f32 = textureSampleLevel(arg_0, arg_1, arg_2, arg_3, arg_4);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureSampleLevel_615583();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureSampleLevel_615583();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureSampleLevel_615583();
+}
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/73e892.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/73e892.wgsl
new file mode 100644
index 0000000..077d173
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleLevel/73e892.wgsl
@@ -0,0 +1,47 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_depth_2d;
+@group(1) @binding(1) var arg_1: sampler;
+
+// fn textureSampleLevel(texture: texture_depth_2d, sampler: sampler, coords: vec2<f32>, level: u32) -> f32
+fn textureSampleLevel_73e892() {
+  var arg_2 = vec2<f32>();
+  var arg_3 = 1u;
+  var res: f32 = textureSampleLevel(arg_0, arg_1, arg_2, arg_3);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureSampleLevel_73e892();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureSampleLevel_73e892();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureSampleLevel_73e892();
+}
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/73e892.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleLevel/73e892.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..e381e9f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleLevel/73e892.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture2D arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSampleLevel_73e892() {
+  float2 arg_2 = (0.0f).xx;
+  uint arg_3 = 1u;
+  float res = arg_0.SampleLevel(arg_1, arg_2, arg_3).x;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureSampleLevel_73e892();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureSampleLevel_73e892();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureSampleLevel_73e892();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/73e892.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleLevel/73e892.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..e381e9f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleLevel/73e892.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture2D arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSampleLevel_73e892() {
+  float2 arg_2 = (0.0f).xx;
+  uint arg_3 = 1u;
+  float res = arg_0.SampleLevel(arg_1, arg_2, arg_3).x;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureSampleLevel_73e892();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureSampleLevel_73e892();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureSampleLevel_73e892();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/73e892.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSampleLevel/73e892.wgsl.expected.glsl
new file mode 100644
index 0000000..14e1df9
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleLevel/73e892.wgsl.expected.glsl
@@ -0,0 +1,61 @@
+#version 310 es
+
+uniform highp sampler2DShadow arg_0_arg_1;
+
+void textureSampleLevel_73e892() {
+  vec2 arg_2 = vec2(0.0f);
+  uint arg_3 = 1u;
+  float res = textureLod(arg_0_arg_1, vec3(arg_2, 0.0f), float(arg_3));
+}
+
+vec4 vertex_main() {
+  textureSampleLevel_73e892();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2DShadow arg_0_arg_1;
+
+void textureSampleLevel_73e892() {
+  vec2 arg_2 = vec2(0.0f);
+  uint arg_3 = 1u;
+  float res = textureLod(arg_0_arg_1, vec3(arg_2, 0.0f), float(arg_3));
+}
+
+void fragment_main() {
+  textureSampleLevel_73e892();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp sampler2DShadow arg_0_arg_1;
+
+void textureSampleLevel_73e892() {
+  vec2 arg_2 = vec2(0.0f);
+  uint arg_3 = 1u;
+  float res = textureLod(arg_0_arg_1, vec3(arg_2, 0.0f), float(arg_3));
+}
+
+void compute_main() {
+  textureSampleLevel_73e892();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/73e892.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleLevel/73e892.wgsl.expected.msl
new file mode 100644
index 0000000..4eb86fb
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleLevel/73e892.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureSampleLevel_73e892(depth2d<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+  float2 arg_2 = float2(0.0f);
+  uint arg_3 = 1u;
+  float res = tint_symbol_1.sample(tint_symbol_2, arg_2, level(arg_3));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(depth2d<float, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+  textureSampleLevel_73e892(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(depth2d<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(depth2d<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+  textureSampleLevel_73e892(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(depth2d<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+  textureSampleLevel_73e892(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/73e892.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleLevel/73e892.wgsl.expected.spvasm
new file mode 100644
index 0000000..1c0551a
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleLevel/73e892.wgsl.expected.spvasm
@@ -0,0 +1,97 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 53
+; 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 %arg_1 "arg_1"
+               OpName %textureSampleLevel_73e892 "textureSampleLevel_73e892"
+               OpName %arg_2 "arg_2"
+               OpName %arg_3 "arg_3"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %arg_1 DescriptorSet 1
+               OpDecorate %arg_1 Binding 1
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+         %14 = OpTypeSampler
+%_ptr_UniformConstant_14 = OpTypePointer UniformConstant %14
+      %arg_1 = OpVariable %_ptr_UniformConstant_14 UniformConstant
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+    %v2float = OpTypeVector %float 2
+         %20 = OpConstantNull %v2float
+%_ptr_Function_v2float = OpTypePointer Function %v2float
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %27 = OpConstantNull %uint
+         %32 = OpTypeSampledImage %11
+%_ptr_Function_float = OpTypePointer Function %float
+         %39 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureSampleLevel_73e892 = OpFunction %void None %15
+         %18 = OpLabel
+      %arg_2 = OpVariable %_ptr_Function_v2float Function %20
+      %arg_3 = OpVariable %_ptr_Function_uint Function %27
+        %res = OpVariable %_ptr_Function_float Function %8
+               OpStore %arg_2 %20
+               OpStore %arg_3 %uint_1
+         %30 = OpLoad %14 %arg_1
+         %31 = OpLoad %11 %arg_0
+         %33 = OpSampledImage %32 %31 %30
+         %34 = OpLoad %v2float %arg_2
+         %36 = OpLoad %uint %arg_3
+         %35 = OpConvertSToF %float %36
+         %29 = OpImageSampleExplicitLod %v4float %33 %34 Lod %35
+         %28 = OpCompositeExtract %float %29 0
+               OpStore %res %28
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %39
+         %41 = OpLabel
+         %42 = OpFunctionCall %void %textureSampleLevel_73e892
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %44 = OpLabel
+         %45 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %45
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %48 = OpLabel
+         %49 = OpFunctionCall %void %textureSampleLevel_73e892
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %51 = OpLabel
+         %52 = OpFunctionCall %void %textureSampleLevel_73e892
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/73e892.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/73e892.wgsl.expected.wgsl
new file mode 100644
index 0000000..1d25212
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleLevel/73e892.wgsl.expected.wgsl
@@ -0,0 +1,25 @@
+@group(1) @binding(0) var arg_0 : texture_depth_2d;
+
+@group(1) @binding(1) var arg_1 : sampler;
+
+fn textureSampleLevel_73e892() {
+  var arg_2 = vec2<f32>();
+  var arg_3 = 1u;
+  var res : f32 = textureSampleLevel(arg_0, arg_1, arg_2, arg_3);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureSampleLevel_73e892();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureSampleLevel_73e892();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureSampleLevel_73e892();
+}
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/941a53.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/941a53.wgsl
new file mode 100644
index 0000000..0a8b7ad
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleLevel/941a53.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_depth_cube_array;
+@group(1) @binding(1) var arg_1: sampler;
+
+// fn textureSampleLevel(texture: texture_depth_cube_array, sampler: sampler, coords: vec3<f32>, array_index: u32, level: u32) -> f32
+fn textureSampleLevel_941a53() {
+  var arg_2 = vec3<f32>();
+  var arg_3 = 1u;
+  var arg_4 = 1u;
+  var res: f32 = textureSampleLevel(arg_0, arg_1, arg_2, arg_3, arg_4);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureSampleLevel_941a53();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureSampleLevel_941a53();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureSampleLevel_941a53();
+}
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/941a53.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleLevel/941a53.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..ded6e21
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleLevel/941a53.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+TextureCubeArray arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSampleLevel_941a53() {
+  float3 arg_2 = (0.0f).xxx;
+  uint arg_3 = 1u;
+  uint arg_4 = 1u;
+  float res = arg_0.SampleLevel(arg_1, float4(arg_2, float(arg_3)), arg_4).x;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureSampleLevel_941a53();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureSampleLevel_941a53();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureSampleLevel_941a53();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/941a53.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleLevel/941a53.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..ded6e21
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleLevel/941a53.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+TextureCubeArray arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSampleLevel_941a53() {
+  float3 arg_2 = (0.0f).xxx;
+  uint arg_3 = 1u;
+  uint arg_4 = 1u;
+  float res = arg_0.SampleLevel(arg_1, float4(arg_2, float(arg_3)), arg_4).x;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureSampleLevel_941a53();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureSampleLevel_941a53();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureSampleLevel_941a53();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/941a53.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSampleLevel/941a53.wgsl.expected.glsl
new file mode 100644
index 0000000..8a2f1a0
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleLevel/941a53.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+uniform highp samplerCubeArrayShadow arg_0_arg_1;
+
+void textureSampleLevel_941a53() {
+  vec3 arg_2 = vec3(0.0f);
+  uint arg_3 = 1u;
+  uint arg_4 = 1u;
+  float res = textureLod(arg_0_arg_1, vec4(arg_2, float(arg_3)), float(arg_4));
+}
+
+vec4 vertex_main() {
+  textureSampleLevel_941a53();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  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: 'samplerCubeArrayShadow' : Reserved word. 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+uniform highp samplerCubeArrayShadow arg_0_arg_1;
+
+void textureSampleLevel_941a53() {
+  vec3 arg_2 = vec3(0.0f);
+  uint arg_3 = 1u;
+  uint arg_4 = 1u;
+  float res = textureLod(arg_0_arg_1, vec4(arg_2, float(arg_3)), float(arg_4));
+}
+
+void fragment_main() {
+  textureSampleLevel_941a53();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'samplerCubeArrayShadow' : Reserved word. 
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+uniform highp samplerCubeArrayShadow arg_0_arg_1;
+
+void textureSampleLevel_941a53() {
+  vec3 arg_2 = vec3(0.0f);
+  uint arg_3 = 1u;
+  uint arg_4 = 1u;
+  float res = textureLod(arg_0_arg_1, vec4(arg_2, float(arg_3)), float(arg_4));
+}
+
+void compute_main() {
+  textureSampleLevel_941a53();
+}
+
+layout(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: 'samplerCubeArrayShadow' : Reserved word. 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/941a53.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleLevel/941a53.wgsl.expected.msl
new file mode 100644
index 0000000..4bbcda9
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleLevel/941a53.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureSampleLevel_941a53(depthcube_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+  float3 arg_2 = float3(0.0f);
+  uint arg_3 = 1u;
+  uint arg_4 = 1u;
+  float res = tint_symbol_1.sample(tint_symbol_2, arg_2, arg_3, level(arg_4));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(depthcube_array<float, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+  textureSampleLevel_941a53(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(depthcube_array<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(depthcube_array<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+  textureSampleLevel_941a53(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(depthcube_array<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+  textureSampleLevel_941a53(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/941a53.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleLevel/941a53.wgsl.expected.spvasm
new file mode 100644
index 0000000..b6f33ce
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleLevel/941a53.wgsl.expected.spvasm
@@ -0,0 +1,107 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 60
+; Schema: 0
+               OpCapability Shader
+               OpCapability SampledCubeArray
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %arg_1 "arg_1"
+               OpName %textureSampleLevel_941a53 "textureSampleLevel_941a53"
+               OpName %arg_2 "arg_2"
+               OpName %arg_3 "arg_3"
+               OpName %arg_4 "arg_4"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %arg_1 DescriptorSet 1
+               OpDecorate %arg_1 Binding 1
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float Cube 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+         %14 = OpTypeSampler
+%_ptr_UniformConstant_14 = OpTypePointer UniformConstant %14
+      %arg_1 = OpVariable %_ptr_UniformConstant_14 UniformConstant
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+    %v3float = OpTypeVector %float 3
+         %20 = OpConstantNull %v3float
+%_ptr_Function_v3float = OpTypePointer Function %v3float
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %27 = OpConstantNull %uint
+         %33 = OpTypeSampledImage %11
+%_ptr_Function_float = OpTypePointer Function %float
+         %46 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureSampleLevel_941a53 = OpFunction %void None %15
+         %18 = OpLabel
+      %arg_2 = OpVariable %_ptr_Function_v3float Function %20
+      %arg_3 = OpVariable %_ptr_Function_uint Function %27
+      %arg_4 = OpVariable %_ptr_Function_uint Function %27
+        %res = OpVariable %_ptr_Function_float Function %8
+               OpStore %arg_2 %20
+               OpStore %arg_3 %uint_1
+               OpStore %arg_4 %uint_1
+         %31 = OpLoad %14 %arg_1
+         %32 = OpLoad %11 %arg_0
+         %34 = OpSampledImage %33 %32 %31
+         %35 = OpLoad %v3float %arg_2
+         %36 = OpCompositeExtract %float %35 0
+         %37 = OpCompositeExtract %float %35 1
+         %38 = OpCompositeExtract %float %35 2
+         %40 = OpLoad %uint %arg_3
+         %39 = OpConvertUToF %float %40
+         %41 = OpCompositeConstruct %v4float %36 %37 %38 %39
+         %43 = OpLoad %uint %arg_4
+         %42 = OpConvertSToF %float %43
+         %30 = OpImageSampleExplicitLod %v4float %34 %41 Lod %42
+         %29 = OpCompositeExtract %float %30 0
+               OpStore %res %29
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %46
+         %48 = OpLabel
+         %49 = OpFunctionCall %void %textureSampleLevel_941a53
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %51 = OpLabel
+         %52 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %52
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %55 = OpLabel
+         %56 = OpFunctionCall %void %textureSampleLevel_941a53
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %58 = OpLabel
+         %59 = OpFunctionCall %void %textureSampleLevel_941a53
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/941a53.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/941a53.wgsl.expected.wgsl
new file mode 100644
index 0000000..02a28c8
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleLevel/941a53.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+@group(1) @binding(0) var arg_0 : texture_depth_cube_array;
+
+@group(1) @binding(1) var arg_1 : sampler;
+
+fn textureSampleLevel_941a53() {
+  var arg_2 = vec3<f32>();
+  var arg_3 = 1u;
+  var arg_4 = 1u;
+  var res : f32 = textureSampleLevel(arg_0, arg_1, arg_2, arg_3, arg_4);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureSampleLevel_941a53();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureSampleLevel_941a53();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureSampleLevel_941a53();
+}
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/aab3b9.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/aab3b9.wgsl
new file mode 100644
index 0000000..f562a0d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleLevel/aab3b9.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_cube_array<f32>;
+@group(1) @binding(1) var arg_1: sampler;
+
+// fn textureSampleLevel(texture: texture_cube_array<f32>, sampler: sampler, coords: vec3<f32>, array_index: u32, level: f32) -> vec4<f32>
+fn textureSampleLevel_aab3b9() {
+  var arg_2 = vec3<f32>();
+  var arg_3 = 1u;
+  var arg_4 = 1.f;
+  var res: vec4<f32> = textureSampleLevel(arg_0, arg_1, arg_2, arg_3, arg_4);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureSampleLevel_aab3b9();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureSampleLevel_aab3b9();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureSampleLevel_aab3b9();
+}
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/aab3b9.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleLevel/aab3b9.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..481da2b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleLevel/aab3b9.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+TextureCubeArray<float4> arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSampleLevel_aab3b9() {
+  float3 arg_2 = (0.0f).xxx;
+  uint arg_3 = 1u;
+  float arg_4 = 1.0f;
+  float4 res = arg_0.SampleLevel(arg_1, float4(arg_2, float(arg_3)), arg_4);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureSampleLevel_aab3b9();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureSampleLevel_aab3b9();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureSampleLevel_aab3b9();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/aab3b9.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleLevel/aab3b9.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..481da2b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleLevel/aab3b9.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+TextureCubeArray<float4> arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSampleLevel_aab3b9() {
+  float3 arg_2 = (0.0f).xxx;
+  uint arg_3 = 1u;
+  float arg_4 = 1.0f;
+  float4 res = arg_0.SampleLevel(arg_1, float4(arg_2, float(arg_3)), arg_4);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureSampleLevel_aab3b9();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureSampleLevel_aab3b9();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureSampleLevel_aab3b9();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/aab3b9.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSampleLevel/aab3b9.wgsl.expected.glsl
new file mode 100644
index 0000000..4f9d09d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleLevel/aab3b9.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+uniform highp samplerCubeArray arg_0_arg_1;
+
+void textureSampleLevel_aab3b9() {
+  vec3 arg_2 = vec3(0.0f);
+  uint arg_3 = 1u;
+  float arg_4 = 1.0f;
+  vec4 res = textureLod(arg_0_arg_1, vec4(arg_2, float(arg_3)), arg_4);
+}
+
+vec4 vertex_main() {
+  textureSampleLevel_aab3b9();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'samplerCubeArray' : Reserved word. 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+uniform highp samplerCubeArray arg_0_arg_1;
+
+void textureSampleLevel_aab3b9() {
+  vec3 arg_2 = vec3(0.0f);
+  uint arg_3 = 1u;
+  float arg_4 = 1.0f;
+  vec4 res = textureLod(arg_0_arg_1, vec4(arg_2, float(arg_3)), arg_4);
+}
+
+void fragment_main() {
+  textureSampleLevel_aab3b9();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'samplerCubeArray' : Reserved word. 
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+uniform highp samplerCubeArray arg_0_arg_1;
+
+void textureSampleLevel_aab3b9() {
+  vec3 arg_2 = vec3(0.0f);
+  uint arg_3 = 1u;
+  float arg_4 = 1.0f;
+  vec4 res = textureLod(arg_0_arg_1, vec4(arg_2, float(arg_3)), arg_4);
+}
+
+void compute_main() {
+  textureSampleLevel_aab3b9();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'samplerCubeArray' : Reserved word. 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/aab3b9.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleLevel/aab3b9.wgsl.expected.msl
new file mode 100644
index 0000000..44aa130
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleLevel/aab3b9.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureSampleLevel_aab3b9(texturecube_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+  float3 arg_2 = float3(0.0f);
+  uint arg_3 = 1u;
+  float arg_4 = 1.0f;
+  float4 res = tint_symbol_1.sample(tint_symbol_2, arg_2, arg_3, level(arg_4));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texturecube_array<float, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+  textureSampleLevel_aab3b9(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texturecube_array<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texturecube_array<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+  textureSampleLevel_aab3b9(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texturecube_array<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+  textureSampleLevel_aab3b9(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/aab3b9.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleLevel/aab3b9.wgsl.expected.spvasm
new file mode 100644
index 0000000..155f61c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleLevel/aab3b9.wgsl.expected.spvasm
@@ -0,0 +1,106 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 59
+; Schema: 0
+               OpCapability Shader
+               OpCapability SampledCubeArray
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %arg_1 "arg_1"
+               OpName %textureSampleLevel_aab3b9 "textureSampleLevel_aab3b9"
+               OpName %arg_2 "arg_2"
+               OpName %arg_3 "arg_3"
+               OpName %arg_4 "arg_4"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %arg_1 DescriptorSet 1
+               OpDecorate %arg_1 Binding 1
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float Cube 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+         %14 = OpTypeSampler
+%_ptr_UniformConstant_14 = OpTypePointer UniformConstant %14
+      %arg_1 = OpVariable %_ptr_UniformConstant_14 UniformConstant
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+    %v3float = OpTypeVector %float 3
+         %20 = OpConstantNull %v3float
+%_ptr_Function_v3float = OpTypePointer Function %v3float
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %27 = OpConstantNull %uint
+    %float_1 = OpConstant %float 1
+%_ptr_Function_float = OpTypePointer Function %float
+         %34 = OpTypeSampledImage %11
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+         %46 = OpTypeFunction %v4float
+%textureSampleLevel_aab3b9 = OpFunction %void None %15
+         %18 = OpLabel
+      %arg_2 = OpVariable %_ptr_Function_v3float Function %20
+      %arg_3 = OpVariable %_ptr_Function_uint Function %27
+      %arg_4 = OpVariable %_ptr_Function_float Function %8
+        %res = OpVariable %_ptr_Function_v4float Function %5
+               OpStore %arg_2 %20
+               OpStore %arg_3 %uint_1
+               OpStore %arg_4 %float_1
+         %32 = OpLoad %14 %arg_1
+         %33 = OpLoad %11 %arg_0
+         %35 = OpSampledImage %34 %33 %32
+         %36 = OpLoad %v3float %arg_2
+         %37 = OpCompositeExtract %float %36 0
+         %38 = OpCompositeExtract %float %36 1
+         %39 = OpCompositeExtract %float %36 2
+         %41 = OpLoad %uint %arg_3
+         %40 = OpConvertUToF %float %41
+         %42 = OpCompositeConstruct %v4float %37 %38 %39 %40
+         %43 = OpLoad %float %arg_4
+         %31 = OpImageSampleExplicitLod %v4float %35 %42 Lod %43
+               OpStore %res %31
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %46
+         %48 = OpLabel
+         %49 = OpFunctionCall %void %textureSampleLevel_aab3b9
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %51 = OpLabel
+         %52 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %52
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %54 = OpLabel
+         %55 = OpFunctionCall %void %textureSampleLevel_aab3b9
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %57 = OpLabel
+         %58 = OpFunctionCall %void %textureSampleLevel_aab3b9
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/aab3b9.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/aab3b9.wgsl.expected.wgsl
new file mode 100644
index 0000000..bfc6754
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleLevel/aab3b9.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+@group(1) @binding(0) var arg_0 : texture_cube_array<f32>;
+
+@group(1) @binding(1) var arg_1 : sampler;
+
+fn textureSampleLevel_aab3b9() {
+  var arg_2 = vec3<f32>();
+  var arg_3 = 1u;
+  var arg_4 = 1.0f;
+  var res : vec4<f32> = textureSampleLevel(arg_0, arg_1, arg_2, arg_3, arg_4);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureSampleLevel_aab3b9();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureSampleLevel_aab3b9();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureSampleLevel_aab3b9();
+}
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/ae92a2.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/ae92a2.wgsl
new file mode 100644
index 0000000..e11d71f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleLevel/ae92a2.wgsl
@@ -0,0 +1,47 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_depth_cube;
+@group(1) @binding(1) var arg_1: sampler;
+
+// fn textureSampleLevel(texture: texture_depth_cube, sampler: sampler, coords: vec3<f32>, level: u32) -> f32
+fn textureSampleLevel_ae92a2() {
+  var arg_2 = vec3<f32>();
+  var arg_3 = 1u;
+  var res: f32 = textureSampleLevel(arg_0, arg_1, arg_2, arg_3);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureSampleLevel_ae92a2();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureSampleLevel_ae92a2();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureSampleLevel_ae92a2();
+}
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/ae92a2.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleLevel/ae92a2.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..9e0a41a
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleLevel/ae92a2.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+TextureCube arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSampleLevel_ae92a2() {
+  float3 arg_2 = (0.0f).xxx;
+  uint arg_3 = 1u;
+  float res = arg_0.SampleLevel(arg_1, arg_2, arg_3).x;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureSampleLevel_ae92a2();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureSampleLevel_ae92a2();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureSampleLevel_ae92a2();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/ae92a2.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleLevel/ae92a2.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..9e0a41a
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleLevel/ae92a2.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+TextureCube arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSampleLevel_ae92a2() {
+  float3 arg_2 = (0.0f).xxx;
+  uint arg_3 = 1u;
+  float res = arg_0.SampleLevel(arg_1, arg_2, arg_3).x;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureSampleLevel_ae92a2();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureSampleLevel_ae92a2();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureSampleLevel_ae92a2();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/ae92a2.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSampleLevel/ae92a2.wgsl.expected.glsl
new file mode 100644
index 0000000..feffd84
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleLevel/ae92a2.wgsl.expected.glsl
@@ -0,0 +1,84 @@
+SKIP: FAILED
+
+#version 310 es
+
+uniform highp samplerCubeShadow arg_0_arg_1;
+
+void textureSampleLevel_ae92a2() {
+  vec3 arg_2 = vec3(0.0f);
+  uint arg_3 = 1u;
+  float res = textureLod(arg_0_arg_1, vec4(arg_2, 0.0f), float(arg_3));
+}
+
+vec4 vertex_main() {
+  textureSampleLevel_ae92a2();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:8: 'textureLod' : no matching overloaded function found 
+ERROR: 0:8: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+uniform highp samplerCubeShadow arg_0_arg_1;
+
+void textureSampleLevel_ae92a2() {
+  vec3 arg_2 = vec3(0.0f);
+  uint arg_3 = 1u;
+  float res = textureLod(arg_0_arg_1, vec4(arg_2, 0.0f), float(arg_3));
+}
+
+void fragment_main() {
+  textureSampleLevel_ae92a2();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:9: 'textureLod' : no matching overloaded function found 
+ERROR: 0:9: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+uniform highp samplerCubeShadow arg_0_arg_1;
+
+void textureSampleLevel_ae92a2() {
+  vec3 arg_2 = vec3(0.0f);
+  uint arg_3 = 1u;
+  float res = textureLod(arg_0_arg_1, vec4(arg_2, 0.0f), float(arg_3));
+}
+
+void compute_main() {
+  textureSampleLevel_ae92a2();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:8: 'textureLod' : no matching overloaded function found 
+ERROR: 0:8: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/ae92a2.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleLevel/ae92a2.wgsl.expected.msl
new file mode 100644
index 0000000..d8dd6ce
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleLevel/ae92a2.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureSampleLevel_ae92a2(depthcube<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+  float3 arg_2 = float3(0.0f);
+  uint arg_3 = 1u;
+  float res = tint_symbol_1.sample(tint_symbol_2, arg_2, level(arg_3));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(depthcube<float, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+  textureSampleLevel_ae92a2(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(depthcube<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(depthcube<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+  textureSampleLevel_ae92a2(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(depthcube<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+  textureSampleLevel_ae92a2(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/ae92a2.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleLevel/ae92a2.wgsl.expected.spvasm
new file mode 100644
index 0000000..7d9df9a
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleLevel/ae92a2.wgsl.expected.spvasm
@@ -0,0 +1,97 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 53
+; 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 %arg_1 "arg_1"
+               OpName %textureSampleLevel_ae92a2 "textureSampleLevel_ae92a2"
+               OpName %arg_2 "arg_2"
+               OpName %arg_3 "arg_3"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %arg_1 DescriptorSet 1
+               OpDecorate %arg_1 Binding 1
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float Cube 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+         %14 = OpTypeSampler
+%_ptr_UniformConstant_14 = OpTypePointer UniformConstant %14
+      %arg_1 = OpVariable %_ptr_UniformConstant_14 UniformConstant
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+    %v3float = OpTypeVector %float 3
+         %20 = OpConstantNull %v3float
+%_ptr_Function_v3float = OpTypePointer Function %v3float
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %27 = OpConstantNull %uint
+         %32 = OpTypeSampledImage %11
+%_ptr_Function_float = OpTypePointer Function %float
+         %39 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureSampleLevel_ae92a2 = OpFunction %void None %15
+         %18 = OpLabel
+      %arg_2 = OpVariable %_ptr_Function_v3float Function %20
+      %arg_3 = OpVariable %_ptr_Function_uint Function %27
+        %res = OpVariable %_ptr_Function_float Function %8
+               OpStore %arg_2 %20
+               OpStore %arg_3 %uint_1
+         %30 = OpLoad %14 %arg_1
+         %31 = OpLoad %11 %arg_0
+         %33 = OpSampledImage %32 %31 %30
+         %34 = OpLoad %v3float %arg_2
+         %36 = OpLoad %uint %arg_3
+         %35 = OpConvertSToF %float %36
+         %29 = OpImageSampleExplicitLod %v4float %33 %34 Lod %35
+         %28 = OpCompositeExtract %float %29 0
+               OpStore %res %28
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %39
+         %41 = OpLabel
+         %42 = OpFunctionCall %void %textureSampleLevel_ae92a2
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %44 = OpLabel
+         %45 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %45
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %48 = OpLabel
+         %49 = OpFunctionCall %void %textureSampleLevel_ae92a2
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %51 = OpLabel
+         %52 = OpFunctionCall %void %textureSampleLevel_ae92a2
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/ae92a2.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/ae92a2.wgsl.expected.wgsl
new file mode 100644
index 0000000..b44c095
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleLevel/ae92a2.wgsl.expected.wgsl
@@ -0,0 +1,25 @@
+@group(1) @binding(0) var arg_0 : texture_depth_cube;
+
+@group(1) @binding(1) var arg_1 : sampler;
+
+fn textureSampleLevel_ae92a2() {
+  var arg_2 = vec3<f32>();
+  var arg_3 = 1u;
+  var res : f32 = textureSampleLevel(arg_0, arg_1, arg_2, arg_3);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureSampleLevel_ae92a2();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureSampleLevel_ae92a2();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureSampleLevel_ae92a2();
+}
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/cdfe0f.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/cdfe0f.wgsl
new file mode 100644
index 0000000..c4ea22f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleLevel/cdfe0f.wgsl
@@ -0,0 +1,49 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_depth_2d_array;
+@group(1) @binding(1) var arg_1: sampler;
+
+// fn textureSampleLevel(texture: texture_depth_2d_array, sampler: sampler, coords: vec2<f32>, array_index: u32, level: u32, @const offset: vec2<i32>) -> f32
+fn textureSampleLevel_cdfe0f() {
+  var arg_2 = vec2<f32>();
+  var arg_3 = 1u;
+  var arg_4 = 1u;
+  const arg_5 = vec2<i32>();
+  var res: f32 = textureSampleLevel(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureSampleLevel_cdfe0f();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureSampleLevel_cdfe0f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureSampleLevel_cdfe0f();
+}
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/cdfe0f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleLevel/cdfe0f.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..7b8c192
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleLevel/cdfe0f.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSampleLevel_cdfe0f() {
+  float2 arg_2 = (0.0f).xx;
+  uint arg_3 = 1u;
+  uint arg_4 = 1u;
+  float res = arg_0.SampleLevel(arg_1, float3(arg_2, float(arg_3)), arg_4, (0).xx).x;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureSampleLevel_cdfe0f();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureSampleLevel_cdfe0f();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureSampleLevel_cdfe0f();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/cdfe0f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleLevel/cdfe0f.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..7b8c192
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleLevel/cdfe0f.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSampleLevel_cdfe0f() {
+  float2 arg_2 = (0.0f).xx;
+  uint arg_3 = 1u;
+  uint arg_4 = 1u;
+  float res = arg_0.SampleLevel(arg_1, float3(arg_2, float(arg_3)), arg_4, (0).xx).x;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureSampleLevel_cdfe0f();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureSampleLevel_cdfe0f();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureSampleLevel_cdfe0f();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/cdfe0f.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSampleLevel/cdfe0f.wgsl.expected.glsl
new file mode 100644
index 0000000..3c550b9
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleLevel/cdfe0f.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+uniform highp sampler2DArrayShadow arg_0_arg_1;
+
+void textureSampleLevel_cdfe0f() {
+  vec2 arg_2 = vec2(0.0f);
+  uint arg_3 = 1u;
+  uint arg_4 = 1u;
+  float res = textureLodOffset(arg_0_arg_1, vec4(vec3(arg_2, float(arg_3)), 0.0f), float(arg_4), ivec2(0));
+}
+
+vec4 vertex_main() {
+  textureSampleLevel_cdfe0f();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:9: 'textureLodOffset' : no matching overloaded function found 
+ERROR: 0:9: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2DArrayShadow arg_0_arg_1;
+
+void textureSampleLevel_cdfe0f() {
+  vec2 arg_2 = vec2(0.0f);
+  uint arg_3 = 1u;
+  uint arg_4 = 1u;
+  float res = textureLodOffset(arg_0_arg_1, vec4(vec3(arg_2, float(arg_3)), 0.0f), float(arg_4), ivec2(0));
+}
+
+void fragment_main() {
+  textureSampleLevel_cdfe0f();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:10: 'textureLodOffset' : no matching overloaded function found 
+ERROR: 0:10: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+uniform highp sampler2DArrayShadow arg_0_arg_1;
+
+void textureSampleLevel_cdfe0f() {
+  vec2 arg_2 = vec2(0.0f);
+  uint arg_3 = 1u;
+  uint arg_4 = 1u;
+  float res = textureLodOffset(arg_0_arg_1, vec4(vec3(arg_2, float(arg_3)), 0.0f), float(arg_4), ivec2(0));
+}
+
+void compute_main() {
+  textureSampleLevel_cdfe0f();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:9: 'textureLodOffset' : no matching overloaded function found 
+ERROR: 0:9: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/cdfe0f.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleLevel/cdfe0f.wgsl.expected.msl
new file mode 100644
index 0000000..a56b58c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleLevel/cdfe0f.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureSampleLevel_cdfe0f(depth2d_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+  float2 arg_2 = float2(0.0f);
+  uint arg_3 = 1u;
+  uint arg_4 = 1u;
+  float res = tint_symbol_1.sample(tint_symbol_2, arg_2, arg_3, level(arg_4), int2(0));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(depth2d_array<float, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+  textureSampleLevel_cdfe0f(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(depth2d_array<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(depth2d_array<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+  textureSampleLevel_cdfe0f(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(depth2d_array<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+  textureSampleLevel_cdfe0f(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/cdfe0f.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleLevel/cdfe0f.wgsl.expected.spvasm
new file mode 100644
index 0000000..60850e5
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleLevel/cdfe0f.wgsl.expected.spvasm
@@ -0,0 +1,109 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 63
+; 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 %arg_1 "arg_1"
+               OpName %textureSampleLevel_cdfe0f "textureSampleLevel_cdfe0f"
+               OpName %arg_2 "arg_2"
+               OpName %arg_3 "arg_3"
+               OpName %arg_4 "arg_4"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %arg_1 DescriptorSet 1
+               OpDecorate %arg_1 Binding 1
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+         %14 = OpTypeSampler
+%_ptr_UniformConstant_14 = OpTypePointer UniformConstant %14
+      %arg_1 = OpVariable %_ptr_UniformConstant_14 UniformConstant
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+    %v2float = OpTypeVector %float 2
+         %20 = OpConstantNull %v2float
+%_ptr_Function_v2float = OpTypePointer Function %v2float
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %27 = OpConstantNull %uint
+         %33 = OpTypeSampledImage %11
+    %v3float = OpTypeVector %float 3
+        %int = OpTypeInt 32 1
+      %v2int = OpTypeVector %int 2
+         %46 = OpConstantNull %v2int
+%_ptr_Function_float = OpTypePointer Function %float
+         %49 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureSampleLevel_cdfe0f = OpFunction %void None %15
+         %18 = OpLabel
+      %arg_2 = OpVariable %_ptr_Function_v2float Function %20
+      %arg_3 = OpVariable %_ptr_Function_uint Function %27
+      %arg_4 = OpVariable %_ptr_Function_uint Function %27
+        %res = OpVariable %_ptr_Function_float Function %8
+               OpStore %arg_2 %20
+               OpStore %arg_3 %uint_1
+               OpStore %arg_4 %uint_1
+         %31 = OpLoad %14 %arg_1
+         %32 = OpLoad %11 %arg_0
+         %34 = OpSampledImage %33 %32 %31
+         %36 = OpLoad %v2float %arg_2
+         %37 = OpCompositeExtract %float %36 0
+         %38 = OpCompositeExtract %float %36 1
+         %40 = OpLoad %uint %arg_3
+         %39 = OpConvertUToF %float %40
+         %41 = OpCompositeConstruct %v3float %37 %38 %39
+         %43 = OpLoad %uint %arg_4
+         %42 = OpConvertSToF %float %43
+         %30 = OpImageSampleExplicitLod %v4float %34 %41 Lod|ConstOffset %42 %46
+         %29 = OpCompositeExtract %float %30 0
+               OpStore %res %29
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %49
+         %51 = OpLabel
+         %52 = OpFunctionCall %void %textureSampleLevel_cdfe0f
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %54 = OpLabel
+         %55 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %55
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %58 = OpLabel
+         %59 = OpFunctionCall %void %textureSampleLevel_cdfe0f
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %61 = OpLabel
+         %62 = OpFunctionCall %void %textureSampleLevel_cdfe0f
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/cdfe0f.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/cdfe0f.wgsl.expected.wgsl
new file mode 100644
index 0000000..c835321
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleLevel/cdfe0f.wgsl.expected.wgsl
@@ -0,0 +1,27 @@
+@group(1) @binding(0) var arg_0 : texture_depth_2d_array;
+
+@group(1) @binding(1) var arg_1 : sampler;
+
+fn textureSampleLevel_cdfe0f() {
+  var arg_2 = vec2<f32>();
+  var arg_3 = 1u;
+  var arg_4 = 1u;
+  const arg_5 = vec2<i32>();
+  var res : f32 = textureSampleLevel(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureSampleLevel_cdfe0f();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureSampleLevel_cdfe0f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureSampleLevel_cdfe0f();
+}
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/f3b2c8.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/f3b2c8.wgsl
new file mode 100644
index 0000000..438cfbf
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleLevel/f3b2c8.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_depth_2d;
+@group(1) @binding(1) var arg_1: sampler;
+
+// fn textureSampleLevel(texture: texture_depth_2d, sampler: sampler, coords: vec2<f32>, level: u32, @const offset: vec2<i32>) -> f32
+fn textureSampleLevel_f3b2c8() {
+  var arg_2 = vec2<f32>();
+  var arg_3 = 1u;
+  const arg_4 = vec2<i32>();
+  var res: f32 = textureSampleLevel(arg_0, arg_1, arg_2, arg_3, arg_4);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureSampleLevel_f3b2c8();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureSampleLevel_f3b2c8();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureSampleLevel_f3b2c8();
+}
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/f3b2c8.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleLevel/f3b2c8.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..86d0fd6
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleLevel/f3b2c8.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture2D arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSampleLevel_f3b2c8() {
+  float2 arg_2 = (0.0f).xx;
+  uint arg_3 = 1u;
+  float res = arg_0.SampleLevel(arg_1, arg_2, arg_3, (0).xx).x;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureSampleLevel_f3b2c8();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureSampleLevel_f3b2c8();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureSampleLevel_f3b2c8();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/f3b2c8.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleLevel/f3b2c8.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..86d0fd6
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleLevel/f3b2c8.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture2D arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSampleLevel_f3b2c8() {
+  float2 arg_2 = (0.0f).xx;
+  uint arg_3 = 1u;
+  float res = arg_0.SampleLevel(arg_1, arg_2, arg_3, (0).xx).x;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureSampleLevel_f3b2c8();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureSampleLevel_f3b2c8();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureSampleLevel_f3b2c8();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/f3b2c8.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSampleLevel/f3b2c8.wgsl.expected.glsl
new file mode 100644
index 0000000..b75e321
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleLevel/f3b2c8.wgsl.expected.glsl
@@ -0,0 +1,61 @@
+#version 310 es
+
+uniform highp sampler2DShadow arg_0_arg_1;
+
+void textureSampleLevel_f3b2c8() {
+  vec2 arg_2 = vec2(0.0f);
+  uint arg_3 = 1u;
+  float res = textureLodOffset(arg_0_arg_1, vec3(arg_2, 0.0f), float(arg_3), ivec2(0));
+}
+
+vec4 vertex_main() {
+  textureSampleLevel_f3b2c8();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2DShadow arg_0_arg_1;
+
+void textureSampleLevel_f3b2c8() {
+  vec2 arg_2 = vec2(0.0f);
+  uint arg_3 = 1u;
+  float res = textureLodOffset(arg_0_arg_1, vec3(arg_2, 0.0f), float(arg_3), ivec2(0));
+}
+
+void fragment_main() {
+  textureSampleLevel_f3b2c8();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp sampler2DShadow arg_0_arg_1;
+
+void textureSampleLevel_f3b2c8() {
+  vec2 arg_2 = vec2(0.0f);
+  uint arg_3 = 1u;
+  float res = textureLodOffset(arg_0_arg_1, vec3(arg_2, 0.0f), float(arg_3), ivec2(0));
+}
+
+void compute_main() {
+  textureSampleLevel_f3b2c8();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/f3b2c8.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleLevel/f3b2c8.wgsl.expected.msl
new file mode 100644
index 0000000..71b03c8
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleLevel/f3b2c8.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureSampleLevel_f3b2c8(depth2d<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+  float2 arg_2 = float2(0.0f);
+  uint arg_3 = 1u;
+  float res = tint_symbol_1.sample(tint_symbol_2, arg_2, level(arg_3), int2(0));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(depth2d<float, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+  textureSampleLevel_f3b2c8(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(depth2d<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(depth2d<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+  textureSampleLevel_f3b2c8(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(depth2d<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+  textureSampleLevel_f3b2c8(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/f3b2c8.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleLevel/f3b2c8.wgsl.expected.spvasm
new file mode 100644
index 0000000..d36a678
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleLevel/f3b2c8.wgsl.expected.spvasm
@@ -0,0 +1,100 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 56
+; 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 %arg_1 "arg_1"
+               OpName %textureSampleLevel_f3b2c8 "textureSampleLevel_f3b2c8"
+               OpName %arg_2 "arg_2"
+               OpName %arg_3 "arg_3"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %arg_1 DescriptorSet 1
+               OpDecorate %arg_1 Binding 1
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+         %14 = OpTypeSampler
+%_ptr_UniformConstant_14 = OpTypePointer UniformConstant %14
+      %arg_1 = OpVariable %_ptr_UniformConstant_14 UniformConstant
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+    %v2float = OpTypeVector %float 2
+         %20 = OpConstantNull %v2float
+%_ptr_Function_v2float = OpTypePointer Function %v2float
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %27 = OpConstantNull %uint
+         %32 = OpTypeSampledImage %11
+        %int = OpTypeInt 32 1
+      %v2int = OpTypeVector %int 2
+         %39 = OpConstantNull %v2int
+%_ptr_Function_float = OpTypePointer Function %float
+         %42 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureSampleLevel_f3b2c8 = OpFunction %void None %15
+         %18 = OpLabel
+      %arg_2 = OpVariable %_ptr_Function_v2float Function %20
+      %arg_3 = OpVariable %_ptr_Function_uint Function %27
+        %res = OpVariable %_ptr_Function_float Function %8
+               OpStore %arg_2 %20
+               OpStore %arg_3 %uint_1
+         %30 = OpLoad %14 %arg_1
+         %31 = OpLoad %11 %arg_0
+         %33 = OpSampledImage %32 %31 %30
+         %34 = OpLoad %v2float %arg_2
+         %36 = OpLoad %uint %arg_3
+         %35 = OpConvertSToF %float %36
+         %29 = OpImageSampleExplicitLod %v4float %33 %34 Lod|ConstOffset %35 %39
+         %28 = OpCompositeExtract %float %29 0
+               OpStore %res %28
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %42
+         %44 = OpLabel
+         %45 = OpFunctionCall %void %textureSampleLevel_f3b2c8
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %47 = OpLabel
+         %48 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %48
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %51 = OpLabel
+         %52 = OpFunctionCall %void %textureSampleLevel_f3b2c8
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %54 = OpLabel
+         %55 = OpFunctionCall %void %textureSampleLevel_f3b2c8
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/f3b2c8.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/f3b2c8.wgsl.expected.wgsl
new file mode 100644
index 0000000..7f7484a
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleLevel/f3b2c8.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+@group(1) @binding(0) var arg_0 : texture_depth_2d;
+
+@group(1) @binding(1) var arg_1 : sampler;
+
+fn textureSampleLevel_f3b2c8() {
+  var arg_2 = vec2<f32>();
+  var arg_3 = 1u;
+  const arg_4 = vec2<i32>();
+  var res : f32 = textureSampleLevel(arg_0, arg_1, arg_2, arg_3, arg_4);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureSampleLevel_f3b2c8();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureSampleLevel_f3b2c8();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureSampleLevel_f3b2c8();
+}
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/faa6d7.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/faa6d7.wgsl
new file mode 100644
index 0000000..4589577
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleLevel/faa6d7.wgsl
@@ -0,0 +1,49 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_2d_array<f32>;
+@group(1) @binding(1) var arg_1: sampler;
+
+// fn textureSampleLevel(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: u32, level: f32, @const offset: vec2<i32>) -> vec4<f32>
+fn textureSampleLevel_faa6d7() {
+  var arg_2 = vec2<f32>();
+  var arg_3 = 1u;
+  var arg_4 = 1.f;
+  const arg_5 = vec2<i32>();
+  var res: vec4<f32> = textureSampleLevel(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureSampleLevel_faa6d7();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureSampleLevel_faa6d7();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureSampleLevel_faa6d7();
+}
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/faa6d7.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleLevel/faa6d7.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..9aa6734
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleLevel/faa6d7.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSampleLevel_faa6d7() {
+  float2 arg_2 = (0.0f).xx;
+  uint arg_3 = 1u;
+  float arg_4 = 1.0f;
+  float4 res = arg_0.SampleLevel(arg_1, float3(arg_2, float(arg_3)), arg_4, (0).xx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureSampleLevel_faa6d7();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureSampleLevel_faa6d7();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureSampleLevel_faa6d7();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/faa6d7.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleLevel/faa6d7.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..9aa6734
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleLevel/faa6d7.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+SamplerState arg_1 : register(s1, space1);
+
+void textureSampleLevel_faa6d7() {
+  float2 arg_2 = (0.0f).xx;
+  uint arg_3 = 1u;
+  float arg_4 = 1.0f;
+  float4 res = arg_0.SampleLevel(arg_1, float3(arg_2, float(arg_3)), arg_4, (0).xx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureSampleLevel_faa6d7();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureSampleLevel_faa6d7();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureSampleLevel_faa6d7();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/faa6d7.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSampleLevel/faa6d7.wgsl.expected.glsl
new file mode 100644
index 0000000..28b00f3
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleLevel/faa6d7.wgsl.expected.glsl
@@ -0,0 +1,64 @@
+#version 310 es
+
+uniform highp sampler2DArray arg_0_arg_1;
+
+void textureSampleLevel_faa6d7() {
+  vec2 arg_2 = vec2(0.0f);
+  uint arg_3 = 1u;
+  float arg_4 = 1.0f;
+  vec4 res = textureLodOffset(arg_0_arg_1, vec3(arg_2, float(arg_3)), arg_4, ivec2(0));
+}
+
+vec4 vertex_main() {
+  textureSampleLevel_faa6d7();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2DArray arg_0_arg_1;
+
+void textureSampleLevel_faa6d7() {
+  vec2 arg_2 = vec2(0.0f);
+  uint arg_3 = 1u;
+  float arg_4 = 1.0f;
+  vec4 res = textureLodOffset(arg_0_arg_1, vec3(arg_2, float(arg_3)), arg_4, ivec2(0));
+}
+
+void fragment_main() {
+  textureSampleLevel_faa6d7();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp sampler2DArray arg_0_arg_1;
+
+void textureSampleLevel_faa6d7() {
+  vec2 arg_2 = vec2(0.0f);
+  uint arg_3 = 1u;
+  float arg_4 = 1.0f;
+  vec4 res = textureLodOffset(arg_0_arg_1, vec3(arg_2, float(arg_3)), arg_4, ivec2(0));
+}
+
+void compute_main() {
+  textureSampleLevel_faa6d7();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/faa6d7.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleLevel/faa6d7.wgsl.expected.msl
new file mode 100644
index 0000000..04351fe
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleLevel/faa6d7.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureSampleLevel_faa6d7(texture2d_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
+  float2 arg_2 = float2(0.0f);
+  uint arg_3 = 1u;
+  float arg_4 = 1.0f;
+  float4 res = tint_symbol_1.sample(tint_symbol_2, arg_2, arg_3, level(arg_4), int2(0));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<float, access::sample> tint_symbol_3, sampler tint_symbol_4) {
+  textureSampleLevel_faa6d7(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<float, access::sample> tint_symbol_7 [[texture(0)]], sampler tint_symbol_8 [[sampler(0)]]) {
+  textureSampleLevel_faa6d7(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<float, access::sample> tint_symbol_9 [[texture(0)]], sampler tint_symbol_10 [[sampler(0)]]) {
+  textureSampleLevel_faa6d7(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/faa6d7.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleLevel/faa6d7.wgsl.expected.spvasm
new file mode 100644
index 0000000..4329382
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleLevel/faa6d7.wgsl.expected.spvasm
@@ -0,0 +1,108 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 62
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %arg_1 "arg_1"
+               OpName %textureSampleLevel_faa6d7 "textureSampleLevel_faa6d7"
+               OpName %arg_2 "arg_2"
+               OpName %arg_3 "arg_3"
+               OpName %arg_4 "arg_4"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %arg_1 DescriptorSet 1
+               OpDecorate %arg_1 Binding 1
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+         %14 = OpTypeSampler
+%_ptr_UniformConstant_14 = OpTypePointer UniformConstant %14
+      %arg_1 = OpVariable %_ptr_UniformConstant_14 UniformConstant
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+    %v2float = OpTypeVector %float 2
+         %20 = OpConstantNull %v2float
+%_ptr_Function_v2float = OpTypePointer Function %v2float
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %27 = OpConstantNull %uint
+    %float_1 = OpConstant %float 1
+%_ptr_Function_float = OpTypePointer Function %float
+         %34 = OpTypeSampledImage %11
+    %v3float = OpTypeVector %float 3
+        %int = OpTypeInt 32 1
+      %v2int = OpTypeVector %int 2
+         %46 = OpConstantNull %v2int
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+         %49 = OpTypeFunction %v4float
+%textureSampleLevel_faa6d7 = OpFunction %void None %15
+         %18 = OpLabel
+      %arg_2 = OpVariable %_ptr_Function_v2float Function %20
+      %arg_3 = OpVariable %_ptr_Function_uint Function %27
+      %arg_4 = OpVariable %_ptr_Function_float Function %8
+        %res = OpVariable %_ptr_Function_v4float Function %5
+               OpStore %arg_2 %20
+               OpStore %arg_3 %uint_1
+               OpStore %arg_4 %float_1
+         %32 = OpLoad %14 %arg_1
+         %33 = OpLoad %11 %arg_0
+         %35 = OpSampledImage %34 %33 %32
+         %37 = OpLoad %v2float %arg_2
+         %38 = OpCompositeExtract %float %37 0
+         %39 = OpCompositeExtract %float %37 1
+         %41 = OpLoad %uint %arg_3
+         %40 = OpConvertUToF %float %41
+         %42 = OpCompositeConstruct %v3float %38 %39 %40
+         %43 = OpLoad %float %arg_4
+         %31 = OpImageSampleExplicitLod %v4float %35 %42 Lod|ConstOffset %43 %46
+               OpStore %res %31
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %49
+         %51 = OpLabel
+         %52 = OpFunctionCall %void %textureSampleLevel_faa6d7
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %54 = OpLabel
+         %55 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %55
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %57 = OpLabel
+         %58 = OpFunctionCall %void %textureSampleLevel_faa6d7
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %60 = OpLabel
+         %61 = OpFunctionCall %void %textureSampleLevel_faa6d7
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/faa6d7.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/faa6d7.wgsl.expected.wgsl
new file mode 100644
index 0000000..b9a723f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureSampleLevel/faa6d7.wgsl.expected.wgsl
@@ -0,0 +1,27 @@
+@group(1) @binding(0) var arg_0 : texture_2d_array<f32>;
+
+@group(1) @binding(1) var arg_1 : sampler;
+
+fn textureSampleLevel_faa6d7() {
+  var arg_2 = vec2<f32>();
+  var arg_3 = 1u;
+  var arg_4 = 1.0f;
+  const arg_5 = vec2<i32>();
+  var res : vec4<f32> = textureSampleLevel(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureSampleLevel_faa6d7();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureSampleLevel_faa6d7();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureSampleLevel_faa6d7();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/07548b.wgsl b/test/tint/builtins/gen/var/textureStore/07548b.wgsl
new file mode 100644
index 0000000..2a43425
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/07548b.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_3d<rgba16sint, write>;
+
+// fn textureStore(texture: texture_storage_3d<rgba16sint, write>, coords: vec3<u32>, value: vec4<i32>)
+fn textureStore_07548b() {
+  var arg_1 = vec3<u32>();
+  var arg_2 = vec4<i32>();
+  textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_07548b();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_07548b();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_07548b();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/07548b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/07548b.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..56dfb6c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/07548b.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture3D<int4> arg_0 : register(u0, space1);
+
+void textureStore_07548b() {
+  uint3 arg_1 = (0u).xxx;
+  int4 arg_2 = (0).xxxx;
+  arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_07548b();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_07548b();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_07548b();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/07548b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/07548b.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..56dfb6c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/07548b.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture3D<int4> arg_0 : register(u0, space1);
+
+void textureStore_07548b() {
+  uint3 arg_1 = (0u).xxx;
+  int4 arg_2 = (0).xxxx;
+  arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_07548b();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_07548b();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_07548b();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/07548b.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/07548b.wgsl.expected.glsl
new file mode 100644
index 0000000..26da7f2
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/07548b.wgsl.expected.glsl
@@ -0,0 +1,58 @@
+#version 310 es
+
+layout(rgba16i) uniform highp writeonly iimage3D arg_0;
+void textureStore_07548b() {
+  uvec3 arg_1 = uvec3(0u);
+  ivec4 arg_2 = ivec4(0);
+  imageStore(arg_0, ivec3(arg_1), arg_2);
+}
+
+vec4 vertex_main() {
+  textureStore_07548b();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+layout(rgba16i) uniform highp writeonly iimage3D arg_0;
+void textureStore_07548b() {
+  uvec3 arg_1 = uvec3(0u);
+  ivec4 arg_2 = ivec4(0);
+  imageStore(arg_0, ivec3(arg_1), arg_2);
+}
+
+void fragment_main() {
+  textureStore_07548b();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+layout(rgba16i) uniform highp writeonly iimage3D arg_0;
+void textureStore_07548b() {
+  uvec3 arg_1 = uvec3(0u);
+  ivec4 arg_2 = ivec4(0);
+  imageStore(arg_0, ivec3(arg_1), arg_2);
+}
+
+void compute_main() {
+  textureStore_07548b();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/07548b.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/07548b.wgsl.expected.msl
new file mode 100644
index 0000000..05af3ae
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/07548b.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_07548b(texture3d<int, access::write> tint_symbol_1) {
+  uint3 arg_1 = uint3(0u);
+  int4 arg_2 = int4(0);
+  tint_symbol_1.write(arg_2, uint3(arg_1));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<int, access::write> tint_symbol_2) {
+  textureStore_07548b(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<int, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture3d<int, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureStore_07548b(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture3d<int, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureStore_07548b(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureStore/07548b.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/07548b.wgsl.expected.spvasm
new file mode 100644
index 0000000..02f5ee8
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/07548b.wgsl.expected.spvasm
@@ -0,0 +1,84 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 44
+; 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_07548b "textureStore_07548b"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 3D 0 0 0 2 Rgba16i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v3uint = OpTypeVector %uint 3
+         %19 = OpConstantNull %v3uint
+%_ptr_Function_v3uint = OpTypePointer Function %v3uint
+      %v4int = OpTypeVector %int 4
+         %23 = OpConstantNull %v4int
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+         %30 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureStore_07548b = OpFunction %void None %13
+         %16 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v3uint Function %19
+      %arg_2 = OpVariable %_ptr_Function_v4int Function %23
+               OpStore %arg_1 %19
+               OpStore %arg_2 %23
+         %27 = OpLoad %11 %arg_0
+         %28 = OpLoad %v3uint %arg_1
+         %29 = OpLoad %v4int %arg_2
+               OpImageWrite %27 %28 %29
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %30
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %textureStore_07548b
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %35 = OpLabel
+         %36 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %36
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %39 = OpLabel
+         %40 = OpFunctionCall %void %textureStore_07548b
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %42 = OpLabel
+         %43 = OpFunctionCall %void %textureStore_07548b
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/07548b.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/07548b.wgsl.expected.wgsl
new file mode 100644
index 0000000..c935ddc
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/07548b.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(0) var arg_0 : texture_storage_3d<rgba16sint, write>;
+
+fn textureStore_07548b() {
+  var arg_1 = vec3<u32>();
+  var arg_2 = vec4<i32>();
+  textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_07548b();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_07548b();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_07548b();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/158cf0.wgsl b/test/tint/builtins/gen/var/textureStore/158cf0.wgsl
new file mode 100644
index 0000000..9e357ca
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/158cf0.wgsl
@@ -0,0 +1,47 @@
+// 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: u32, value: vec4<u32>)
+fn textureStore_158cf0() {
+  var arg_1 = vec2<u32>();
+  var arg_2 = 1u;
+  var arg_3 = vec4<u32>();
+  textureStore(arg_0, arg_1, arg_2, arg_3);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_158cf0();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_158cf0();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_158cf0();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/158cf0.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/158cf0.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..c2d4244
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/158cf0.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+RWTexture2DArray<uint4> arg_0 : register(u0, space1);
+
+void textureStore_158cf0() {
+  uint2 arg_1 = (0u).xx;
+  uint arg_2 = 1u;
+  uint4 arg_3 = (0u).xxxx;
+  arg_0[uint3(arg_1, arg_2)] = arg_3;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_158cf0();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_158cf0();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_158cf0();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/158cf0.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/158cf0.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..c2d4244
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/158cf0.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+RWTexture2DArray<uint4> arg_0 : register(u0, space1);
+
+void textureStore_158cf0() {
+  uint2 arg_1 = (0u).xx;
+  uint arg_2 = 1u;
+  uint4 arg_3 = (0u).xxxx;
+  arg_0[uint3(arg_1, arg_2)] = arg_3;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_158cf0();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_158cf0();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_158cf0();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/158cf0.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/158cf0.wgsl.expected.glsl
new file mode 100644
index 0000000..3fbe7e3
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/158cf0.wgsl.expected.glsl
@@ -0,0 +1,61 @@
+#version 310 es
+
+layout(r32ui) uniform highp writeonly uimage2DArray arg_0;
+void textureStore_158cf0() {
+  uvec2 arg_1 = uvec2(0u);
+  uint arg_2 = 1u;
+  uvec4 arg_3 = uvec4(0u);
+  imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3);
+}
+
+vec4 vertex_main() {
+  textureStore_158cf0();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = 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_158cf0() {
+  uvec2 arg_1 = uvec2(0u);
+  uint arg_2 = 1u;
+  uvec4 arg_3 = uvec4(0u);
+  imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3);
+}
+
+void fragment_main() {
+  textureStore_158cf0();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+layout(r32ui) uniform highp writeonly uimage2DArray arg_0;
+void textureStore_158cf0() {
+  uvec2 arg_1 = uvec2(0u);
+  uint arg_2 = 1u;
+  uvec4 arg_3 = uvec4(0u);
+  imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3);
+}
+
+void compute_main() {
+  textureStore_158cf0();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/158cf0.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/158cf0.wgsl.expected.msl
new file mode 100644
index 0000000..b53dec4
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/158cf0.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_158cf0(texture2d_array<uint, access::write> tint_symbol_1) {
+  uint2 arg_1 = uint2(0u);
+  uint arg_2 = 1u;
+  uint4 arg_3 = uint4(0u);
+  tint_symbol_1.write(arg_3, uint2(arg_1), arg_2);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<uint, access::write> tint_symbol_2) {
+  textureStore_158cf0(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_158cf0(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d_array<uint, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureStore_158cf0(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureStore/158cf0.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/158cf0.wgsl.expected.spvasm
new file mode 100644
index 0000000..540fcce
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/158cf0.wgsl.expected.spvasm
@@ -0,0 +1,94 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 52
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureStore_158cf0 "textureStore_158cf0"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %arg_3 "arg_3"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 2D 0 1 0 2 R32ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+     %v2uint = OpTypeVector %uint 2
+         %18 = OpConstantNull %v2uint
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %24 = OpConstantNull %uint
+     %v4uint = OpTypeVector %uint 4
+         %26 = OpConstantNull %v4uint
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+     %v3uint = OpTypeVector %uint 3
+         %38 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureStore_158cf0 = OpFunction %void None %13
+         %16 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v2uint Function %18
+      %arg_2 = OpVariable %_ptr_Function_uint Function %24
+      %arg_3 = OpVariable %_ptr_Function_v4uint Function %26
+               OpStore %arg_1 %18
+               OpStore %arg_2 %uint_1
+               OpStore %arg_3 %26
+         %30 = OpLoad %11 %arg_0
+         %32 = OpLoad %v2uint %arg_1
+         %33 = OpCompositeExtract %uint %32 0
+         %34 = OpCompositeExtract %uint %32 1
+         %35 = OpLoad %uint %arg_2
+         %36 = OpCompositeConstruct %v3uint %33 %34 %35
+         %37 = OpLoad %v4uint %arg_3
+               OpImageWrite %30 %36 %37
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %38
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %textureStore_158cf0
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %43 = OpLabel
+         %44 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %44
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %47 = OpLabel
+         %48 = OpFunctionCall %void %textureStore_158cf0
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %50 = OpLabel
+         %51 = OpFunctionCall %void %textureStore_158cf0
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/158cf0.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/158cf0.wgsl.expected.wgsl
new file mode 100644
index 0000000..234e5ce
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/158cf0.wgsl.expected.wgsl
@@ -0,0 +1,24 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<r32uint, write>;
+
+fn textureStore_158cf0() {
+  var arg_1 = vec2<u32>();
+  var arg_2 = 1u;
+  var arg_3 = vec4<u32>();
+  textureStore(arg_0, arg_1, arg_2, arg_3);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_158cf0();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_158cf0();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_158cf0();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/1839f2.wgsl b/test/tint/builtins/gen/var/textureStore/1839f2.wgsl
new file mode 100644
index 0000000..58f1750
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/1839f2.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d<rgba8sint, write>;
+
+// fn textureStore(texture: texture_storage_2d<rgba8sint, write>, coords: vec2<u32>, value: vec4<i32>)
+fn textureStore_1839f2() {
+  var arg_1 = vec2<u32>();
+  var arg_2 = vec4<i32>();
+  textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_1839f2();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_1839f2();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_1839f2();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/1839f2.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/1839f2.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..a349cc7
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/1839f2.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture2D<int4> arg_0 : register(u0, space1);
+
+void textureStore_1839f2() {
+  uint2 arg_1 = (0u).xx;
+  int4 arg_2 = (0).xxxx;
+  arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_1839f2();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_1839f2();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_1839f2();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/1839f2.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/1839f2.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..a349cc7
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/1839f2.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture2D<int4> arg_0 : register(u0, space1);
+
+void textureStore_1839f2() {
+  uint2 arg_1 = (0u).xx;
+  int4 arg_2 = (0).xxxx;
+  arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_1839f2();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_1839f2();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_1839f2();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/1839f2.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/1839f2.wgsl.expected.glsl
new file mode 100644
index 0000000..290798d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/1839f2.wgsl.expected.glsl
@@ -0,0 +1,58 @@
+#version 310 es
+
+layout(rgba8i) uniform highp writeonly iimage2D arg_0;
+void textureStore_1839f2() {
+  uvec2 arg_1 = uvec2(0u);
+  ivec4 arg_2 = ivec4(0);
+  imageStore(arg_0, ivec2(arg_1), arg_2);
+}
+
+vec4 vertex_main() {
+  textureStore_1839f2();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+layout(rgba8i) uniform highp writeonly iimage2D arg_0;
+void textureStore_1839f2() {
+  uvec2 arg_1 = uvec2(0u);
+  ivec4 arg_2 = ivec4(0);
+  imageStore(arg_0, ivec2(arg_1), arg_2);
+}
+
+void fragment_main() {
+  textureStore_1839f2();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+layout(rgba8i) uniform highp writeonly iimage2D arg_0;
+void textureStore_1839f2() {
+  uvec2 arg_1 = uvec2(0u);
+  ivec4 arg_2 = ivec4(0);
+  imageStore(arg_0, ivec2(arg_1), arg_2);
+}
+
+void compute_main() {
+  textureStore_1839f2();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/1839f2.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/1839f2.wgsl.expected.msl
new file mode 100644
index 0000000..2ab9268
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/1839f2.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_1839f2(texture2d<int, access::write> tint_symbol_1) {
+  uint2 arg_1 = uint2(0u);
+  int4 arg_2 = int4(0);
+  tint_symbol_1.write(arg_2, uint2(arg_1));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<int, access::write> tint_symbol_2) {
+  textureStore_1839f2(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<int, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<int, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureStore_1839f2(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d<int, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureStore_1839f2(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureStore/1839f2.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/1839f2.wgsl.expected.spvasm
new file mode 100644
index 0000000..9ceec9b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/1839f2.wgsl.expected.spvasm
@@ -0,0 +1,84 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 44
+; 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_1839f2 "textureStore_1839f2"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 2D 0 0 0 2 Rgba8i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+         %19 = OpConstantNull %v2uint
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+      %v4int = OpTypeVector %int 4
+         %23 = OpConstantNull %v4int
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+         %30 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureStore_1839f2 = OpFunction %void None %13
+         %16 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v2uint Function %19
+      %arg_2 = OpVariable %_ptr_Function_v4int Function %23
+               OpStore %arg_1 %19
+               OpStore %arg_2 %23
+         %27 = OpLoad %11 %arg_0
+         %28 = OpLoad %v2uint %arg_1
+         %29 = OpLoad %v4int %arg_2
+               OpImageWrite %27 %28 %29
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %30
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %textureStore_1839f2
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %35 = OpLabel
+         %36 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %36
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %39 = OpLabel
+         %40 = OpFunctionCall %void %textureStore_1839f2
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %42 = OpLabel
+         %43 = OpFunctionCall %void %textureStore_1839f2
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/1839f2.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/1839f2.wgsl.expected.wgsl
new file mode 100644
index 0000000..8dbc1c9
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/1839f2.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d<rgba8sint, write>;
+
+fn textureStore_1839f2() {
+  var arg_1 = vec2<u32>();
+  var arg_2 = vec4<i32>();
+  textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_1839f2();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_1839f2();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_1839f2();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/1a7d35.wgsl b/test/tint/builtins/gen/var/textureStore/1a7d35.wgsl
new file mode 100644
index 0000000..88a097b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/1a7d35.wgsl
@@ -0,0 +1,47 @@
+// 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: u32, value: vec4<i32>)
+fn textureStore_1a7d35() {
+  var arg_1 = vec2<u32>();
+  var arg_2 = 1u;
+  var arg_3 = vec4<i32>();
+  textureStore(arg_0, arg_1, arg_2, arg_3);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_1a7d35();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_1a7d35();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_1a7d35();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/1a7d35.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/1a7d35.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..0a928d2
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/1a7d35.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+RWTexture2DArray<int4> arg_0 : register(u0, space1);
+
+void textureStore_1a7d35() {
+  uint2 arg_1 = (0u).xx;
+  uint arg_2 = 1u;
+  int4 arg_3 = (0).xxxx;
+  arg_0[uint3(arg_1, arg_2)] = arg_3;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_1a7d35();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_1a7d35();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_1a7d35();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/1a7d35.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/1a7d35.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..0a928d2
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/1a7d35.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+RWTexture2DArray<int4> arg_0 : register(u0, space1);
+
+void textureStore_1a7d35() {
+  uint2 arg_1 = (0u).xx;
+  uint arg_2 = 1u;
+  int4 arg_3 = (0).xxxx;
+  arg_0[uint3(arg_1, arg_2)] = arg_3;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_1a7d35();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_1a7d35();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_1a7d35();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/1a7d35.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/1a7d35.wgsl.expected.glsl
new file mode 100644
index 0000000..3e00907
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/1a7d35.wgsl.expected.glsl
@@ -0,0 +1,61 @@
+#version 310 es
+
+layout(r32i) uniform highp writeonly iimage2DArray arg_0;
+void textureStore_1a7d35() {
+  uvec2 arg_1 = uvec2(0u);
+  uint arg_2 = 1u;
+  ivec4 arg_3 = ivec4(0);
+  imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3);
+}
+
+vec4 vertex_main() {
+  textureStore_1a7d35();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = 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_1a7d35() {
+  uvec2 arg_1 = uvec2(0u);
+  uint arg_2 = 1u;
+  ivec4 arg_3 = ivec4(0);
+  imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3);
+}
+
+void fragment_main() {
+  textureStore_1a7d35();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+layout(r32i) uniform highp writeonly iimage2DArray arg_0;
+void textureStore_1a7d35() {
+  uvec2 arg_1 = uvec2(0u);
+  uint arg_2 = 1u;
+  ivec4 arg_3 = ivec4(0);
+  imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3);
+}
+
+void compute_main() {
+  textureStore_1a7d35();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/1a7d35.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/1a7d35.wgsl.expected.msl
new file mode 100644
index 0000000..e5c4cd4
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/1a7d35.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_1a7d35(texture2d_array<int, access::write> tint_symbol_1) {
+  uint2 arg_1 = uint2(0u);
+  uint arg_2 = 1u;
+  int4 arg_3 = int4(0);
+  tint_symbol_1.write(arg_3, uint2(arg_1), arg_2);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<int, access::write> tint_symbol_2) {
+  textureStore_1a7d35(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_1a7d35(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d_array<int, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureStore_1a7d35(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureStore/1a7d35.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/1a7d35.wgsl.expected.spvasm
new file mode 100644
index 0000000..72a691f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/1a7d35.wgsl.expected.spvasm
@@ -0,0 +1,95 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 53
+; 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_1a7d35 "textureStore_1a7d35"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %arg_3 "arg_3"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 2D 0 1 0 2 R32i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+         %19 = OpConstantNull %v2uint
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %25 = OpConstantNull %uint
+      %v4int = OpTypeVector %int 4
+         %27 = OpConstantNull %v4int
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+     %v3uint = OpTypeVector %uint 3
+         %39 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureStore_1a7d35 = OpFunction %void None %13
+         %16 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v2uint Function %19
+      %arg_2 = OpVariable %_ptr_Function_uint Function %25
+      %arg_3 = OpVariable %_ptr_Function_v4int Function %27
+               OpStore %arg_1 %19
+               OpStore %arg_2 %uint_1
+               OpStore %arg_3 %27
+         %31 = OpLoad %11 %arg_0
+         %33 = OpLoad %v2uint %arg_1
+         %34 = OpCompositeExtract %uint %33 0
+         %35 = OpCompositeExtract %uint %33 1
+         %36 = OpLoad %uint %arg_2
+         %37 = OpCompositeConstruct %v3uint %34 %35 %36
+         %38 = OpLoad %v4int %arg_3
+               OpImageWrite %31 %37 %38
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %39
+         %41 = OpLabel
+         %42 = OpFunctionCall %void %textureStore_1a7d35
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %44 = OpLabel
+         %45 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %45
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %48 = OpLabel
+         %49 = OpFunctionCall %void %textureStore_1a7d35
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %51 = OpLabel
+         %52 = OpFunctionCall %void %textureStore_1a7d35
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/1a7d35.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/1a7d35.wgsl.expected.wgsl
new file mode 100644
index 0000000..81eb9a1
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/1a7d35.wgsl.expected.wgsl
@@ -0,0 +1,24 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<r32sint, write>;
+
+fn textureStore_1a7d35() {
+  var arg_1 = vec2<u32>();
+  var arg_2 = 1u;
+  var arg_3 = vec4<i32>();
+  textureStore(arg_0, arg_1, arg_2, arg_3);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_1a7d35();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_1a7d35();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_1a7d35();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/1dc954.wgsl b/test/tint/builtins/gen/var/textureStore/1dc954.wgsl
new file mode 100644
index 0000000..252b14a
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/1dc954.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_1d<rgba32sint, write>;
+
+// fn textureStore(texture: texture_storage_1d<rgba32sint, write>, coords: u32, value: vec4<i32>)
+fn textureStore_1dc954() {
+  var arg_1 = 1u;
+  var arg_2 = vec4<i32>();
+  textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_1dc954();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_1dc954();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_1dc954();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/1dc954.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/1dc954.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..63191df
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/1dc954.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture1D<int4> arg_0 : register(u0, space1);
+
+void textureStore_1dc954() {
+  uint arg_1 = 1u;
+  int4 arg_2 = (0).xxxx;
+  arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_1dc954();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_1dc954();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_1dc954();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/1dc954.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/1dc954.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..63191df
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/1dc954.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture1D<int4> arg_0 : register(u0, space1);
+
+void textureStore_1dc954() {
+  uint arg_1 = 1u;
+  int4 arg_2 = (0).xxxx;
+  arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_1dc954();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_1dc954();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_1dc954();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/1dc954.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/1dc954.wgsl.expected.glsl
new file mode 100644
index 0000000..3a1e8e2
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/1dc954.wgsl.expected.glsl
@@ -0,0 +1,84 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba32i) uniform highp writeonly iimage1D arg_0;
+void textureStore_1dc954() {
+  uint arg_1 = 1u;
+  ivec4 arg_2 = ivec4(0);
+  imageStore(arg_0, int(arg_1), arg_2);
+}
+
+vec4 vertex_main() {
+  textureStore_1dc954();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'iimage1D' : Reserved word. 
+WARNING: 0:3: 'layout' : useless application of layout qualifier 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+layout(rgba32i) uniform highp writeonly iimage1D arg_0;
+void textureStore_1dc954() {
+  uint arg_1 = 1u;
+  ivec4 arg_2 = ivec4(0);
+  imageStore(arg_0, int(arg_1), arg_2);
+}
+
+void fragment_main() {
+  textureStore_1dc954();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'iimage1D' : Reserved word. 
+WARNING: 0:4: 'layout' : useless application of layout qualifier 
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba32i) uniform highp writeonly iimage1D arg_0;
+void textureStore_1dc954() {
+  uint arg_1 = 1u;
+  ivec4 arg_2 = ivec4(0);
+  imageStore(arg_0, int(arg_1), arg_2);
+}
+
+void compute_main() {
+  textureStore_1dc954();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'iimage1D' : Reserved word. 
+WARNING: 0:3: 'layout' : useless application of layout qualifier 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureStore/1dc954.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/1dc954.wgsl.expected.msl
new file mode 100644
index 0000000..78aa861
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/1dc954.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_1dc954(texture1d<int, access::write> tint_symbol_1) {
+  uint arg_1 = 1u;
+  int4 arg_2 = int4(0);
+  tint_symbol_1.write(arg_2, uint(arg_1));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<int, access::write> tint_symbol_2) {
+  textureStore_1dc954(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<int, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<int, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureStore_1dc954(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture1d<int, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureStore_1dc954(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureStore/1dc954.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/1dc954.wgsl.expected.spvasm
new file mode 100644
index 0000000..2d08c73
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/1dc954.wgsl.expected.spvasm
@@ -0,0 +1,85 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 44
+; Schema: 0
+               OpCapability Shader
+               OpCapability Image1D
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureStore_1dc954 "textureStore_1dc954"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 1D 0 0 0 2 Rgba32i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %21 = OpConstantNull %uint
+      %v4int = OpTypeVector %int 4
+         %23 = OpConstantNull %v4int
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+         %30 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureStore_1dc954 = OpFunction %void None %13
+         %16 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_uint Function %21
+      %arg_2 = OpVariable %_ptr_Function_v4int Function %23
+               OpStore %arg_1 %uint_1
+               OpStore %arg_2 %23
+         %27 = OpLoad %11 %arg_0
+         %28 = OpLoad %uint %arg_1
+         %29 = OpLoad %v4int %arg_2
+               OpImageWrite %27 %28 %29
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %30
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %textureStore_1dc954
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %35 = OpLabel
+         %36 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %36
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %39 = OpLabel
+         %40 = OpFunctionCall %void %textureStore_1dc954
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %42 = OpLabel
+         %43 = OpFunctionCall %void %textureStore_1dc954
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/1dc954.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/1dc954.wgsl.expected.wgsl
new file mode 100644
index 0000000..498cfc4
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/1dc954.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(0) var arg_0 : texture_storage_1d<rgba32sint, write>;
+
+fn textureStore_1dc954() {
+  var arg_1 = 1u;
+  var arg_2 = vec4<i32>();
+  textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_1dc954();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_1dc954();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_1dc954();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/1e20f2.wgsl b/test/tint/builtins/gen/var/textureStore/1e20f2.wgsl
new file mode 100644
index 0000000..cb704a8
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/1e20f2.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d<r32float, write>;
+
+// fn textureStore(texture: texture_storage_2d<r32float, write>, coords: vec2<u32>, value: vec4<f32>)
+fn textureStore_1e20f2() {
+  var arg_1 = vec2<u32>();
+  var arg_2 = vec4<f32>();
+  textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_1e20f2();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_1e20f2();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_1e20f2();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/1e20f2.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/1e20f2.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..d7b4a2b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/1e20f2.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture2D<float4> arg_0 : register(u0, space1);
+
+void textureStore_1e20f2() {
+  uint2 arg_1 = (0u).xx;
+  float4 arg_2 = (0.0f).xxxx;
+  arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_1e20f2();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_1e20f2();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_1e20f2();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/1e20f2.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/1e20f2.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..d7b4a2b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/1e20f2.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture2D<float4> arg_0 : register(u0, space1);
+
+void textureStore_1e20f2() {
+  uint2 arg_1 = (0u).xx;
+  float4 arg_2 = (0.0f).xxxx;
+  arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_1e20f2();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_1e20f2();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_1e20f2();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/1e20f2.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/1e20f2.wgsl.expected.glsl
new file mode 100644
index 0000000..1ea1aaf
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/1e20f2.wgsl.expected.glsl
@@ -0,0 +1,58 @@
+#version 310 es
+
+layout(r32f) uniform highp writeonly image2D arg_0;
+void textureStore_1e20f2() {
+  uvec2 arg_1 = uvec2(0u);
+  vec4 arg_2 = vec4(0.0f);
+  imageStore(arg_0, ivec2(arg_1), arg_2);
+}
+
+vec4 vertex_main() {
+  textureStore_1e20f2();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+layout(r32f) uniform highp writeonly image2D arg_0;
+void textureStore_1e20f2() {
+  uvec2 arg_1 = uvec2(0u);
+  vec4 arg_2 = vec4(0.0f);
+  imageStore(arg_0, ivec2(arg_1), arg_2);
+}
+
+void fragment_main() {
+  textureStore_1e20f2();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+layout(r32f) uniform highp writeonly image2D arg_0;
+void textureStore_1e20f2() {
+  uvec2 arg_1 = uvec2(0u);
+  vec4 arg_2 = vec4(0.0f);
+  imageStore(arg_0, ivec2(arg_1), arg_2);
+}
+
+void compute_main() {
+  textureStore_1e20f2();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/1e20f2.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/1e20f2.wgsl.expected.msl
new file mode 100644
index 0000000..698070e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/1e20f2.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_1e20f2(texture2d<float, access::write> tint_symbol_1) {
+  uint2 arg_1 = uint2(0u);
+  float4 arg_2 = float4(0.0f);
+  tint_symbol_1.write(arg_2, uint2(arg_1));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<float, access::write> tint_symbol_2) {
+  textureStore_1e20f2(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<float, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<float, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureStore_1e20f2(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d<float, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureStore_1e20f2(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureStore/1e20f2.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/1e20f2.wgsl.expected.spvasm
new file mode 100644
index 0000000..db47768
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/1e20f2.wgsl.expected.spvasm
@@ -0,0 +1,81 @@
+; 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_1e20f2 "textureStore_1e20f2"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 0 0 2 R32f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %12 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+         %18 = OpConstantNull %v2uint
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+         %27 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureStore_1e20f2 = OpFunction %void None %12
+         %15 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v2uint Function %18
+      %arg_2 = OpVariable %_ptr_Function_v4float Function %5
+               OpStore %arg_1 %18
+               OpStore %arg_2 %5
+         %24 = OpLoad %11 %arg_0
+         %25 = OpLoad %v2uint %arg_1
+         %26 = OpLoad %v4float %arg_2
+               OpImageWrite %24 %25 %26
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %27
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %textureStore_1e20f2
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+         %32 = OpLabel
+         %33 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %33
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %textureStore_1e20f2
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %12
+         %39 = OpLabel
+         %40 = OpFunctionCall %void %textureStore_1e20f2
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/1e20f2.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/1e20f2.wgsl.expected.wgsl
new file mode 100644
index 0000000..1116037
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/1e20f2.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d<r32float, write>;
+
+fn textureStore_1e20f2() {
+  var arg_1 = vec2<u32>();
+  var arg_2 = vec4<f32>();
+  textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_1e20f2();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_1e20f2();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_1e20f2();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/207fdd.wgsl b/test/tint/builtins/gen/var/textureStore/207fdd.wgsl
new file mode 100644
index 0000000..c00156f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/207fdd.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_3d<rgba8snorm, write>;
+
+// fn textureStore(texture: texture_storage_3d<rgba8snorm, write>, coords: vec3<u32>, value: vec4<f32>)
+fn textureStore_207fdd() {
+  var arg_1 = vec3<u32>();
+  var arg_2 = vec4<f32>();
+  textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_207fdd();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_207fdd();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_207fdd();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/207fdd.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/207fdd.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..9e5acc4
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/207fdd.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture3D<float4> arg_0 : register(u0, space1);
+
+void textureStore_207fdd() {
+  uint3 arg_1 = (0u).xxx;
+  float4 arg_2 = (0.0f).xxxx;
+  arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_207fdd();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_207fdd();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_207fdd();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/207fdd.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/207fdd.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..9e5acc4
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/207fdd.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture3D<float4> arg_0 : register(u0, space1);
+
+void textureStore_207fdd() {
+  uint3 arg_1 = (0u).xxx;
+  float4 arg_2 = (0.0f).xxxx;
+  arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_207fdd();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_207fdd();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_207fdd();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/207fdd.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/207fdd.wgsl.expected.glsl
new file mode 100644
index 0000000..be45a70
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/207fdd.wgsl.expected.glsl
@@ -0,0 +1,58 @@
+#version 310 es
+
+layout(rgba8_snorm) uniform highp writeonly image3D arg_0;
+void textureStore_207fdd() {
+  uvec3 arg_1 = uvec3(0u);
+  vec4 arg_2 = vec4(0.0f);
+  imageStore(arg_0, ivec3(arg_1), arg_2);
+}
+
+vec4 vertex_main() {
+  textureStore_207fdd();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+layout(rgba8_snorm) uniform highp writeonly image3D arg_0;
+void textureStore_207fdd() {
+  uvec3 arg_1 = uvec3(0u);
+  vec4 arg_2 = vec4(0.0f);
+  imageStore(arg_0, ivec3(arg_1), arg_2);
+}
+
+void fragment_main() {
+  textureStore_207fdd();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+layout(rgba8_snorm) uniform highp writeonly image3D arg_0;
+void textureStore_207fdd() {
+  uvec3 arg_1 = uvec3(0u);
+  vec4 arg_2 = vec4(0.0f);
+  imageStore(arg_0, ivec3(arg_1), arg_2);
+}
+
+void compute_main() {
+  textureStore_207fdd();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/207fdd.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/207fdd.wgsl.expected.msl
new file mode 100644
index 0000000..97a7ca9
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/207fdd.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_207fdd(texture3d<float, access::write> tint_symbol_1) {
+  uint3 arg_1 = uint3(0u);
+  float4 arg_2 = float4(0.0f);
+  tint_symbol_1.write(arg_2, uint3(arg_1));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<float, access::write> tint_symbol_2) {
+  textureStore_207fdd(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<float, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture3d<float, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureStore_207fdd(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture3d<float, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureStore_207fdd(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureStore/207fdd.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/207fdd.wgsl.expected.spvasm
new file mode 100644
index 0000000..b40adc5
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/207fdd.wgsl.expected.spvasm
@@ -0,0 +1,81 @@
+; 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_207fdd "textureStore_207fdd"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 3D 0 0 0 2 Rgba8Snorm
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %12 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v3uint = OpTypeVector %uint 3
+         %18 = OpConstantNull %v3uint
+%_ptr_Function_v3uint = OpTypePointer Function %v3uint
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+         %27 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureStore_207fdd = OpFunction %void None %12
+         %15 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v3uint Function %18
+      %arg_2 = OpVariable %_ptr_Function_v4float Function %5
+               OpStore %arg_1 %18
+               OpStore %arg_2 %5
+         %24 = OpLoad %11 %arg_0
+         %25 = OpLoad %v3uint %arg_1
+         %26 = OpLoad %v4float %arg_2
+               OpImageWrite %24 %25 %26
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %27
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %textureStore_207fdd
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+         %32 = OpLabel
+         %33 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %33
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %textureStore_207fdd
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %12
+         %39 = OpLabel
+         %40 = OpFunctionCall %void %textureStore_207fdd
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/207fdd.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/207fdd.wgsl.expected.wgsl
new file mode 100644
index 0000000..703e7ce
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/207fdd.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(0) var arg_0 : texture_storage_3d<rgba8snorm, write>;
+
+fn textureStore_207fdd() {
+  var arg_1 = vec3<u32>();
+  var arg_2 = vec4<f32>();
+  textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_207fdd();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_207fdd();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_207fdd();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/285218.wgsl b/test/tint/builtins/gen/var/textureStore/285218.wgsl
new file mode 100644
index 0000000..98f2ada
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/285218.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_1d<rgba32float, write>;
+
+// fn textureStore(texture: texture_storage_1d<rgba32float, write>, coords: u32, value: vec4<f32>)
+fn textureStore_285218() {
+  var arg_1 = 1u;
+  var arg_2 = vec4<f32>();
+  textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_285218();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_285218();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_285218();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/285218.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/285218.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..e6d6c39
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/285218.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture1D<float4> arg_0 : register(u0, space1);
+
+void textureStore_285218() {
+  uint arg_1 = 1u;
+  float4 arg_2 = (0.0f).xxxx;
+  arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_285218();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_285218();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_285218();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/285218.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/285218.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..e6d6c39
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/285218.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture1D<float4> arg_0 : register(u0, space1);
+
+void textureStore_285218() {
+  uint arg_1 = 1u;
+  float4 arg_2 = (0.0f).xxxx;
+  arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_285218();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_285218();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_285218();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/285218.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/285218.wgsl.expected.glsl
new file mode 100644
index 0000000..ea017e2
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/285218.wgsl.expected.glsl
@@ -0,0 +1,84 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba32f) uniform highp writeonly image1D arg_0;
+void textureStore_285218() {
+  uint arg_1 = 1u;
+  vec4 arg_2 = vec4(0.0f);
+  imageStore(arg_0, int(arg_1), arg_2);
+}
+
+vec4 vertex_main() {
+  textureStore_285218();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image1D' : Reserved word. 
+WARNING: 0:3: 'layout' : useless application of layout qualifier 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+layout(rgba32f) uniform highp writeonly image1D arg_0;
+void textureStore_285218() {
+  uint arg_1 = 1u;
+  vec4 arg_2 = vec4(0.0f);
+  imageStore(arg_0, int(arg_1), arg_2);
+}
+
+void fragment_main() {
+  textureStore_285218();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'image1D' : Reserved word. 
+WARNING: 0:4: 'layout' : useless application of layout qualifier 
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba32f) uniform highp writeonly image1D arg_0;
+void textureStore_285218() {
+  uint arg_1 = 1u;
+  vec4 arg_2 = vec4(0.0f);
+  imageStore(arg_0, int(arg_1), arg_2);
+}
+
+void compute_main() {
+  textureStore_285218();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image1D' : Reserved word. 
+WARNING: 0:3: 'layout' : useless application of layout qualifier 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureStore/285218.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/285218.wgsl.expected.msl
new file mode 100644
index 0000000..c0e94ba
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/285218.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_285218(texture1d<float, access::write> tint_symbol_1) {
+  uint arg_1 = 1u;
+  float4 arg_2 = float4(0.0f);
+  tint_symbol_1.write(arg_2, uint(arg_1));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<float, access::write> tint_symbol_2) {
+  textureStore_285218(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<float, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<float, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureStore_285218(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture1d<float, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureStore_285218(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureStore/285218.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/285218.wgsl.expected.spvasm
new file mode 100644
index 0000000..6603867
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/285218.wgsl.expected.spvasm
@@ -0,0 +1,82 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 41
+; Schema: 0
+               OpCapability Shader
+               OpCapability Image1D
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureStore_285218 "textureStore_285218"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 1D 0 0 0 2 Rgba32f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %12 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %20 = OpConstantNull %uint
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+         %27 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureStore_285218 = OpFunction %void None %12
+         %15 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_uint Function %20
+      %arg_2 = OpVariable %_ptr_Function_v4float Function %5
+               OpStore %arg_1 %uint_1
+               OpStore %arg_2 %5
+         %24 = OpLoad %11 %arg_0
+         %25 = OpLoad %uint %arg_1
+         %26 = OpLoad %v4float %arg_2
+               OpImageWrite %24 %25 %26
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %27
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %textureStore_285218
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+         %32 = OpLabel
+         %33 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %33
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %textureStore_285218
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %12
+         %39 = OpLabel
+         %40 = OpFunctionCall %void %textureStore_285218
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/285218.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/285218.wgsl.expected.wgsl
new file mode 100644
index 0000000..a2e8b60
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/285218.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(0) var arg_0 : texture_storage_1d<rgba32float, write>;
+
+fn textureStore_285218() {
+  var arg_1 = 1u;
+  var arg_2 = vec4<f32>();
+  textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_285218();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_285218();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_285218();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/2d2835.wgsl b/test/tint/builtins/gen/var/textureStore/2d2835.wgsl
new file mode 100644
index 0000000..588630b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/2d2835.wgsl
@@ -0,0 +1,47 @@
+// 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: u32, value: vec4<f32>)
+fn textureStore_2d2835() {
+  var arg_1 = vec2<u32>();
+  var arg_2 = 1u;
+  var arg_3 = vec4<f32>();
+  textureStore(arg_0, arg_1, arg_2, arg_3);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_2d2835();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_2d2835();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_2d2835();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/2d2835.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/2d2835.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..b0cc940
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/2d2835.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+RWTexture2DArray<float4> arg_0 : register(u0, space1);
+
+void textureStore_2d2835() {
+  uint2 arg_1 = (0u).xx;
+  uint arg_2 = 1u;
+  float4 arg_3 = (0.0f).xxxx;
+  arg_0[uint3(arg_1, arg_2)] = arg_3;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_2d2835();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_2d2835();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_2d2835();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/2d2835.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/2d2835.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..b0cc940
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/2d2835.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+RWTexture2DArray<float4> arg_0 : register(u0, space1);
+
+void textureStore_2d2835() {
+  uint2 arg_1 = (0u).xx;
+  uint arg_2 = 1u;
+  float4 arg_3 = (0.0f).xxxx;
+  arg_0[uint3(arg_1, arg_2)] = arg_3;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_2d2835();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_2d2835();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_2d2835();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/2d2835.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/2d2835.wgsl.expected.glsl
new file mode 100644
index 0000000..cf424c5
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/2d2835.wgsl.expected.glsl
@@ -0,0 +1,84 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rg32f) uniform highp writeonly image2DArray arg_0;
+void textureStore_2d2835() {
+  uvec2 arg_1 = uvec2(0u);
+  uint arg_2 = 1u;
+  vec4 arg_3 = vec4(0.0f);
+  imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3);
+}
+
+vec4 vertex_main() {
+  textureStore_2d2835();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  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_2d2835() {
+  uvec2 arg_1 = uvec2(0u);
+  uint arg_2 = 1u;
+  vec4 arg_3 = vec4(0.0f);
+  imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3);
+}
+
+void fragment_main() {
+  textureStore_2d2835();
+}
+
+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_2d2835() {
+  uvec2 arg_1 = uvec2(0u);
+  uint arg_2 = 1u;
+  vec4 arg_3 = vec4(0.0f);
+  imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3);
+}
+
+void compute_main() {
+  textureStore_2d2835();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureStore/2d2835.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/2d2835.wgsl.expected.msl
new file mode 100644
index 0000000..30f7ba5
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/2d2835.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_2d2835(texture2d_array<float, access::write> tint_symbol_1) {
+  uint2 arg_1 = uint2(0u);
+  uint arg_2 = 1u;
+  float4 arg_3 = float4(0.0f);
+  tint_symbol_1.write(arg_3, uint2(arg_1), arg_2);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<float, access::write> tint_symbol_2) {
+  textureStore_2d2835(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_2d2835(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d_array<float, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureStore_2d2835(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureStore/2d2835.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/2d2835.wgsl.expected.spvasm
new file mode 100644
index 0000000..ef33f05
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/2d2835.wgsl.expected.spvasm
@@ -0,0 +1,93 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 50
+; Schema: 0
+               OpCapability Shader
+               OpCapability StorageImageExtendedFormats
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureStore_2d2835 "textureStore_2d2835"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %arg_3 "arg_3"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 1 0 2 Rg32f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %12 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+         %18 = OpConstantNull %v2uint
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %24 = OpConstantNull %uint
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+     %v3uint = OpTypeVector %uint 3
+         %36 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureStore_2d2835 = OpFunction %void None %12
+         %15 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v2uint Function %18
+      %arg_2 = OpVariable %_ptr_Function_uint Function %24
+      %arg_3 = OpVariable %_ptr_Function_v4float Function %5
+               OpStore %arg_1 %18
+               OpStore %arg_2 %uint_1
+               OpStore %arg_3 %5
+         %28 = OpLoad %11 %arg_0
+         %30 = OpLoad %v2uint %arg_1
+         %31 = OpCompositeExtract %uint %30 0
+         %32 = OpCompositeExtract %uint %30 1
+         %33 = OpLoad %uint %arg_2
+         %34 = OpCompositeConstruct %v3uint %31 %32 %33
+         %35 = OpLoad %v4float %arg_3
+               OpImageWrite %28 %34 %35
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %36
+         %38 = OpLabel
+         %39 = OpFunctionCall %void %textureStore_2d2835
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+         %41 = OpLabel
+         %42 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %42
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+         %45 = OpLabel
+         %46 = OpFunctionCall %void %textureStore_2d2835
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %12
+         %48 = OpLabel
+         %49 = OpFunctionCall %void %textureStore_2d2835
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/2d2835.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/2d2835.wgsl.expected.wgsl
new file mode 100644
index 0000000..76e91c0
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/2d2835.wgsl.expected.wgsl
@@ -0,0 +1,24 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rg32float, write>;
+
+fn textureStore_2d2835() {
+  var arg_1 = vec2<u32>();
+  var arg_2 = 1u;
+  var arg_3 = vec4<f32>();
+  textureStore(arg_0, arg_1, arg_2, arg_3);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_2d2835();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_2d2835();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_2d2835();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/2e6102.wgsl b/test/tint/builtins/gen/var/textureStore/2e6102.wgsl
new file mode 100644
index 0000000..2512a83
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/2e6102.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d<rgba32float, write>;
+
+// fn textureStore(texture: texture_storage_2d<rgba32float, write>, coords: vec2<u32>, value: vec4<f32>)
+fn textureStore_2e6102() {
+  var arg_1 = vec2<u32>();
+  var arg_2 = vec4<f32>();
+  textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_2e6102();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_2e6102();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_2e6102();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/2e6102.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/2e6102.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..ae9f5dd
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/2e6102.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture2D<float4> arg_0 : register(u0, space1);
+
+void textureStore_2e6102() {
+  uint2 arg_1 = (0u).xx;
+  float4 arg_2 = (0.0f).xxxx;
+  arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_2e6102();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_2e6102();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_2e6102();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/2e6102.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/2e6102.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..ae9f5dd
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/2e6102.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture2D<float4> arg_0 : register(u0, space1);
+
+void textureStore_2e6102() {
+  uint2 arg_1 = (0u).xx;
+  float4 arg_2 = (0.0f).xxxx;
+  arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_2e6102();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_2e6102();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_2e6102();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/2e6102.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/2e6102.wgsl.expected.glsl
new file mode 100644
index 0000000..e3185e6
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/2e6102.wgsl.expected.glsl
@@ -0,0 +1,58 @@
+#version 310 es
+
+layout(rgba32f) uniform highp writeonly image2D arg_0;
+void textureStore_2e6102() {
+  uvec2 arg_1 = uvec2(0u);
+  vec4 arg_2 = vec4(0.0f);
+  imageStore(arg_0, ivec2(arg_1), arg_2);
+}
+
+vec4 vertex_main() {
+  textureStore_2e6102();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+layout(rgba32f) uniform highp writeonly image2D arg_0;
+void textureStore_2e6102() {
+  uvec2 arg_1 = uvec2(0u);
+  vec4 arg_2 = vec4(0.0f);
+  imageStore(arg_0, ivec2(arg_1), arg_2);
+}
+
+void fragment_main() {
+  textureStore_2e6102();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+layout(rgba32f) uniform highp writeonly image2D arg_0;
+void textureStore_2e6102() {
+  uvec2 arg_1 = uvec2(0u);
+  vec4 arg_2 = vec4(0.0f);
+  imageStore(arg_0, ivec2(arg_1), arg_2);
+}
+
+void compute_main() {
+  textureStore_2e6102();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/2e6102.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/2e6102.wgsl.expected.msl
new file mode 100644
index 0000000..76221f2
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/2e6102.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_2e6102(texture2d<float, access::write> tint_symbol_1) {
+  uint2 arg_1 = uint2(0u);
+  float4 arg_2 = float4(0.0f);
+  tint_symbol_1.write(arg_2, uint2(arg_1));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<float, access::write> tint_symbol_2) {
+  textureStore_2e6102(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<float, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<float, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureStore_2e6102(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d<float, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureStore_2e6102(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureStore/2e6102.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/2e6102.wgsl.expected.spvasm
new file mode 100644
index 0000000..e9c074c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/2e6102.wgsl.expected.spvasm
@@ -0,0 +1,81 @@
+; 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_2e6102 "textureStore_2e6102"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 0 0 2 Rgba32f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %12 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+         %18 = OpConstantNull %v2uint
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+         %27 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureStore_2e6102 = OpFunction %void None %12
+         %15 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v2uint Function %18
+      %arg_2 = OpVariable %_ptr_Function_v4float Function %5
+               OpStore %arg_1 %18
+               OpStore %arg_2 %5
+         %24 = OpLoad %11 %arg_0
+         %25 = OpLoad %v2uint %arg_1
+         %26 = OpLoad %v4float %arg_2
+               OpImageWrite %24 %25 %26
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %27
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %textureStore_2e6102
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+         %32 = OpLabel
+         %33 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %33
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %textureStore_2e6102
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %12
+         %39 = OpLabel
+         %40 = OpFunctionCall %void %textureStore_2e6102
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/2e6102.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/2e6102.wgsl.expected.wgsl
new file mode 100644
index 0000000..212a545
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/2e6102.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d<rgba32float, write>;
+
+fn textureStore_2e6102() {
+  var arg_1 = vec2<u32>();
+  var arg_2 = vec4<f32>();
+  textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_2e6102();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_2e6102();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_2e6102();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/330b7c.wgsl b/test/tint/builtins/gen/var/textureStore/330b7c.wgsl
new file mode 100644
index 0000000..b5d2431
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/330b7c.wgsl
@@ -0,0 +1,47 @@
+// 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: u32, value: vec4<f32>)
+fn textureStore_330b7c() {
+  var arg_1 = vec2<u32>();
+  var arg_2 = 1u;
+  var arg_3 = vec4<f32>();
+  textureStore(arg_0, arg_1, arg_2, arg_3);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_330b7c();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_330b7c();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_330b7c();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/330b7c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/330b7c.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..a92e0d0
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/330b7c.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+RWTexture2DArray<float4> arg_0 : register(u0, space1);
+
+void textureStore_330b7c() {
+  uint2 arg_1 = (0u).xx;
+  uint arg_2 = 1u;
+  float4 arg_3 = (0.0f).xxxx;
+  arg_0[uint3(arg_1, arg_2)] = arg_3;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_330b7c();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_330b7c();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_330b7c();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/330b7c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/330b7c.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..a92e0d0
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/330b7c.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+RWTexture2DArray<float4> arg_0 : register(u0, space1);
+
+void textureStore_330b7c() {
+  uint2 arg_1 = (0u).xx;
+  uint arg_2 = 1u;
+  float4 arg_3 = (0.0f).xxxx;
+  arg_0[uint3(arg_1, arg_2)] = arg_3;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_330b7c();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_330b7c();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_330b7c();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/330b7c.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/330b7c.wgsl.expected.glsl
new file mode 100644
index 0000000..e6ed5cb
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/330b7c.wgsl.expected.glsl
@@ -0,0 +1,61 @@
+#version 310 es
+
+layout(rgba8) uniform highp writeonly image2DArray arg_0;
+void textureStore_330b7c() {
+  uvec2 arg_1 = uvec2(0u);
+  uint arg_2 = 1u;
+  vec4 arg_3 = vec4(0.0f);
+  imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3);
+}
+
+vec4 vertex_main() {
+  textureStore_330b7c();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = 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_330b7c() {
+  uvec2 arg_1 = uvec2(0u);
+  uint arg_2 = 1u;
+  vec4 arg_3 = vec4(0.0f);
+  imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3);
+}
+
+void fragment_main() {
+  textureStore_330b7c();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+layout(rgba8) uniform highp writeonly image2DArray arg_0;
+void textureStore_330b7c() {
+  uvec2 arg_1 = uvec2(0u);
+  uint arg_2 = 1u;
+  vec4 arg_3 = vec4(0.0f);
+  imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3);
+}
+
+void compute_main() {
+  textureStore_330b7c();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/330b7c.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/330b7c.wgsl.expected.msl
new file mode 100644
index 0000000..eca28c9
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/330b7c.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_330b7c(texture2d_array<float, access::write> tint_symbol_1) {
+  uint2 arg_1 = uint2(0u);
+  uint arg_2 = 1u;
+  float4 arg_3 = float4(0.0f);
+  tint_symbol_1.write(arg_3, uint2(arg_1), arg_2);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<float, access::write> tint_symbol_2) {
+  textureStore_330b7c(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_330b7c(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d_array<float, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureStore_330b7c(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureStore/330b7c.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/330b7c.wgsl.expected.spvasm
new file mode 100644
index 0000000..fcaad14
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/330b7c.wgsl.expected.spvasm
@@ -0,0 +1,92 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 50
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureStore_330b7c "textureStore_330b7c"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %arg_3 "arg_3"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 1 0 2 Rgba8
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %12 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+         %18 = OpConstantNull %v2uint
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %24 = OpConstantNull %uint
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+     %v3uint = OpTypeVector %uint 3
+         %36 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureStore_330b7c = OpFunction %void None %12
+         %15 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v2uint Function %18
+      %arg_2 = OpVariable %_ptr_Function_uint Function %24
+      %arg_3 = OpVariable %_ptr_Function_v4float Function %5
+               OpStore %arg_1 %18
+               OpStore %arg_2 %uint_1
+               OpStore %arg_3 %5
+         %28 = OpLoad %11 %arg_0
+         %30 = OpLoad %v2uint %arg_1
+         %31 = OpCompositeExtract %uint %30 0
+         %32 = OpCompositeExtract %uint %30 1
+         %33 = OpLoad %uint %arg_2
+         %34 = OpCompositeConstruct %v3uint %31 %32 %33
+         %35 = OpLoad %v4float %arg_3
+               OpImageWrite %28 %34 %35
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %36
+         %38 = OpLabel
+         %39 = OpFunctionCall %void %textureStore_330b7c
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+         %41 = OpLabel
+         %42 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %42
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+         %45 = OpLabel
+         %46 = OpFunctionCall %void %textureStore_330b7c
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %12
+         %48 = OpLabel
+         %49 = OpFunctionCall %void %textureStore_330b7c
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/330b7c.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/330b7c.wgsl.expected.wgsl
new file mode 100644
index 0000000..9770e41
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/330b7c.wgsl.expected.wgsl
@@ -0,0 +1,24 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba8unorm, write>;
+
+fn textureStore_330b7c() {
+  var arg_1 = vec2<u32>();
+  var arg_2 = 1u;
+  var arg_3 = vec4<f32>();
+  textureStore(arg_0, arg_1, arg_2, arg_3);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_330b7c();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_330b7c();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_330b7c();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/3c1937.wgsl b/test/tint/builtins/gen/var/textureStore/3c1937.wgsl
new file mode 100644
index 0000000..bffb6e2
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/3c1937.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_1d<rgba8uint, write>;
+
+// fn textureStore(texture: texture_storage_1d<rgba8uint, write>, coords: u32, value: vec4<u32>)
+fn textureStore_3c1937() {
+  var arg_1 = 1u;
+  var arg_2 = vec4<u32>();
+  textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_3c1937();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_3c1937();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_3c1937();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/3c1937.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/3c1937.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..19a9b7b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/3c1937.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture1D<uint4> arg_0 : register(u0, space1);
+
+void textureStore_3c1937() {
+  uint arg_1 = 1u;
+  uint4 arg_2 = (0u).xxxx;
+  arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_3c1937();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_3c1937();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_3c1937();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/3c1937.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/3c1937.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..19a9b7b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/3c1937.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture1D<uint4> arg_0 : register(u0, space1);
+
+void textureStore_3c1937() {
+  uint arg_1 = 1u;
+  uint4 arg_2 = (0u).xxxx;
+  arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_3c1937();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_3c1937();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_3c1937();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/3c1937.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/3c1937.wgsl.expected.glsl
new file mode 100644
index 0000000..13ee98a
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/3c1937.wgsl.expected.glsl
@@ -0,0 +1,84 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba8ui) uniform highp writeonly uimage1D arg_0;
+void textureStore_3c1937() {
+  uint arg_1 = 1u;
+  uvec4 arg_2 = uvec4(0u);
+  imageStore(arg_0, int(arg_1), arg_2);
+}
+
+vec4 vertex_main() {
+  textureStore_3c1937();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'uimage1D' : Reserved word. 
+WARNING: 0:3: 'layout' : useless application of layout qualifier 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+layout(rgba8ui) uniform highp writeonly uimage1D arg_0;
+void textureStore_3c1937() {
+  uint arg_1 = 1u;
+  uvec4 arg_2 = uvec4(0u);
+  imageStore(arg_0, int(arg_1), arg_2);
+}
+
+void fragment_main() {
+  textureStore_3c1937();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'uimage1D' : Reserved word. 
+WARNING: 0:4: 'layout' : useless application of layout qualifier 
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba8ui) uniform highp writeonly uimage1D arg_0;
+void textureStore_3c1937() {
+  uint arg_1 = 1u;
+  uvec4 arg_2 = uvec4(0u);
+  imageStore(arg_0, int(arg_1), arg_2);
+}
+
+void compute_main() {
+  textureStore_3c1937();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'uimage1D' : Reserved word. 
+WARNING: 0:3: 'layout' : useless application of layout qualifier 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureStore/3c1937.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/3c1937.wgsl.expected.msl
new file mode 100644
index 0000000..678f483
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/3c1937.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_3c1937(texture1d<uint, access::write> tint_symbol_1) {
+  uint arg_1 = 1u;
+  uint4 arg_2 = uint4(0u);
+  tint_symbol_1.write(arg_2, uint(arg_1));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<uint, access::write> tint_symbol_2) {
+  textureStore_3c1937(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<uint, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<uint, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureStore_3c1937(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture1d<uint, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureStore_3c1937(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureStore/3c1937.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/3c1937.wgsl.expected.spvasm
new file mode 100644
index 0000000..421d42f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/3c1937.wgsl.expected.spvasm
@@ -0,0 +1,84 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 43
+; Schema: 0
+               OpCapability Shader
+               OpCapability Image1D
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureStore_3c1937 "textureStore_3c1937"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 1D 0 0 0 2 Rgba8ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %20 = OpConstantNull %uint
+     %v4uint = OpTypeVector %uint 4
+         %22 = OpConstantNull %v4uint
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+         %29 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureStore_3c1937 = OpFunction %void None %13
+         %16 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_uint Function %20
+      %arg_2 = OpVariable %_ptr_Function_v4uint Function %22
+               OpStore %arg_1 %uint_1
+               OpStore %arg_2 %22
+         %26 = OpLoad %11 %arg_0
+         %27 = OpLoad %uint %arg_1
+         %28 = OpLoad %v4uint %arg_2
+               OpImageWrite %26 %27 %28
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %29
+         %31 = OpLabel
+         %32 = OpFunctionCall %void %textureStore_3c1937
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %34 = OpLabel
+         %35 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %35
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %38 = OpLabel
+         %39 = OpFunctionCall %void %textureStore_3c1937
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %41 = OpLabel
+         %42 = OpFunctionCall %void %textureStore_3c1937
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/3c1937.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/3c1937.wgsl.expected.wgsl
new file mode 100644
index 0000000..568e12c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/3c1937.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(0) var arg_0 : texture_storage_1d<rgba8uint, write>;
+
+fn textureStore_3c1937() {
+  var arg_1 = 1u;
+  var arg_2 = vec4<u32>();
+  textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_3c1937();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_3c1937();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_3c1937();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/3d6f01.wgsl b/test/tint/builtins/gen/var/textureStore/3d6f01.wgsl
new file mode 100644
index 0000000..dedb10e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/3d6f01.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_1d<rg32sint, write>;
+
+// fn textureStore(texture: texture_storage_1d<rg32sint, write>, coords: u32, value: vec4<i32>)
+fn textureStore_3d6f01() {
+  var arg_1 = 1u;
+  var arg_2 = vec4<i32>();
+  textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_3d6f01();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_3d6f01();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_3d6f01();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/3d6f01.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/3d6f01.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..6e3241b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/3d6f01.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture1D<int4> arg_0 : register(u0, space1);
+
+void textureStore_3d6f01() {
+  uint arg_1 = 1u;
+  int4 arg_2 = (0).xxxx;
+  arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_3d6f01();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_3d6f01();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_3d6f01();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/3d6f01.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/3d6f01.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..6e3241b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/3d6f01.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture1D<int4> arg_0 : register(u0, space1);
+
+void textureStore_3d6f01() {
+  uint arg_1 = 1u;
+  int4 arg_2 = (0).xxxx;
+  arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_3d6f01();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_3d6f01();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_3d6f01();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/3d6f01.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/3d6f01.wgsl.expected.glsl
new file mode 100644
index 0000000..ca32e2d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/3d6f01.wgsl.expected.glsl
@@ -0,0 +1,81 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rg32i) uniform highp writeonly iimage1D arg_0;
+void textureStore_3d6f01() {
+  uint arg_1 = 1u;
+  ivec4 arg_2 = ivec4(0);
+  imageStore(arg_0, int(arg_1), arg_2);
+}
+
+vec4 vertex_main() {
+  textureStore_3d6f01();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+layout(rg32i) uniform highp writeonly iimage1D arg_0;
+void textureStore_3d6f01() {
+  uint arg_1 = 1u;
+  ivec4 arg_2 = ivec4(0);
+  imageStore(arg_0, int(arg_1), arg_2);
+}
+
+void fragment_main() {
+  textureStore_3d6f01();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'image load-store format' : not supported with this profile: es
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rg32i) uniform highp writeonly iimage1D arg_0;
+void textureStore_3d6f01() {
+  uint arg_1 = 1u;
+  ivec4 arg_2 = ivec4(0);
+  imageStore(arg_0, int(arg_1), arg_2);
+}
+
+void compute_main() {
+  textureStore_3d6f01();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureStore/3d6f01.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/3d6f01.wgsl.expected.msl
new file mode 100644
index 0000000..1e29e6b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/3d6f01.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_3d6f01(texture1d<int, access::write> tint_symbol_1) {
+  uint arg_1 = 1u;
+  int4 arg_2 = int4(0);
+  tint_symbol_1.write(arg_2, uint(arg_1));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<int, access::write> tint_symbol_2) {
+  textureStore_3d6f01(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<int, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<int, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureStore_3d6f01(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture1d<int, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureStore_3d6f01(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureStore/3d6f01.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/3d6f01.wgsl.expected.spvasm
new file mode 100644
index 0000000..ea91368
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/3d6f01.wgsl.expected.spvasm
@@ -0,0 +1,86 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 44
+; Schema: 0
+               OpCapability Shader
+               OpCapability Image1D
+               OpCapability StorageImageExtendedFormats
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureStore_3d6f01 "textureStore_3d6f01"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 1D 0 0 0 2 Rg32i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %21 = OpConstantNull %uint
+      %v4int = OpTypeVector %int 4
+         %23 = OpConstantNull %v4int
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+         %30 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureStore_3d6f01 = OpFunction %void None %13
+         %16 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_uint Function %21
+      %arg_2 = OpVariable %_ptr_Function_v4int Function %23
+               OpStore %arg_1 %uint_1
+               OpStore %arg_2 %23
+         %27 = OpLoad %11 %arg_0
+         %28 = OpLoad %uint %arg_1
+         %29 = OpLoad %v4int %arg_2
+               OpImageWrite %27 %28 %29
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %30
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %textureStore_3d6f01
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %35 = OpLabel
+         %36 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %36
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %39 = OpLabel
+         %40 = OpFunctionCall %void %textureStore_3d6f01
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %42 = OpLabel
+         %43 = OpFunctionCall %void %textureStore_3d6f01
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/3d6f01.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/3d6f01.wgsl.expected.wgsl
new file mode 100644
index 0000000..693801c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/3d6f01.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(0) var arg_0 : texture_storage_1d<rg32sint, write>;
+
+fn textureStore_3d6f01() {
+  var arg_1 = 1u;
+  var arg_2 = vec4<i32>();
+  textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_3d6f01();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_3d6f01();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_3d6f01();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/40c455.wgsl b/test/tint/builtins/gen/var/textureStore/40c455.wgsl
new file mode 100644
index 0000000..29f4059
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/40c455.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d<rgba8snorm, write>;
+
+// fn textureStore(texture: texture_storage_2d<rgba8snorm, write>, coords: vec2<u32>, value: vec4<f32>)
+fn textureStore_40c455() {
+  var arg_1 = vec2<u32>();
+  var arg_2 = vec4<f32>();
+  textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_40c455();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_40c455();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_40c455();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/40c455.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/40c455.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..5d607d2
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/40c455.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture2D<float4> arg_0 : register(u0, space1);
+
+void textureStore_40c455() {
+  uint2 arg_1 = (0u).xx;
+  float4 arg_2 = (0.0f).xxxx;
+  arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_40c455();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_40c455();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_40c455();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/40c455.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/40c455.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..5d607d2
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/40c455.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture2D<float4> arg_0 : register(u0, space1);
+
+void textureStore_40c455() {
+  uint2 arg_1 = (0u).xx;
+  float4 arg_2 = (0.0f).xxxx;
+  arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_40c455();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_40c455();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_40c455();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/40c455.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/40c455.wgsl.expected.glsl
new file mode 100644
index 0000000..4ae299e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/40c455.wgsl.expected.glsl
@@ -0,0 +1,58 @@
+#version 310 es
+
+layout(rgba8_snorm) uniform highp writeonly image2D arg_0;
+void textureStore_40c455() {
+  uvec2 arg_1 = uvec2(0u);
+  vec4 arg_2 = vec4(0.0f);
+  imageStore(arg_0, ivec2(arg_1), arg_2);
+}
+
+vec4 vertex_main() {
+  textureStore_40c455();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+layout(rgba8_snorm) uniform highp writeonly image2D arg_0;
+void textureStore_40c455() {
+  uvec2 arg_1 = uvec2(0u);
+  vec4 arg_2 = vec4(0.0f);
+  imageStore(arg_0, ivec2(arg_1), arg_2);
+}
+
+void fragment_main() {
+  textureStore_40c455();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+layout(rgba8_snorm) uniform highp writeonly image2D arg_0;
+void textureStore_40c455() {
+  uvec2 arg_1 = uvec2(0u);
+  vec4 arg_2 = vec4(0.0f);
+  imageStore(arg_0, ivec2(arg_1), arg_2);
+}
+
+void compute_main() {
+  textureStore_40c455();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/40c455.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/40c455.wgsl.expected.msl
new file mode 100644
index 0000000..477b39a
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/40c455.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_40c455(texture2d<float, access::write> tint_symbol_1) {
+  uint2 arg_1 = uint2(0u);
+  float4 arg_2 = float4(0.0f);
+  tint_symbol_1.write(arg_2, uint2(arg_1));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<float, access::write> tint_symbol_2) {
+  textureStore_40c455(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<float, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<float, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureStore_40c455(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d<float, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureStore_40c455(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureStore/40c455.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/40c455.wgsl.expected.spvasm
new file mode 100644
index 0000000..91daa0a
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/40c455.wgsl.expected.spvasm
@@ -0,0 +1,81 @@
+; 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_40c455 "textureStore_40c455"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 0 0 2 Rgba8Snorm
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %12 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+         %18 = OpConstantNull %v2uint
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+         %27 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureStore_40c455 = OpFunction %void None %12
+         %15 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v2uint Function %18
+      %arg_2 = OpVariable %_ptr_Function_v4float Function %5
+               OpStore %arg_1 %18
+               OpStore %arg_2 %5
+         %24 = OpLoad %11 %arg_0
+         %25 = OpLoad %v2uint %arg_1
+         %26 = OpLoad %v4float %arg_2
+               OpImageWrite %24 %25 %26
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %27
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %textureStore_40c455
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+         %32 = OpLabel
+         %33 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %33
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %textureStore_40c455
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %12
+         %39 = OpLabel
+         %40 = OpFunctionCall %void %textureStore_40c455
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/40c455.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/40c455.wgsl.expected.wgsl
new file mode 100644
index 0000000..6a50679
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/40c455.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d<rgba8snorm, write>;
+
+fn textureStore_40c455() {
+  var arg_1 = vec2<u32>();
+  var arg_2 = vec4<f32>();
+  textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_40c455();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_40c455();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_40c455();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/4288fc.wgsl b/test/tint/builtins/gen/var/textureStore/4288fc.wgsl
new file mode 100644
index 0000000..b62f964
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/4288fc.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_3d<r32float, write>;
+
+// fn textureStore(texture: texture_storage_3d<r32float, write>, coords: vec3<u32>, value: vec4<f32>)
+fn textureStore_4288fc() {
+  var arg_1 = vec3<u32>();
+  var arg_2 = vec4<f32>();
+  textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_4288fc();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_4288fc();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_4288fc();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/4288fc.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/4288fc.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..bb76511
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/4288fc.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture3D<float4> arg_0 : register(u0, space1);
+
+void textureStore_4288fc() {
+  uint3 arg_1 = (0u).xxx;
+  float4 arg_2 = (0.0f).xxxx;
+  arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_4288fc();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_4288fc();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_4288fc();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/4288fc.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/4288fc.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..bb76511
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/4288fc.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture3D<float4> arg_0 : register(u0, space1);
+
+void textureStore_4288fc() {
+  uint3 arg_1 = (0u).xxx;
+  float4 arg_2 = (0.0f).xxxx;
+  arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_4288fc();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_4288fc();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_4288fc();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/4288fc.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/4288fc.wgsl.expected.glsl
new file mode 100644
index 0000000..0b46698
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/4288fc.wgsl.expected.glsl
@@ -0,0 +1,58 @@
+#version 310 es
+
+layout(r32f) uniform highp writeonly image3D arg_0;
+void textureStore_4288fc() {
+  uvec3 arg_1 = uvec3(0u);
+  vec4 arg_2 = vec4(0.0f);
+  imageStore(arg_0, ivec3(arg_1), arg_2);
+}
+
+vec4 vertex_main() {
+  textureStore_4288fc();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+layout(r32f) uniform highp writeonly image3D arg_0;
+void textureStore_4288fc() {
+  uvec3 arg_1 = uvec3(0u);
+  vec4 arg_2 = vec4(0.0f);
+  imageStore(arg_0, ivec3(arg_1), arg_2);
+}
+
+void fragment_main() {
+  textureStore_4288fc();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+layout(r32f) uniform highp writeonly image3D arg_0;
+void textureStore_4288fc() {
+  uvec3 arg_1 = uvec3(0u);
+  vec4 arg_2 = vec4(0.0f);
+  imageStore(arg_0, ivec3(arg_1), arg_2);
+}
+
+void compute_main() {
+  textureStore_4288fc();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/4288fc.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/4288fc.wgsl.expected.msl
new file mode 100644
index 0000000..578e1f8
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/4288fc.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_4288fc(texture3d<float, access::write> tint_symbol_1) {
+  uint3 arg_1 = uint3(0u);
+  float4 arg_2 = float4(0.0f);
+  tint_symbol_1.write(arg_2, uint3(arg_1));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<float, access::write> tint_symbol_2) {
+  textureStore_4288fc(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<float, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture3d<float, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureStore_4288fc(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture3d<float, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureStore_4288fc(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureStore/4288fc.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/4288fc.wgsl.expected.spvasm
new file mode 100644
index 0000000..78e13c6
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/4288fc.wgsl.expected.spvasm
@@ -0,0 +1,81 @@
+; 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_4288fc "textureStore_4288fc"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 3D 0 0 0 2 R32f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %12 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v3uint = OpTypeVector %uint 3
+         %18 = OpConstantNull %v3uint
+%_ptr_Function_v3uint = OpTypePointer Function %v3uint
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+         %27 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureStore_4288fc = OpFunction %void None %12
+         %15 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v3uint Function %18
+      %arg_2 = OpVariable %_ptr_Function_v4float Function %5
+               OpStore %arg_1 %18
+               OpStore %arg_2 %5
+         %24 = OpLoad %11 %arg_0
+         %25 = OpLoad %v3uint %arg_1
+         %26 = OpLoad %v4float %arg_2
+               OpImageWrite %24 %25 %26
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %27
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %textureStore_4288fc
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+         %32 = OpLabel
+         %33 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %33
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %textureStore_4288fc
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %12
+         %39 = OpLabel
+         %40 = OpFunctionCall %void %textureStore_4288fc
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/4288fc.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/4288fc.wgsl.expected.wgsl
new file mode 100644
index 0000000..15e7b21
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/4288fc.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(0) var arg_0 : texture_storage_3d<r32float, write>;
+
+fn textureStore_4288fc() {
+  var arg_1 = vec3<u32>();
+  var arg_2 = vec4<f32>();
+  textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_4288fc();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_4288fc();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_4288fc();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/486500.wgsl b/test/tint/builtins/gen/var/textureStore/486500.wgsl
new file mode 100644
index 0000000..c0353f2
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/486500.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_3d<rgba32sint, write>;
+
+// fn textureStore(texture: texture_storage_3d<rgba32sint, write>, coords: vec3<u32>, value: vec4<i32>)
+fn textureStore_486500() {
+  var arg_1 = vec3<u32>();
+  var arg_2 = vec4<i32>();
+  textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_486500();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_486500();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_486500();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/486500.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/486500.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..021c55c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/486500.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture3D<int4> arg_0 : register(u0, space1);
+
+void textureStore_486500() {
+  uint3 arg_1 = (0u).xxx;
+  int4 arg_2 = (0).xxxx;
+  arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_486500();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_486500();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_486500();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/486500.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/486500.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..021c55c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/486500.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture3D<int4> arg_0 : register(u0, space1);
+
+void textureStore_486500() {
+  uint3 arg_1 = (0u).xxx;
+  int4 arg_2 = (0).xxxx;
+  arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_486500();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_486500();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_486500();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/486500.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/486500.wgsl.expected.glsl
new file mode 100644
index 0000000..5dd0af7
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/486500.wgsl.expected.glsl
@@ -0,0 +1,58 @@
+#version 310 es
+
+layout(rgba32i) uniform highp writeonly iimage3D arg_0;
+void textureStore_486500() {
+  uvec3 arg_1 = uvec3(0u);
+  ivec4 arg_2 = ivec4(0);
+  imageStore(arg_0, ivec3(arg_1), arg_2);
+}
+
+vec4 vertex_main() {
+  textureStore_486500();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+layout(rgba32i) uniform highp writeonly iimage3D arg_0;
+void textureStore_486500() {
+  uvec3 arg_1 = uvec3(0u);
+  ivec4 arg_2 = ivec4(0);
+  imageStore(arg_0, ivec3(arg_1), arg_2);
+}
+
+void fragment_main() {
+  textureStore_486500();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+layout(rgba32i) uniform highp writeonly iimage3D arg_0;
+void textureStore_486500() {
+  uvec3 arg_1 = uvec3(0u);
+  ivec4 arg_2 = ivec4(0);
+  imageStore(arg_0, ivec3(arg_1), arg_2);
+}
+
+void compute_main() {
+  textureStore_486500();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/486500.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/486500.wgsl.expected.msl
new file mode 100644
index 0000000..0a5e6da
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/486500.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_486500(texture3d<int, access::write> tint_symbol_1) {
+  uint3 arg_1 = uint3(0u);
+  int4 arg_2 = int4(0);
+  tint_symbol_1.write(arg_2, uint3(arg_1));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<int, access::write> tint_symbol_2) {
+  textureStore_486500(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<int, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture3d<int, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureStore_486500(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture3d<int, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureStore_486500(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureStore/486500.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/486500.wgsl.expected.spvasm
new file mode 100644
index 0000000..7b219df
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/486500.wgsl.expected.spvasm
@@ -0,0 +1,84 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 44
+; 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_486500 "textureStore_486500"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 3D 0 0 0 2 Rgba32i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v3uint = OpTypeVector %uint 3
+         %19 = OpConstantNull %v3uint
+%_ptr_Function_v3uint = OpTypePointer Function %v3uint
+      %v4int = OpTypeVector %int 4
+         %23 = OpConstantNull %v4int
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+         %30 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureStore_486500 = OpFunction %void None %13
+         %16 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v3uint Function %19
+      %arg_2 = OpVariable %_ptr_Function_v4int Function %23
+               OpStore %arg_1 %19
+               OpStore %arg_2 %23
+         %27 = OpLoad %11 %arg_0
+         %28 = OpLoad %v3uint %arg_1
+         %29 = OpLoad %v4int %arg_2
+               OpImageWrite %27 %28 %29
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %30
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %textureStore_486500
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %35 = OpLabel
+         %36 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %36
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %39 = OpLabel
+         %40 = OpFunctionCall %void %textureStore_486500
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %42 = OpLabel
+         %43 = OpFunctionCall %void %textureStore_486500
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/486500.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/486500.wgsl.expected.wgsl
new file mode 100644
index 0000000..8a03a81
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/486500.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(0) var arg_0 : texture_storage_3d<rgba32sint, write>;
+
+fn textureStore_486500() {
+  var arg_1 = vec3<u32>();
+  var arg_2 = vec4<i32>();
+  textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_486500();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_486500();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_486500();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/4c454f.wgsl b/test/tint/builtins/gen/var/textureStore/4c454f.wgsl
new file mode 100644
index 0000000..940719b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/4c454f.wgsl
@@ -0,0 +1,47 @@
+// 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: u32, value: vec4<i32>)
+fn textureStore_4c454f() {
+  var arg_1 = vec2<u32>();
+  var arg_2 = 1u;
+  var arg_3 = vec4<i32>();
+  textureStore(arg_0, arg_1, arg_2, arg_3);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_4c454f();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_4c454f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_4c454f();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/4c454f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/4c454f.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..0fcd9a8
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/4c454f.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+RWTexture2DArray<int4> arg_0 : register(u0, space1);
+
+void textureStore_4c454f() {
+  uint2 arg_1 = (0u).xx;
+  uint arg_2 = 1u;
+  int4 arg_3 = (0).xxxx;
+  arg_0[uint3(arg_1, arg_2)] = arg_3;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_4c454f();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_4c454f();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_4c454f();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/4c454f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/4c454f.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..0fcd9a8
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/4c454f.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+RWTexture2DArray<int4> arg_0 : register(u0, space1);
+
+void textureStore_4c454f() {
+  uint2 arg_1 = (0u).xx;
+  uint arg_2 = 1u;
+  int4 arg_3 = (0).xxxx;
+  arg_0[uint3(arg_1, arg_2)] = arg_3;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_4c454f();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_4c454f();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_4c454f();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/4c454f.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/4c454f.wgsl.expected.glsl
new file mode 100644
index 0000000..941cf5f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/4c454f.wgsl.expected.glsl
@@ -0,0 +1,84 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rg32i) uniform highp writeonly iimage2DArray arg_0;
+void textureStore_4c454f() {
+  uvec2 arg_1 = uvec2(0u);
+  uint arg_2 = 1u;
+  ivec4 arg_3 = ivec4(0);
+  imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3);
+}
+
+vec4 vertex_main() {
+  textureStore_4c454f();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  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_4c454f() {
+  uvec2 arg_1 = uvec2(0u);
+  uint arg_2 = 1u;
+  ivec4 arg_3 = ivec4(0);
+  imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3);
+}
+
+void fragment_main() {
+  textureStore_4c454f();
+}
+
+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_4c454f() {
+  uvec2 arg_1 = uvec2(0u);
+  uint arg_2 = 1u;
+  ivec4 arg_3 = ivec4(0);
+  imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3);
+}
+
+void compute_main() {
+  textureStore_4c454f();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureStore/4c454f.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/4c454f.wgsl.expected.msl
new file mode 100644
index 0000000..03846dc
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/4c454f.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_4c454f(texture2d_array<int, access::write> tint_symbol_1) {
+  uint2 arg_1 = uint2(0u);
+  uint arg_2 = 1u;
+  int4 arg_3 = int4(0);
+  tint_symbol_1.write(arg_3, uint2(arg_1), arg_2);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<int, access::write> tint_symbol_2) {
+  textureStore_4c454f(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_4c454f(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d_array<int, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureStore_4c454f(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureStore/4c454f.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/4c454f.wgsl.expected.spvasm
new file mode 100644
index 0000000..39e9b43
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/4c454f.wgsl.expected.spvasm
@@ -0,0 +1,96 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 53
+; 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_4c454f "textureStore_4c454f"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %arg_3 "arg_3"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 2D 0 1 0 2 Rg32i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+         %19 = OpConstantNull %v2uint
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %25 = OpConstantNull %uint
+      %v4int = OpTypeVector %int 4
+         %27 = OpConstantNull %v4int
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+     %v3uint = OpTypeVector %uint 3
+         %39 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureStore_4c454f = OpFunction %void None %13
+         %16 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v2uint Function %19
+      %arg_2 = OpVariable %_ptr_Function_uint Function %25
+      %arg_3 = OpVariable %_ptr_Function_v4int Function %27
+               OpStore %arg_1 %19
+               OpStore %arg_2 %uint_1
+               OpStore %arg_3 %27
+         %31 = OpLoad %11 %arg_0
+         %33 = OpLoad %v2uint %arg_1
+         %34 = OpCompositeExtract %uint %33 0
+         %35 = OpCompositeExtract %uint %33 1
+         %36 = OpLoad %uint %arg_2
+         %37 = OpCompositeConstruct %v3uint %34 %35 %36
+         %38 = OpLoad %v4int %arg_3
+               OpImageWrite %31 %37 %38
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %39
+         %41 = OpLabel
+         %42 = OpFunctionCall %void %textureStore_4c454f
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %44 = OpLabel
+         %45 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %45
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %48 = OpLabel
+         %49 = OpFunctionCall %void %textureStore_4c454f
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %51 = OpLabel
+         %52 = OpFunctionCall %void %textureStore_4c454f
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/4c454f.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/4c454f.wgsl.expected.wgsl
new file mode 100644
index 0000000..59de4ec
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/4c454f.wgsl.expected.wgsl
@@ -0,0 +1,24 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rg32sint, write>;
+
+fn textureStore_4c454f() {
+  var arg_1 = vec2<u32>();
+  var arg_2 = 1u;
+  var arg_3 = vec4<i32>();
+  textureStore(arg_0, arg_1, arg_2, arg_3);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_4c454f();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_4c454f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_4c454f();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/506a71.wgsl b/test/tint/builtins/gen/var/textureStore/506a71.wgsl
new file mode 100644
index 0000000..bea26ba
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/506a71.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d<rg32uint, write>;
+
+// fn textureStore(texture: texture_storage_2d<rg32uint, write>, coords: vec2<u32>, value: vec4<u32>)
+fn textureStore_506a71() {
+  var arg_1 = vec2<u32>();
+  var arg_2 = vec4<u32>();
+  textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_506a71();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_506a71();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_506a71();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/506a71.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/506a71.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..f75271e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/506a71.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture2D<uint4> arg_0 : register(u0, space1);
+
+void textureStore_506a71() {
+  uint2 arg_1 = (0u).xx;
+  uint4 arg_2 = (0u).xxxx;
+  arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_506a71();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_506a71();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_506a71();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/506a71.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/506a71.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..f75271e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/506a71.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture2D<uint4> arg_0 : register(u0, space1);
+
+void textureStore_506a71() {
+  uint2 arg_1 = (0u).xx;
+  uint4 arg_2 = (0u).xxxx;
+  arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_506a71();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_506a71();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_506a71();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/506a71.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/506a71.wgsl.expected.glsl
new file mode 100644
index 0000000..c8f958a
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/506a71.wgsl.expected.glsl
@@ -0,0 +1,81 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rg32ui) uniform highp writeonly uimage2D arg_0;
+void textureStore_506a71() {
+  uvec2 arg_1 = uvec2(0u);
+  uvec4 arg_2 = uvec4(0u);
+  imageStore(arg_0, ivec2(arg_1), arg_2);
+}
+
+vec4 vertex_main() {
+  textureStore_506a71();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+layout(rg32ui) uniform highp writeonly uimage2D arg_0;
+void textureStore_506a71() {
+  uvec2 arg_1 = uvec2(0u);
+  uvec4 arg_2 = uvec4(0u);
+  imageStore(arg_0, ivec2(arg_1), arg_2);
+}
+
+void fragment_main() {
+  textureStore_506a71();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'image load-store format' : not supported with this profile: es
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rg32ui) uniform highp writeonly uimage2D arg_0;
+void textureStore_506a71() {
+  uvec2 arg_1 = uvec2(0u);
+  uvec4 arg_2 = uvec4(0u);
+  imageStore(arg_0, ivec2(arg_1), arg_2);
+}
+
+void compute_main() {
+  textureStore_506a71();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureStore/506a71.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/506a71.wgsl.expected.msl
new file mode 100644
index 0000000..1e20709
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/506a71.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_506a71(texture2d<uint, access::write> tint_symbol_1) {
+  uint2 arg_1 = uint2(0u);
+  uint4 arg_2 = uint4(0u);
+  tint_symbol_1.write(arg_2, uint2(arg_1));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<uint, access::write> tint_symbol_2) {
+  textureStore_506a71(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<uint, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<uint, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureStore_506a71(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d<uint, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureStore_506a71(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureStore/506a71.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/506a71.wgsl.expected.spvasm
new file mode 100644
index 0000000..1f5a9ed
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/506a71.wgsl.expected.spvasm
@@ -0,0 +1,84 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 43
+; 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_506a71 "textureStore_506a71"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 2D 0 0 0 2 Rg32ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+     %v2uint = OpTypeVector %uint 2
+         %18 = OpConstantNull %v2uint
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+     %v4uint = OpTypeVector %uint 4
+         %22 = OpConstantNull %v4uint
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+         %29 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureStore_506a71 = OpFunction %void None %13
+         %16 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v2uint Function %18
+      %arg_2 = OpVariable %_ptr_Function_v4uint Function %22
+               OpStore %arg_1 %18
+               OpStore %arg_2 %22
+         %26 = OpLoad %11 %arg_0
+         %27 = OpLoad %v2uint %arg_1
+         %28 = OpLoad %v4uint %arg_2
+               OpImageWrite %26 %27 %28
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %29
+         %31 = OpLabel
+         %32 = OpFunctionCall %void %textureStore_506a71
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %34 = OpLabel
+         %35 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %35
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %38 = OpLabel
+         %39 = OpFunctionCall %void %textureStore_506a71
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %41 = OpLabel
+         %42 = OpFunctionCall %void %textureStore_506a71
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/506a71.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/506a71.wgsl.expected.wgsl
new file mode 100644
index 0000000..476f5e7
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/506a71.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d<rg32uint, write>;
+
+fn textureStore_506a71() {
+  var arg_1 = vec2<u32>();
+  var arg_2 = vec4<u32>();
+  textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_506a71();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_506a71();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_506a71();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/52f503.wgsl b/test/tint/builtins/gen/var/textureStore/52f503.wgsl
new file mode 100644
index 0000000..d2c793f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/52f503.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d<rgba32sint, write>;
+
+// fn textureStore(texture: texture_storage_2d<rgba32sint, write>, coords: vec2<u32>, value: vec4<i32>)
+fn textureStore_52f503() {
+  var arg_1 = vec2<u32>();
+  var arg_2 = vec4<i32>();
+  textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_52f503();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_52f503();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_52f503();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/52f503.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/52f503.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..04d3b35
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/52f503.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture2D<int4> arg_0 : register(u0, space1);
+
+void textureStore_52f503() {
+  uint2 arg_1 = (0u).xx;
+  int4 arg_2 = (0).xxxx;
+  arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_52f503();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_52f503();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_52f503();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/52f503.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/52f503.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..04d3b35
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/52f503.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture2D<int4> arg_0 : register(u0, space1);
+
+void textureStore_52f503() {
+  uint2 arg_1 = (0u).xx;
+  int4 arg_2 = (0).xxxx;
+  arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_52f503();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_52f503();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_52f503();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/52f503.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/52f503.wgsl.expected.glsl
new file mode 100644
index 0000000..c606352
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/52f503.wgsl.expected.glsl
@@ -0,0 +1,58 @@
+#version 310 es
+
+layout(rgba32i) uniform highp writeonly iimage2D arg_0;
+void textureStore_52f503() {
+  uvec2 arg_1 = uvec2(0u);
+  ivec4 arg_2 = ivec4(0);
+  imageStore(arg_0, ivec2(arg_1), arg_2);
+}
+
+vec4 vertex_main() {
+  textureStore_52f503();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+layout(rgba32i) uniform highp writeonly iimage2D arg_0;
+void textureStore_52f503() {
+  uvec2 arg_1 = uvec2(0u);
+  ivec4 arg_2 = ivec4(0);
+  imageStore(arg_0, ivec2(arg_1), arg_2);
+}
+
+void fragment_main() {
+  textureStore_52f503();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+layout(rgba32i) uniform highp writeonly iimage2D arg_0;
+void textureStore_52f503() {
+  uvec2 arg_1 = uvec2(0u);
+  ivec4 arg_2 = ivec4(0);
+  imageStore(arg_0, ivec2(arg_1), arg_2);
+}
+
+void compute_main() {
+  textureStore_52f503();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/52f503.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/52f503.wgsl.expected.msl
new file mode 100644
index 0000000..7bdcade
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/52f503.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_52f503(texture2d<int, access::write> tint_symbol_1) {
+  uint2 arg_1 = uint2(0u);
+  int4 arg_2 = int4(0);
+  tint_symbol_1.write(arg_2, uint2(arg_1));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<int, access::write> tint_symbol_2) {
+  textureStore_52f503(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<int, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<int, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureStore_52f503(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d<int, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureStore_52f503(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureStore/52f503.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/52f503.wgsl.expected.spvasm
new file mode 100644
index 0000000..73053df
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/52f503.wgsl.expected.spvasm
@@ -0,0 +1,84 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 44
+; 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_52f503 "textureStore_52f503"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 2D 0 0 0 2 Rgba32i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+         %19 = OpConstantNull %v2uint
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+      %v4int = OpTypeVector %int 4
+         %23 = OpConstantNull %v4int
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+         %30 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureStore_52f503 = OpFunction %void None %13
+         %16 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v2uint Function %19
+      %arg_2 = OpVariable %_ptr_Function_v4int Function %23
+               OpStore %arg_1 %19
+               OpStore %arg_2 %23
+         %27 = OpLoad %11 %arg_0
+         %28 = OpLoad %v2uint %arg_1
+         %29 = OpLoad %v4int %arg_2
+               OpImageWrite %27 %28 %29
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %30
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %textureStore_52f503
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %35 = OpLabel
+         %36 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %36
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %39 = OpLabel
+         %40 = OpFunctionCall %void %textureStore_52f503
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %42 = OpLabel
+         %43 = OpFunctionCall %void %textureStore_52f503
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/52f503.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/52f503.wgsl.expected.wgsl
new file mode 100644
index 0000000..e313fcc
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/52f503.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d<rgba32sint, write>;
+
+fn textureStore_52f503() {
+  var arg_1 = vec2<u32>();
+  var arg_2 = vec4<i32>();
+  textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_52f503();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_52f503();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_52f503();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/5841f8.wgsl b/test/tint/builtins/gen/var/textureStore/5841f8.wgsl
new file mode 100644
index 0000000..3aaeaa0
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/5841f8.wgsl
@@ -0,0 +1,47 @@
+// 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: u32, value: vec4<f32>)
+fn textureStore_5841f8() {
+  var arg_1 = vec2<u32>();
+  var arg_2 = 1u;
+  var arg_3 = vec4<f32>();
+  textureStore(arg_0, arg_1, arg_2, arg_3);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_5841f8();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_5841f8();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_5841f8();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/5841f8.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/5841f8.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..a823f25
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/5841f8.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+RWTexture2DArray<float4> arg_0 : register(u0, space1);
+
+void textureStore_5841f8() {
+  uint2 arg_1 = (0u).xx;
+  uint arg_2 = 1u;
+  float4 arg_3 = (0.0f).xxxx;
+  arg_0[uint3(arg_1, arg_2)] = arg_3;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_5841f8();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_5841f8();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_5841f8();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/5841f8.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/5841f8.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..a823f25
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/5841f8.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+RWTexture2DArray<float4> arg_0 : register(u0, space1);
+
+void textureStore_5841f8() {
+  uint2 arg_1 = (0u).xx;
+  uint arg_2 = 1u;
+  float4 arg_3 = (0.0f).xxxx;
+  arg_0[uint3(arg_1, arg_2)] = arg_3;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_5841f8();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_5841f8();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_5841f8();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/5841f8.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/5841f8.wgsl.expected.glsl
new file mode 100644
index 0000000..ae1b777
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/5841f8.wgsl.expected.glsl
@@ -0,0 +1,61 @@
+#version 310 es
+
+layout(rgba32f) uniform highp writeonly image2DArray arg_0;
+void textureStore_5841f8() {
+  uvec2 arg_1 = uvec2(0u);
+  uint arg_2 = 1u;
+  vec4 arg_3 = vec4(0.0f);
+  imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3);
+}
+
+vec4 vertex_main() {
+  textureStore_5841f8();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = 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_5841f8() {
+  uvec2 arg_1 = uvec2(0u);
+  uint arg_2 = 1u;
+  vec4 arg_3 = vec4(0.0f);
+  imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3);
+}
+
+void fragment_main() {
+  textureStore_5841f8();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+layout(rgba32f) uniform highp writeonly image2DArray arg_0;
+void textureStore_5841f8() {
+  uvec2 arg_1 = uvec2(0u);
+  uint arg_2 = 1u;
+  vec4 arg_3 = vec4(0.0f);
+  imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3);
+}
+
+void compute_main() {
+  textureStore_5841f8();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/5841f8.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/5841f8.wgsl.expected.msl
new file mode 100644
index 0000000..7f3b6ae
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/5841f8.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_5841f8(texture2d_array<float, access::write> tint_symbol_1) {
+  uint2 arg_1 = uint2(0u);
+  uint arg_2 = 1u;
+  float4 arg_3 = float4(0.0f);
+  tint_symbol_1.write(arg_3, uint2(arg_1), arg_2);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<float, access::write> tint_symbol_2) {
+  textureStore_5841f8(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_5841f8(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d_array<float, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureStore_5841f8(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureStore/5841f8.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/5841f8.wgsl.expected.spvasm
new file mode 100644
index 0000000..ad31cfd
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/5841f8.wgsl.expected.spvasm
@@ -0,0 +1,92 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 50
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureStore_5841f8 "textureStore_5841f8"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %arg_3 "arg_3"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 1 0 2 Rgba32f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %12 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+         %18 = OpConstantNull %v2uint
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %24 = OpConstantNull %uint
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+     %v3uint = OpTypeVector %uint 3
+         %36 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureStore_5841f8 = OpFunction %void None %12
+         %15 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v2uint Function %18
+      %arg_2 = OpVariable %_ptr_Function_uint Function %24
+      %arg_3 = OpVariable %_ptr_Function_v4float Function %5
+               OpStore %arg_1 %18
+               OpStore %arg_2 %uint_1
+               OpStore %arg_3 %5
+         %28 = OpLoad %11 %arg_0
+         %30 = OpLoad %v2uint %arg_1
+         %31 = OpCompositeExtract %uint %30 0
+         %32 = OpCompositeExtract %uint %30 1
+         %33 = OpLoad %uint %arg_2
+         %34 = OpCompositeConstruct %v3uint %31 %32 %33
+         %35 = OpLoad %v4float %arg_3
+               OpImageWrite %28 %34 %35
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %36
+         %38 = OpLabel
+         %39 = OpFunctionCall %void %textureStore_5841f8
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+         %41 = OpLabel
+         %42 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %42
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+         %45 = OpLabel
+         %46 = OpFunctionCall %void %textureStore_5841f8
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %12
+         %48 = OpLabel
+         %49 = OpFunctionCall %void %textureStore_5841f8
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/5841f8.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/5841f8.wgsl.expected.wgsl
new file mode 100644
index 0000000..6e57d8d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/5841f8.wgsl.expected.wgsl
@@ -0,0 +1,24 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba32float, write>;
+
+fn textureStore_5841f8() {
+  var arg_1 = vec2<u32>();
+  var arg_2 = 1u;
+  var arg_3 = vec4<f32>();
+  textureStore(arg_0, arg_1, arg_2, arg_3);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_5841f8();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_5841f8();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_5841f8();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/5bc4f3.wgsl b/test/tint/builtins/gen/var/textureStore/5bc4f3.wgsl
new file mode 100644
index 0000000..12d19f5
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/5bc4f3.wgsl
@@ -0,0 +1,47 @@
+// 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: u32, value: vec4<u32>)
+fn textureStore_5bc4f3() {
+  var arg_1 = vec2<u32>();
+  var arg_2 = 1u;
+  var arg_3 = vec4<u32>();
+  textureStore(arg_0, arg_1, arg_2, arg_3);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_5bc4f3();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_5bc4f3();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_5bc4f3();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/5bc4f3.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/5bc4f3.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..fb3394f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/5bc4f3.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+RWTexture2DArray<uint4> arg_0 : register(u0, space1);
+
+void textureStore_5bc4f3() {
+  uint2 arg_1 = (0u).xx;
+  uint arg_2 = 1u;
+  uint4 arg_3 = (0u).xxxx;
+  arg_0[uint3(arg_1, arg_2)] = arg_3;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_5bc4f3();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_5bc4f3();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_5bc4f3();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/5bc4f3.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/5bc4f3.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..fb3394f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/5bc4f3.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+RWTexture2DArray<uint4> arg_0 : register(u0, space1);
+
+void textureStore_5bc4f3() {
+  uint2 arg_1 = (0u).xx;
+  uint arg_2 = 1u;
+  uint4 arg_3 = (0u).xxxx;
+  arg_0[uint3(arg_1, arg_2)] = arg_3;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_5bc4f3();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_5bc4f3();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_5bc4f3();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/5bc4f3.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/5bc4f3.wgsl.expected.glsl
new file mode 100644
index 0000000..cedf8d3
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/5bc4f3.wgsl.expected.glsl
@@ -0,0 +1,84 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rg32ui) uniform highp writeonly uimage2DArray arg_0;
+void textureStore_5bc4f3() {
+  uvec2 arg_1 = uvec2(0u);
+  uint arg_2 = 1u;
+  uvec4 arg_3 = uvec4(0u);
+  imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3);
+}
+
+vec4 vertex_main() {
+  textureStore_5bc4f3();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  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_5bc4f3() {
+  uvec2 arg_1 = uvec2(0u);
+  uint arg_2 = 1u;
+  uvec4 arg_3 = uvec4(0u);
+  imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3);
+}
+
+void fragment_main() {
+  textureStore_5bc4f3();
+}
+
+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_5bc4f3() {
+  uvec2 arg_1 = uvec2(0u);
+  uint arg_2 = 1u;
+  uvec4 arg_3 = uvec4(0u);
+  imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3);
+}
+
+void compute_main() {
+  textureStore_5bc4f3();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureStore/5bc4f3.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/5bc4f3.wgsl.expected.msl
new file mode 100644
index 0000000..7983b81
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/5bc4f3.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_5bc4f3(texture2d_array<uint, access::write> tint_symbol_1) {
+  uint2 arg_1 = uint2(0u);
+  uint arg_2 = 1u;
+  uint4 arg_3 = uint4(0u);
+  tint_symbol_1.write(arg_3, uint2(arg_1), arg_2);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<uint, access::write> tint_symbol_2) {
+  textureStore_5bc4f3(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_5bc4f3(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d_array<uint, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureStore_5bc4f3(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureStore/5bc4f3.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/5bc4f3.wgsl.expected.spvasm
new file mode 100644
index 0000000..6603a0f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/5bc4f3.wgsl.expected.spvasm
@@ -0,0 +1,95 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 52
+; Schema: 0
+               OpCapability Shader
+               OpCapability StorageImageExtendedFormats
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureStore_5bc4f3 "textureStore_5bc4f3"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %arg_3 "arg_3"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 2D 0 1 0 2 Rg32ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+     %v2uint = OpTypeVector %uint 2
+         %18 = OpConstantNull %v2uint
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %24 = OpConstantNull %uint
+     %v4uint = OpTypeVector %uint 4
+         %26 = OpConstantNull %v4uint
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+     %v3uint = OpTypeVector %uint 3
+         %38 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureStore_5bc4f3 = OpFunction %void None %13
+         %16 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v2uint Function %18
+      %arg_2 = OpVariable %_ptr_Function_uint Function %24
+      %arg_3 = OpVariable %_ptr_Function_v4uint Function %26
+               OpStore %arg_1 %18
+               OpStore %arg_2 %uint_1
+               OpStore %arg_3 %26
+         %30 = OpLoad %11 %arg_0
+         %32 = OpLoad %v2uint %arg_1
+         %33 = OpCompositeExtract %uint %32 0
+         %34 = OpCompositeExtract %uint %32 1
+         %35 = OpLoad %uint %arg_2
+         %36 = OpCompositeConstruct %v3uint %33 %34 %35
+         %37 = OpLoad %v4uint %arg_3
+               OpImageWrite %30 %36 %37
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %38
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %textureStore_5bc4f3
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %43 = OpLabel
+         %44 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %44
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %47 = OpLabel
+         %48 = OpFunctionCall %void %textureStore_5bc4f3
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %50 = OpLabel
+         %51 = OpFunctionCall %void %textureStore_5bc4f3
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/5bc4f3.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/5bc4f3.wgsl.expected.wgsl
new file mode 100644
index 0000000..1c223d6
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/5bc4f3.wgsl.expected.wgsl
@@ -0,0 +1,24 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rg32uint, write>;
+
+fn textureStore_5bc4f3() {
+  var arg_1 = vec2<u32>();
+  var arg_2 = 1u;
+  var arg_3 = vec4<u32>();
+  textureStore(arg_0, arg_1, arg_2, arg_3);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_5bc4f3();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_5bc4f3();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_5bc4f3();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/5f9a49.wgsl b/test/tint/builtins/gen/var/textureStore/5f9a49.wgsl
new file mode 100644
index 0000000..3cb1f9e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/5f9a49.wgsl
@@ -0,0 +1,47 @@
+// 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: u32, value: vec4<f32>)
+fn textureStore_5f9a49() {
+  var arg_1 = vec2<u32>();
+  var arg_2 = 1u;
+  var arg_3 = vec4<f32>();
+  textureStore(arg_0, arg_1, arg_2, arg_3);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_5f9a49();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_5f9a49();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_5f9a49();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/5f9a49.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/5f9a49.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..37a52f0
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/5f9a49.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+RWTexture2DArray<float4> arg_0 : register(u0, space1);
+
+void textureStore_5f9a49() {
+  uint2 arg_1 = (0u).xx;
+  uint arg_2 = 1u;
+  float4 arg_3 = (0.0f).xxxx;
+  arg_0[uint3(arg_1, arg_2)] = arg_3;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_5f9a49();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_5f9a49();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_5f9a49();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/5f9a49.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/5f9a49.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..37a52f0
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/5f9a49.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+RWTexture2DArray<float4> arg_0 : register(u0, space1);
+
+void textureStore_5f9a49() {
+  uint2 arg_1 = (0u).xx;
+  uint arg_2 = 1u;
+  float4 arg_3 = (0.0f).xxxx;
+  arg_0[uint3(arg_1, arg_2)] = arg_3;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_5f9a49();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_5f9a49();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_5f9a49();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/5f9a49.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/5f9a49.wgsl.expected.glsl
new file mode 100644
index 0000000..648faf6
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/5f9a49.wgsl.expected.glsl
@@ -0,0 +1,61 @@
+#version 310 es
+
+layout(rgba8_snorm) uniform highp writeonly image2DArray arg_0;
+void textureStore_5f9a49() {
+  uvec2 arg_1 = uvec2(0u);
+  uint arg_2 = 1u;
+  vec4 arg_3 = vec4(0.0f);
+  imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3);
+}
+
+vec4 vertex_main() {
+  textureStore_5f9a49();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = 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_5f9a49() {
+  uvec2 arg_1 = uvec2(0u);
+  uint arg_2 = 1u;
+  vec4 arg_3 = vec4(0.0f);
+  imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3);
+}
+
+void fragment_main() {
+  textureStore_5f9a49();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+layout(rgba8_snorm) uniform highp writeonly image2DArray arg_0;
+void textureStore_5f9a49() {
+  uvec2 arg_1 = uvec2(0u);
+  uint arg_2 = 1u;
+  vec4 arg_3 = vec4(0.0f);
+  imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3);
+}
+
+void compute_main() {
+  textureStore_5f9a49();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/5f9a49.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/5f9a49.wgsl.expected.msl
new file mode 100644
index 0000000..add811e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/5f9a49.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_5f9a49(texture2d_array<float, access::write> tint_symbol_1) {
+  uint2 arg_1 = uint2(0u);
+  uint arg_2 = 1u;
+  float4 arg_3 = float4(0.0f);
+  tint_symbol_1.write(arg_3, uint2(arg_1), arg_2);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<float, access::write> tint_symbol_2) {
+  textureStore_5f9a49(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_5f9a49(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d_array<float, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureStore_5f9a49(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureStore/5f9a49.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/5f9a49.wgsl.expected.spvasm
new file mode 100644
index 0000000..435a41b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/5f9a49.wgsl.expected.spvasm
@@ -0,0 +1,92 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 50
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureStore_5f9a49 "textureStore_5f9a49"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %arg_3 "arg_3"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 1 0 2 Rgba8Snorm
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %12 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+         %18 = OpConstantNull %v2uint
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %24 = OpConstantNull %uint
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+     %v3uint = OpTypeVector %uint 3
+         %36 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureStore_5f9a49 = OpFunction %void None %12
+         %15 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v2uint Function %18
+      %arg_2 = OpVariable %_ptr_Function_uint Function %24
+      %arg_3 = OpVariable %_ptr_Function_v4float Function %5
+               OpStore %arg_1 %18
+               OpStore %arg_2 %uint_1
+               OpStore %arg_3 %5
+         %28 = OpLoad %11 %arg_0
+         %30 = OpLoad %v2uint %arg_1
+         %31 = OpCompositeExtract %uint %30 0
+         %32 = OpCompositeExtract %uint %30 1
+         %33 = OpLoad %uint %arg_2
+         %34 = OpCompositeConstruct %v3uint %31 %32 %33
+         %35 = OpLoad %v4float %arg_3
+               OpImageWrite %28 %34 %35
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %36
+         %38 = OpLabel
+         %39 = OpFunctionCall %void %textureStore_5f9a49
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+         %41 = OpLabel
+         %42 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %42
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+         %45 = OpLabel
+         %46 = OpFunctionCall %void %textureStore_5f9a49
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %12
+         %48 = OpLabel
+         %49 = OpFunctionCall %void %textureStore_5f9a49
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/5f9a49.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/5f9a49.wgsl.expected.wgsl
new file mode 100644
index 0000000..951d70c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/5f9a49.wgsl.expected.wgsl
@@ -0,0 +1,24 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba8snorm, write>;
+
+fn textureStore_5f9a49() {
+  var arg_1 = vec2<u32>();
+  var arg_2 = 1u;
+  var arg_3 = vec4<f32>();
+  textureStore(arg_0, arg_1, arg_2, arg_3);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_5f9a49();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_5f9a49();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_5f9a49();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/602b5a.wgsl b/test/tint/builtins/gen/var/textureStore/602b5a.wgsl
new file mode 100644
index 0000000..94aaf8b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/602b5a.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_1d<rg32float, write>;
+
+// fn textureStore(texture: texture_storage_1d<rg32float, write>, coords: u32, value: vec4<f32>)
+fn textureStore_602b5a() {
+  var arg_1 = 1u;
+  var arg_2 = vec4<f32>();
+  textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_602b5a();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_602b5a();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_602b5a();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/602b5a.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/602b5a.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..d65e673
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/602b5a.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture1D<float4> arg_0 : register(u0, space1);
+
+void textureStore_602b5a() {
+  uint arg_1 = 1u;
+  float4 arg_2 = (0.0f).xxxx;
+  arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_602b5a();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_602b5a();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_602b5a();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/602b5a.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/602b5a.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..d65e673
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/602b5a.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture1D<float4> arg_0 : register(u0, space1);
+
+void textureStore_602b5a() {
+  uint arg_1 = 1u;
+  float4 arg_2 = (0.0f).xxxx;
+  arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_602b5a();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_602b5a();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_602b5a();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/602b5a.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/602b5a.wgsl.expected.glsl
new file mode 100644
index 0000000..c117bf5
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/602b5a.wgsl.expected.glsl
@@ -0,0 +1,81 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rg32f) uniform highp writeonly image1D arg_0;
+void textureStore_602b5a() {
+  uint arg_1 = 1u;
+  vec4 arg_2 = vec4(0.0f);
+  imageStore(arg_0, int(arg_1), arg_2);
+}
+
+vec4 vertex_main() {
+  textureStore_602b5a();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+layout(rg32f) uniform highp writeonly image1D arg_0;
+void textureStore_602b5a() {
+  uint arg_1 = 1u;
+  vec4 arg_2 = vec4(0.0f);
+  imageStore(arg_0, int(arg_1), arg_2);
+}
+
+void fragment_main() {
+  textureStore_602b5a();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'image load-store format' : not supported with this profile: es
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rg32f) uniform highp writeonly image1D arg_0;
+void textureStore_602b5a() {
+  uint arg_1 = 1u;
+  vec4 arg_2 = vec4(0.0f);
+  imageStore(arg_0, int(arg_1), arg_2);
+}
+
+void compute_main() {
+  textureStore_602b5a();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureStore/602b5a.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/602b5a.wgsl.expected.msl
new file mode 100644
index 0000000..f5d1847
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/602b5a.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_602b5a(texture1d<float, access::write> tint_symbol_1) {
+  uint arg_1 = 1u;
+  float4 arg_2 = float4(0.0f);
+  tint_symbol_1.write(arg_2, uint(arg_1));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<float, access::write> tint_symbol_2) {
+  textureStore_602b5a(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<float, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<float, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureStore_602b5a(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture1d<float, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureStore_602b5a(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureStore/602b5a.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/602b5a.wgsl.expected.spvasm
new file mode 100644
index 0000000..534c8e1
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/602b5a.wgsl.expected.spvasm
@@ -0,0 +1,83 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 41
+; Schema: 0
+               OpCapability Shader
+               OpCapability Image1D
+               OpCapability StorageImageExtendedFormats
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureStore_602b5a "textureStore_602b5a"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 1D 0 0 0 2 Rg32f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %12 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %20 = OpConstantNull %uint
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+         %27 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureStore_602b5a = OpFunction %void None %12
+         %15 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_uint Function %20
+      %arg_2 = OpVariable %_ptr_Function_v4float Function %5
+               OpStore %arg_1 %uint_1
+               OpStore %arg_2 %5
+         %24 = OpLoad %11 %arg_0
+         %25 = OpLoad %uint %arg_1
+         %26 = OpLoad %v4float %arg_2
+               OpImageWrite %24 %25 %26
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %27
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %textureStore_602b5a
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+         %32 = OpLabel
+         %33 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %33
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %textureStore_602b5a
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %12
+         %39 = OpLabel
+         %40 = OpFunctionCall %void %textureStore_602b5a
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/602b5a.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/602b5a.wgsl.expected.wgsl
new file mode 100644
index 0000000..ca22b44
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/602b5a.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(0) var arg_0 : texture_storage_1d<rg32float, write>;
+
+fn textureStore_602b5a() {
+  var arg_1 = 1u;
+  var arg_2 = vec4<f32>();
+  textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_602b5a();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_602b5a();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_602b5a();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/699a1b.wgsl b/test/tint/builtins/gen/var/textureStore/699a1b.wgsl
new file mode 100644
index 0000000..5548e40
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/699a1b.wgsl
@@ -0,0 +1,47 @@
+// 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: u32, value: vec4<f32>)
+fn textureStore_699a1b() {
+  var arg_1 = vec2<u32>();
+  var arg_2 = 1u;
+  var arg_3 = vec4<f32>();
+  textureStore(arg_0, arg_1, arg_2, arg_3);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_699a1b();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_699a1b();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_699a1b();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/699a1b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/699a1b.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..68a4450
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/699a1b.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+RWTexture2DArray<float4> arg_0 : register(u0, space1);
+
+void textureStore_699a1b() {
+  uint2 arg_1 = (0u).xx;
+  uint arg_2 = 1u;
+  float4 arg_3 = (0.0f).xxxx;
+  arg_0[uint3(arg_1, arg_2)] = arg_3;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_699a1b();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_699a1b();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_699a1b();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/699a1b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/699a1b.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..68a4450
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/699a1b.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+RWTexture2DArray<float4> arg_0 : register(u0, space1);
+
+void textureStore_699a1b() {
+  uint2 arg_1 = (0u).xx;
+  uint arg_2 = 1u;
+  float4 arg_3 = (0.0f).xxxx;
+  arg_0[uint3(arg_1, arg_2)] = arg_3;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_699a1b();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_699a1b();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_699a1b();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/699a1b.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/699a1b.wgsl.expected.glsl
new file mode 100644
index 0000000..b342728
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/699a1b.wgsl.expected.glsl
@@ -0,0 +1,61 @@
+#version 310 es
+
+layout(r32f) uniform highp writeonly image2DArray arg_0;
+void textureStore_699a1b() {
+  uvec2 arg_1 = uvec2(0u);
+  uint arg_2 = 1u;
+  vec4 arg_3 = vec4(0.0f);
+  imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3);
+}
+
+vec4 vertex_main() {
+  textureStore_699a1b();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = 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_699a1b() {
+  uvec2 arg_1 = uvec2(0u);
+  uint arg_2 = 1u;
+  vec4 arg_3 = vec4(0.0f);
+  imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3);
+}
+
+void fragment_main() {
+  textureStore_699a1b();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+layout(r32f) uniform highp writeonly image2DArray arg_0;
+void textureStore_699a1b() {
+  uvec2 arg_1 = uvec2(0u);
+  uint arg_2 = 1u;
+  vec4 arg_3 = vec4(0.0f);
+  imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3);
+}
+
+void compute_main() {
+  textureStore_699a1b();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/699a1b.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/699a1b.wgsl.expected.msl
new file mode 100644
index 0000000..57da1da
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/699a1b.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_699a1b(texture2d_array<float, access::write> tint_symbol_1) {
+  uint2 arg_1 = uint2(0u);
+  uint arg_2 = 1u;
+  float4 arg_3 = float4(0.0f);
+  tint_symbol_1.write(arg_3, uint2(arg_1), arg_2);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<float, access::write> tint_symbol_2) {
+  textureStore_699a1b(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_699a1b(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d_array<float, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureStore_699a1b(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureStore/699a1b.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/699a1b.wgsl.expected.spvasm
new file mode 100644
index 0000000..2c1021a
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/699a1b.wgsl.expected.spvasm
@@ -0,0 +1,92 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 50
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureStore_699a1b "textureStore_699a1b"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %arg_3 "arg_3"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 1 0 2 R32f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %12 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+         %18 = OpConstantNull %v2uint
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %24 = OpConstantNull %uint
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+     %v3uint = OpTypeVector %uint 3
+         %36 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureStore_699a1b = OpFunction %void None %12
+         %15 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v2uint Function %18
+      %arg_2 = OpVariable %_ptr_Function_uint Function %24
+      %arg_3 = OpVariable %_ptr_Function_v4float Function %5
+               OpStore %arg_1 %18
+               OpStore %arg_2 %uint_1
+               OpStore %arg_3 %5
+         %28 = OpLoad %11 %arg_0
+         %30 = OpLoad %v2uint %arg_1
+         %31 = OpCompositeExtract %uint %30 0
+         %32 = OpCompositeExtract %uint %30 1
+         %33 = OpLoad %uint %arg_2
+         %34 = OpCompositeConstruct %v3uint %31 %32 %33
+         %35 = OpLoad %v4float %arg_3
+               OpImageWrite %28 %34 %35
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %36
+         %38 = OpLabel
+         %39 = OpFunctionCall %void %textureStore_699a1b
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+         %41 = OpLabel
+         %42 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %42
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+         %45 = OpLabel
+         %46 = OpFunctionCall %void %textureStore_699a1b
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %12
+         %48 = OpLabel
+         %49 = OpFunctionCall %void %textureStore_699a1b
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/699a1b.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/699a1b.wgsl.expected.wgsl
new file mode 100644
index 0000000..f40f039
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/699a1b.wgsl.expected.wgsl
@@ -0,0 +1,24 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<r32float, write>;
+
+fn textureStore_699a1b() {
+  var arg_1 = vec2<u32>();
+  var arg_2 = 1u;
+  var arg_3 = vec4<f32>();
+  textureStore(arg_0, arg_1, arg_2, arg_3);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_699a1b();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_699a1b();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_699a1b();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/726472.wgsl b/test/tint/builtins/gen/var/textureStore/726472.wgsl
new file mode 100644
index 0000000..7feec83
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/726472.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d<rg32float, write>;
+
+// fn textureStore(texture: texture_storage_2d<rg32float, write>, coords: vec2<u32>, value: vec4<f32>)
+fn textureStore_726472() {
+  var arg_1 = vec2<u32>();
+  var arg_2 = vec4<f32>();
+  textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_726472();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_726472();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_726472();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/726472.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/726472.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..7730353
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/726472.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture2D<float4> arg_0 : register(u0, space1);
+
+void textureStore_726472() {
+  uint2 arg_1 = (0u).xx;
+  float4 arg_2 = (0.0f).xxxx;
+  arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_726472();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_726472();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_726472();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/726472.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/726472.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..7730353
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/726472.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture2D<float4> arg_0 : register(u0, space1);
+
+void textureStore_726472() {
+  uint2 arg_1 = (0u).xx;
+  float4 arg_2 = (0.0f).xxxx;
+  arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_726472();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_726472();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_726472();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/726472.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/726472.wgsl.expected.glsl
new file mode 100644
index 0000000..bbc6fea
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/726472.wgsl.expected.glsl
@@ -0,0 +1,81 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rg32f) uniform highp writeonly image2D arg_0;
+void textureStore_726472() {
+  uvec2 arg_1 = uvec2(0u);
+  vec4 arg_2 = vec4(0.0f);
+  imageStore(arg_0, ivec2(arg_1), arg_2);
+}
+
+vec4 vertex_main() {
+  textureStore_726472();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+layout(rg32f) uniform highp writeonly image2D arg_0;
+void textureStore_726472() {
+  uvec2 arg_1 = uvec2(0u);
+  vec4 arg_2 = vec4(0.0f);
+  imageStore(arg_0, ivec2(arg_1), arg_2);
+}
+
+void fragment_main() {
+  textureStore_726472();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'image load-store format' : not supported with this profile: es
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rg32f) uniform highp writeonly image2D arg_0;
+void textureStore_726472() {
+  uvec2 arg_1 = uvec2(0u);
+  vec4 arg_2 = vec4(0.0f);
+  imageStore(arg_0, ivec2(arg_1), arg_2);
+}
+
+void compute_main() {
+  textureStore_726472();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureStore/726472.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/726472.wgsl.expected.msl
new file mode 100644
index 0000000..5f2f55c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/726472.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_726472(texture2d<float, access::write> tint_symbol_1) {
+  uint2 arg_1 = uint2(0u);
+  float4 arg_2 = float4(0.0f);
+  tint_symbol_1.write(arg_2, uint2(arg_1));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<float, access::write> tint_symbol_2) {
+  textureStore_726472(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<float, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<float, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureStore_726472(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d<float, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureStore_726472(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureStore/726472.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/726472.wgsl.expected.spvasm
new file mode 100644
index 0000000..6670ea4
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/726472.wgsl.expected.spvasm
@@ -0,0 +1,82 @@
+; 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_726472 "textureStore_726472"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 0 0 2 Rg32f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %12 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+         %18 = OpConstantNull %v2uint
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+         %27 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureStore_726472 = OpFunction %void None %12
+         %15 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v2uint Function %18
+      %arg_2 = OpVariable %_ptr_Function_v4float Function %5
+               OpStore %arg_1 %18
+               OpStore %arg_2 %5
+         %24 = OpLoad %11 %arg_0
+         %25 = OpLoad %v2uint %arg_1
+         %26 = OpLoad %v4float %arg_2
+               OpImageWrite %24 %25 %26
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %27
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %textureStore_726472
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+         %32 = OpLabel
+         %33 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %33
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %textureStore_726472
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %12
+         %39 = OpLabel
+         %40 = OpFunctionCall %void %textureStore_726472
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/726472.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/726472.wgsl.expected.wgsl
new file mode 100644
index 0000000..b0866a3
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/726472.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d<rg32float, write>;
+
+fn textureStore_726472() {
+  var arg_1 = vec2<u32>();
+  var arg_2 = vec4<f32>();
+  textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_726472();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_726472();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_726472();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/73bbbc.wgsl b/test/tint/builtins/gen/var/textureStore/73bbbc.wgsl
new file mode 100644
index 0000000..caabbdb
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/73bbbc.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d<rgba8unorm, write>;
+
+// fn textureStore(texture: texture_storage_2d<rgba8unorm, write>, coords: vec2<u32>, value: vec4<f32>)
+fn textureStore_73bbbc() {
+  var arg_1 = vec2<u32>();
+  var arg_2 = vec4<f32>();
+  textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_73bbbc();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_73bbbc();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_73bbbc();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/73bbbc.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/73bbbc.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..689ab29
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/73bbbc.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture2D<float4> arg_0 : register(u0, space1);
+
+void textureStore_73bbbc() {
+  uint2 arg_1 = (0u).xx;
+  float4 arg_2 = (0.0f).xxxx;
+  arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_73bbbc();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_73bbbc();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_73bbbc();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/73bbbc.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/73bbbc.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..689ab29
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/73bbbc.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture2D<float4> arg_0 : register(u0, space1);
+
+void textureStore_73bbbc() {
+  uint2 arg_1 = (0u).xx;
+  float4 arg_2 = (0.0f).xxxx;
+  arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_73bbbc();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_73bbbc();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_73bbbc();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/73bbbc.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/73bbbc.wgsl.expected.glsl
new file mode 100644
index 0000000..59505cb
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/73bbbc.wgsl.expected.glsl
@@ -0,0 +1,58 @@
+#version 310 es
+
+layout(rgba8) uniform highp writeonly image2D arg_0;
+void textureStore_73bbbc() {
+  uvec2 arg_1 = uvec2(0u);
+  vec4 arg_2 = vec4(0.0f);
+  imageStore(arg_0, ivec2(arg_1), arg_2);
+}
+
+vec4 vertex_main() {
+  textureStore_73bbbc();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+layout(rgba8) uniform highp writeonly image2D arg_0;
+void textureStore_73bbbc() {
+  uvec2 arg_1 = uvec2(0u);
+  vec4 arg_2 = vec4(0.0f);
+  imageStore(arg_0, ivec2(arg_1), arg_2);
+}
+
+void fragment_main() {
+  textureStore_73bbbc();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+layout(rgba8) uniform highp writeonly image2D arg_0;
+void textureStore_73bbbc() {
+  uvec2 arg_1 = uvec2(0u);
+  vec4 arg_2 = vec4(0.0f);
+  imageStore(arg_0, ivec2(arg_1), arg_2);
+}
+
+void compute_main() {
+  textureStore_73bbbc();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/73bbbc.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/73bbbc.wgsl.expected.msl
new file mode 100644
index 0000000..941e50f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/73bbbc.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_73bbbc(texture2d<float, access::write> tint_symbol_1) {
+  uint2 arg_1 = uint2(0u);
+  float4 arg_2 = float4(0.0f);
+  tint_symbol_1.write(arg_2, uint2(arg_1));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<float, access::write> tint_symbol_2) {
+  textureStore_73bbbc(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<float, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<float, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureStore_73bbbc(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d<float, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureStore_73bbbc(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureStore/73bbbc.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/73bbbc.wgsl.expected.spvasm
new file mode 100644
index 0000000..8b04462
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/73bbbc.wgsl.expected.spvasm
@@ -0,0 +1,81 @@
+; 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_73bbbc "textureStore_73bbbc"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 0 0 2 Rgba8
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %12 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+         %18 = OpConstantNull %v2uint
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+         %27 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureStore_73bbbc = OpFunction %void None %12
+         %15 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v2uint Function %18
+      %arg_2 = OpVariable %_ptr_Function_v4float Function %5
+               OpStore %arg_1 %18
+               OpStore %arg_2 %5
+         %24 = OpLoad %11 %arg_0
+         %25 = OpLoad %v2uint %arg_1
+         %26 = OpLoad %v4float %arg_2
+               OpImageWrite %24 %25 %26
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %27
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %textureStore_73bbbc
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+         %32 = OpLabel
+         %33 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %33
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %textureStore_73bbbc
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %12
+         %39 = OpLabel
+         %40 = OpFunctionCall %void %textureStore_73bbbc
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/73bbbc.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/73bbbc.wgsl.expected.wgsl
new file mode 100644
index 0000000..7728131
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/73bbbc.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d<rgba8unorm, write>;
+
+fn textureStore_73bbbc() {
+  var arg_1 = vec2<u32>();
+  var arg_2 = vec4<f32>();
+  textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_73bbbc();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_73bbbc();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_73bbbc();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/779d14.wgsl b/test/tint/builtins/gen/var/textureStore/779d14.wgsl
new file mode 100644
index 0000000..1850240
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/779d14.wgsl
@@ -0,0 +1,47 @@
+// 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: u32, value: vec4<u32>)
+fn textureStore_779d14() {
+  var arg_1 = vec2<u32>();
+  var arg_2 = 1u;
+  var arg_3 = vec4<u32>();
+  textureStore(arg_0, arg_1, arg_2, arg_3);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_779d14();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_779d14();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_779d14();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/779d14.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/779d14.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..1d92629
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/779d14.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+RWTexture2DArray<uint4> arg_0 : register(u0, space1);
+
+void textureStore_779d14() {
+  uint2 arg_1 = (0u).xx;
+  uint arg_2 = 1u;
+  uint4 arg_3 = (0u).xxxx;
+  arg_0[uint3(arg_1, arg_2)] = arg_3;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_779d14();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_779d14();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_779d14();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/779d14.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/779d14.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..1d92629
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/779d14.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+RWTexture2DArray<uint4> arg_0 : register(u0, space1);
+
+void textureStore_779d14() {
+  uint2 arg_1 = (0u).xx;
+  uint arg_2 = 1u;
+  uint4 arg_3 = (0u).xxxx;
+  arg_0[uint3(arg_1, arg_2)] = arg_3;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_779d14();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_779d14();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_779d14();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/779d14.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/779d14.wgsl.expected.glsl
new file mode 100644
index 0000000..3ad1db2
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/779d14.wgsl.expected.glsl
@@ -0,0 +1,61 @@
+#version 310 es
+
+layout(rgba16ui) uniform highp writeonly uimage2DArray arg_0;
+void textureStore_779d14() {
+  uvec2 arg_1 = uvec2(0u);
+  uint arg_2 = 1u;
+  uvec4 arg_3 = uvec4(0u);
+  imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3);
+}
+
+vec4 vertex_main() {
+  textureStore_779d14();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = 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_779d14() {
+  uvec2 arg_1 = uvec2(0u);
+  uint arg_2 = 1u;
+  uvec4 arg_3 = uvec4(0u);
+  imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3);
+}
+
+void fragment_main() {
+  textureStore_779d14();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+layout(rgba16ui) uniform highp writeonly uimage2DArray arg_0;
+void textureStore_779d14() {
+  uvec2 arg_1 = uvec2(0u);
+  uint arg_2 = 1u;
+  uvec4 arg_3 = uvec4(0u);
+  imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3);
+}
+
+void compute_main() {
+  textureStore_779d14();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/779d14.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/779d14.wgsl.expected.msl
new file mode 100644
index 0000000..0d04ed0
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/779d14.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_779d14(texture2d_array<uint, access::write> tint_symbol_1) {
+  uint2 arg_1 = uint2(0u);
+  uint arg_2 = 1u;
+  uint4 arg_3 = uint4(0u);
+  tint_symbol_1.write(arg_3, uint2(arg_1), arg_2);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<uint, access::write> tint_symbol_2) {
+  textureStore_779d14(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_779d14(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d_array<uint, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureStore_779d14(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureStore/779d14.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/779d14.wgsl.expected.spvasm
new file mode 100644
index 0000000..f61b543
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/779d14.wgsl.expected.spvasm
@@ -0,0 +1,94 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 52
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureStore_779d14 "textureStore_779d14"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %arg_3 "arg_3"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 2D 0 1 0 2 Rgba16ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+     %v2uint = OpTypeVector %uint 2
+         %18 = OpConstantNull %v2uint
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %24 = OpConstantNull %uint
+     %v4uint = OpTypeVector %uint 4
+         %26 = OpConstantNull %v4uint
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+     %v3uint = OpTypeVector %uint 3
+         %38 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureStore_779d14 = OpFunction %void None %13
+         %16 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v2uint Function %18
+      %arg_2 = OpVariable %_ptr_Function_uint Function %24
+      %arg_3 = OpVariable %_ptr_Function_v4uint Function %26
+               OpStore %arg_1 %18
+               OpStore %arg_2 %uint_1
+               OpStore %arg_3 %26
+         %30 = OpLoad %11 %arg_0
+         %32 = OpLoad %v2uint %arg_1
+         %33 = OpCompositeExtract %uint %32 0
+         %34 = OpCompositeExtract %uint %32 1
+         %35 = OpLoad %uint %arg_2
+         %36 = OpCompositeConstruct %v3uint %33 %34 %35
+         %37 = OpLoad %v4uint %arg_3
+               OpImageWrite %30 %36 %37
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %38
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %textureStore_779d14
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %43 = OpLabel
+         %44 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %44
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %47 = OpLabel
+         %48 = OpFunctionCall %void %textureStore_779d14
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %50 = OpLabel
+         %51 = OpFunctionCall %void %textureStore_779d14
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/779d14.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/779d14.wgsl.expected.wgsl
new file mode 100644
index 0000000..543447b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/779d14.wgsl.expected.wgsl
@@ -0,0 +1,24 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba16uint, write>;
+
+fn textureStore_779d14() {
+  var arg_1 = vec2<u32>();
+  var arg_2 = 1u;
+  var arg_3 = vec4<u32>();
+  textureStore(arg_0, arg_1, arg_2, arg_3);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_779d14();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_779d14();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_779d14();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/7cf6e7.wgsl b/test/tint/builtins/gen/var/textureStore/7cf6e7.wgsl
new file mode 100644
index 0000000..b64eb22
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/7cf6e7.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d<rgba16float, write>;
+
+// fn textureStore(texture: texture_storage_2d<rgba16float, write>, coords: vec2<u32>, value: vec4<f32>)
+fn textureStore_7cf6e7() {
+  var arg_1 = vec2<u32>();
+  var arg_2 = vec4<f32>();
+  textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_7cf6e7();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_7cf6e7();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_7cf6e7();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/7cf6e7.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/7cf6e7.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..516eb54
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/7cf6e7.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture2D<float4> arg_0 : register(u0, space1);
+
+void textureStore_7cf6e7() {
+  uint2 arg_1 = (0u).xx;
+  float4 arg_2 = (0.0f).xxxx;
+  arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_7cf6e7();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_7cf6e7();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_7cf6e7();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/7cf6e7.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/7cf6e7.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..516eb54
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/7cf6e7.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture2D<float4> arg_0 : register(u0, space1);
+
+void textureStore_7cf6e7() {
+  uint2 arg_1 = (0u).xx;
+  float4 arg_2 = (0.0f).xxxx;
+  arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_7cf6e7();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_7cf6e7();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_7cf6e7();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/7cf6e7.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/7cf6e7.wgsl.expected.glsl
new file mode 100644
index 0000000..dc0045b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/7cf6e7.wgsl.expected.glsl
@@ -0,0 +1,58 @@
+#version 310 es
+
+layout(rgba16f) uniform highp writeonly image2D arg_0;
+void textureStore_7cf6e7() {
+  uvec2 arg_1 = uvec2(0u);
+  vec4 arg_2 = vec4(0.0f);
+  imageStore(arg_0, ivec2(arg_1), arg_2);
+}
+
+vec4 vertex_main() {
+  textureStore_7cf6e7();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+layout(rgba16f) uniform highp writeonly image2D arg_0;
+void textureStore_7cf6e7() {
+  uvec2 arg_1 = uvec2(0u);
+  vec4 arg_2 = vec4(0.0f);
+  imageStore(arg_0, ivec2(arg_1), arg_2);
+}
+
+void fragment_main() {
+  textureStore_7cf6e7();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+layout(rgba16f) uniform highp writeonly image2D arg_0;
+void textureStore_7cf6e7() {
+  uvec2 arg_1 = uvec2(0u);
+  vec4 arg_2 = vec4(0.0f);
+  imageStore(arg_0, ivec2(arg_1), arg_2);
+}
+
+void compute_main() {
+  textureStore_7cf6e7();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/7cf6e7.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/7cf6e7.wgsl.expected.msl
new file mode 100644
index 0000000..f19febe
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/7cf6e7.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_7cf6e7(texture2d<float, access::write> tint_symbol_1) {
+  uint2 arg_1 = uint2(0u);
+  float4 arg_2 = float4(0.0f);
+  tint_symbol_1.write(arg_2, uint2(arg_1));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<float, access::write> tint_symbol_2) {
+  textureStore_7cf6e7(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<float, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<float, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureStore_7cf6e7(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d<float, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureStore_7cf6e7(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureStore/7cf6e7.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/7cf6e7.wgsl.expected.spvasm
new file mode 100644
index 0000000..d303e8f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/7cf6e7.wgsl.expected.spvasm
@@ -0,0 +1,81 @@
+; 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_7cf6e7 "textureStore_7cf6e7"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 0 0 2 Rgba16f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %12 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+         %18 = OpConstantNull %v2uint
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+         %27 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureStore_7cf6e7 = OpFunction %void None %12
+         %15 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v2uint Function %18
+      %arg_2 = OpVariable %_ptr_Function_v4float Function %5
+               OpStore %arg_1 %18
+               OpStore %arg_2 %5
+         %24 = OpLoad %11 %arg_0
+         %25 = OpLoad %v2uint %arg_1
+         %26 = OpLoad %v4float %arg_2
+               OpImageWrite %24 %25 %26
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %27
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %textureStore_7cf6e7
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+         %32 = OpLabel
+         %33 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %33
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %textureStore_7cf6e7
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %12
+         %39 = OpLabel
+         %40 = OpFunctionCall %void %textureStore_7cf6e7
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/7cf6e7.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/7cf6e7.wgsl.expected.wgsl
new file mode 100644
index 0000000..f93f1a0
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/7cf6e7.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d<rgba16float, write>;
+
+fn textureStore_7cf6e7() {
+  var arg_1 = vec2<u32>();
+  var arg_2 = vec4<f32>();
+  textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_7cf6e7();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_7cf6e7();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_7cf6e7();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/8b9310.wgsl b/test/tint/builtins/gen/var/textureStore/8b9310.wgsl
new file mode 100644
index 0000000..5c1529a
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/8b9310.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_3d<rgba16float, write>;
+
+// fn textureStore(texture: texture_storage_3d<rgba16float, write>, coords: vec3<u32>, value: vec4<f32>)
+fn textureStore_8b9310() {
+  var arg_1 = vec3<u32>();
+  var arg_2 = vec4<f32>();
+  textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_8b9310();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_8b9310();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_8b9310();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/8b9310.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/8b9310.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..63e02b9
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/8b9310.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture3D<float4> arg_0 : register(u0, space1);
+
+void textureStore_8b9310() {
+  uint3 arg_1 = (0u).xxx;
+  float4 arg_2 = (0.0f).xxxx;
+  arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_8b9310();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_8b9310();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_8b9310();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/8b9310.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/8b9310.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..63e02b9
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/8b9310.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture3D<float4> arg_0 : register(u0, space1);
+
+void textureStore_8b9310() {
+  uint3 arg_1 = (0u).xxx;
+  float4 arg_2 = (0.0f).xxxx;
+  arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_8b9310();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_8b9310();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_8b9310();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/8b9310.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/8b9310.wgsl.expected.glsl
new file mode 100644
index 0000000..07179e6
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/8b9310.wgsl.expected.glsl
@@ -0,0 +1,58 @@
+#version 310 es
+
+layout(rgba16f) uniform highp writeonly image3D arg_0;
+void textureStore_8b9310() {
+  uvec3 arg_1 = uvec3(0u);
+  vec4 arg_2 = vec4(0.0f);
+  imageStore(arg_0, ivec3(arg_1), arg_2);
+}
+
+vec4 vertex_main() {
+  textureStore_8b9310();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+layout(rgba16f) uniform highp writeonly image3D arg_0;
+void textureStore_8b9310() {
+  uvec3 arg_1 = uvec3(0u);
+  vec4 arg_2 = vec4(0.0f);
+  imageStore(arg_0, ivec3(arg_1), arg_2);
+}
+
+void fragment_main() {
+  textureStore_8b9310();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+layout(rgba16f) uniform highp writeonly image3D arg_0;
+void textureStore_8b9310() {
+  uvec3 arg_1 = uvec3(0u);
+  vec4 arg_2 = vec4(0.0f);
+  imageStore(arg_0, ivec3(arg_1), arg_2);
+}
+
+void compute_main() {
+  textureStore_8b9310();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/8b9310.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/8b9310.wgsl.expected.msl
new file mode 100644
index 0000000..a56cd43
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/8b9310.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_8b9310(texture3d<float, access::write> tint_symbol_1) {
+  uint3 arg_1 = uint3(0u);
+  float4 arg_2 = float4(0.0f);
+  tint_symbol_1.write(arg_2, uint3(arg_1));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<float, access::write> tint_symbol_2) {
+  textureStore_8b9310(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<float, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture3d<float, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureStore_8b9310(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture3d<float, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureStore_8b9310(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureStore/8b9310.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/8b9310.wgsl.expected.spvasm
new file mode 100644
index 0000000..6dcd46e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/8b9310.wgsl.expected.spvasm
@@ -0,0 +1,81 @@
+; 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_8b9310 "textureStore_8b9310"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 3D 0 0 0 2 Rgba16f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %12 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v3uint = OpTypeVector %uint 3
+         %18 = OpConstantNull %v3uint
+%_ptr_Function_v3uint = OpTypePointer Function %v3uint
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+         %27 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureStore_8b9310 = OpFunction %void None %12
+         %15 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v3uint Function %18
+      %arg_2 = OpVariable %_ptr_Function_v4float Function %5
+               OpStore %arg_1 %18
+               OpStore %arg_2 %5
+         %24 = OpLoad %11 %arg_0
+         %25 = OpLoad %v3uint %arg_1
+         %26 = OpLoad %v4float %arg_2
+               OpImageWrite %24 %25 %26
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %27
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %textureStore_8b9310
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+         %32 = OpLabel
+         %33 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %33
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %textureStore_8b9310
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %12
+         %39 = OpLabel
+         %40 = OpFunctionCall %void %textureStore_8b9310
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/8b9310.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/8b9310.wgsl.expected.wgsl
new file mode 100644
index 0000000..f4095ea
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/8b9310.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(0) var arg_0 : texture_storage_3d<rgba16float, write>;
+
+fn textureStore_8b9310() {
+  var arg_1 = vec3<u32>();
+  var arg_2 = vec4<f32>();
+  textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_8b9310();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_8b9310();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_8b9310();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/8bb287.wgsl b/test/tint/builtins/gen/var/textureStore/8bb287.wgsl
new file mode 100644
index 0000000..4798b48
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/8bb287.wgsl
@@ -0,0 +1,47 @@
+// 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: u32, value: vec4<i32>)
+fn textureStore_8bb287() {
+  var arg_1 = vec2<u32>();
+  var arg_2 = 1u;
+  var arg_3 = vec4<i32>();
+  textureStore(arg_0, arg_1, arg_2, arg_3);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_8bb287();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_8bb287();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_8bb287();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/8bb287.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/8bb287.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..69cee8c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/8bb287.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+RWTexture2DArray<int4> arg_0 : register(u0, space1);
+
+void textureStore_8bb287() {
+  uint2 arg_1 = (0u).xx;
+  uint arg_2 = 1u;
+  int4 arg_3 = (0).xxxx;
+  arg_0[uint3(arg_1, arg_2)] = arg_3;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_8bb287();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_8bb287();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_8bb287();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/8bb287.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/8bb287.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..69cee8c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/8bb287.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+RWTexture2DArray<int4> arg_0 : register(u0, space1);
+
+void textureStore_8bb287() {
+  uint2 arg_1 = (0u).xx;
+  uint arg_2 = 1u;
+  int4 arg_3 = (0).xxxx;
+  arg_0[uint3(arg_1, arg_2)] = arg_3;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_8bb287();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_8bb287();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_8bb287();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/8bb287.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/8bb287.wgsl.expected.glsl
new file mode 100644
index 0000000..88ef4d6
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/8bb287.wgsl.expected.glsl
@@ -0,0 +1,61 @@
+#version 310 es
+
+layout(rgba32i) uniform highp writeonly iimage2DArray arg_0;
+void textureStore_8bb287() {
+  uvec2 arg_1 = uvec2(0u);
+  uint arg_2 = 1u;
+  ivec4 arg_3 = ivec4(0);
+  imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3);
+}
+
+vec4 vertex_main() {
+  textureStore_8bb287();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = 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_8bb287() {
+  uvec2 arg_1 = uvec2(0u);
+  uint arg_2 = 1u;
+  ivec4 arg_3 = ivec4(0);
+  imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3);
+}
+
+void fragment_main() {
+  textureStore_8bb287();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+layout(rgba32i) uniform highp writeonly iimage2DArray arg_0;
+void textureStore_8bb287() {
+  uvec2 arg_1 = uvec2(0u);
+  uint arg_2 = 1u;
+  ivec4 arg_3 = ivec4(0);
+  imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3);
+}
+
+void compute_main() {
+  textureStore_8bb287();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/8bb287.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/8bb287.wgsl.expected.msl
new file mode 100644
index 0000000..f5202e7
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/8bb287.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_8bb287(texture2d_array<int, access::write> tint_symbol_1) {
+  uint2 arg_1 = uint2(0u);
+  uint arg_2 = 1u;
+  int4 arg_3 = int4(0);
+  tint_symbol_1.write(arg_3, uint2(arg_1), arg_2);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<int, access::write> tint_symbol_2) {
+  textureStore_8bb287(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_8bb287(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d_array<int, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureStore_8bb287(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureStore/8bb287.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/8bb287.wgsl.expected.spvasm
new file mode 100644
index 0000000..1c82ad5
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/8bb287.wgsl.expected.spvasm
@@ -0,0 +1,95 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 53
+; 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_8bb287 "textureStore_8bb287"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %arg_3 "arg_3"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 2D 0 1 0 2 Rgba32i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+         %19 = OpConstantNull %v2uint
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %25 = OpConstantNull %uint
+      %v4int = OpTypeVector %int 4
+         %27 = OpConstantNull %v4int
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+     %v3uint = OpTypeVector %uint 3
+         %39 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureStore_8bb287 = OpFunction %void None %13
+         %16 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v2uint Function %19
+      %arg_2 = OpVariable %_ptr_Function_uint Function %25
+      %arg_3 = OpVariable %_ptr_Function_v4int Function %27
+               OpStore %arg_1 %19
+               OpStore %arg_2 %uint_1
+               OpStore %arg_3 %27
+         %31 = OpLoad %11 %arg_0
+         %33 = OpLoad %v2uint %arg_1
+         %34 = OpCompositeExtract %uint %33 0
+         %35 = OpCompositeExtract %uint %33 1
+         %36 = OpLoad %uint %arg_2
+         %37 = OpCompositeConstruct %v3uint %34 %35 %36
+         %38 = OpLoad %v4int %arg_3
+               OpImageWrite %31 %37 %38
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %39
+         %41 = OpLabel
+         %42 = OpFunctionCall %void %textureStore_8bb287
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %44 = OpLabel
+         %45 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %45
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %48 = OpLabel
+         %49 = OpFunctionCall %void %textureStore_8bb287
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %51 = OpLabel
+         %52 = OpFunctionCall %void %textureStore_8bb287
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/8bb287.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/8bb287.wgsl.expected.wgsl
new file mode 100644
index 0000000..a8e7a96
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/8bb287.wgsl.expected.wgsl
@@ -0,0 +1,24 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba32sint, write>;
+
+fn textureStore_8bb287() {
+  var arg_1 = vec2<u32>();
+  var arg_2 = 1u;
+  var arg_3 = vec4<i32>();
+  textureStore(arg_0, arg_1, arg_2, arg_3);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_8bb287();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_8bb287();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_8bb287();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/8c76e9.wgsl b/test/tint/builtins/gen/var/textureStore/8c76e9.wgsl
new file mode 100644
index 0000000..d5510a9
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/8c76e9.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_1d<rgba16sint, write>;
+
+// fn textureStore(texture: texture_storage_1d<rgba16sint, write>, coords: u32, value: vec4<i32>)
+fn textureStore_8c76e9() {
+  var arg_1 = 1u;
+  var arg_2 = vec4<i32>();
+  textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_8c76e9();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_8c76e9();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_8c76e9();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/8c76e9.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/8c76e9.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..94d7ce9
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/8c76e9.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture1D<int4> arg_0 : register(u0, space1);
+
+void textureStore_8c76e9() {
+  uint arg_1 = 1u;
+  int4 arg_2 = (0).xxxx;
+  arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_8c76e9();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_8c76e9();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_8c76e9();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/8c76e9.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/8c76e9.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..94d7ce9
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/8c76e9.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture1D<int4> arg_0 : register(u0, space1);
+
+void textureStore_8c76e9() {
+  uint arg_1 = 1u;
+  int4 arg_2 = (0).xxxx;
+  arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_8c76e9();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_8c76e9();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_8c76e9();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/8c76e9.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/8c76e9.wgsl.expected.glsl
new file mode 100644
index 0000000..8eff443
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/8c76e9.wgsl.expected.glsl
@@ -0,0 +1,84 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba16i) uniform highp writeonly iimage1D arg_0;
+void textureStore_8c76e9() {
+  uint arg_1 = 1u;
+  ivec4 arg_2 = ivec4(0);
+  imageStore(arg_0, int(arg_1), arg_2);
+}
+
+vec4 vertex_main() {
+  textureStore_8c76e9();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'iimage1D' : Reserved word. 
+WARNING: 0:3: 'layout' : useless application of layout qualifier 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+layout(rgba16i) uniform highp writeonly iimage1D arg_0;
+void textureStore_8c76e9() {
+  uint arg_1 = 1u;
+  ivec4 arg_2 = ivec4(0);
+  imageStore(arg_0, int(arg_1), arg_2);
+}
+
+void fragment_main() {
+  textureStore_8c76e9();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'iimage1D' : Reserved word. 
+WARNING: 0:4: 'layout' : useless application of layout qualifier 
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba16i) uniform highp writeonly iimage1D arg_0;
+void textureStore_8c76e9() {
+  uint arg_1 = 1u;
+  ivec4 arg_2 = ivec4(0);
+  imageStore(arg_0, int(arg_1), arg_2);
+}
+
+void compute_main() {
+  textureStore_8c76e9();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'iimage1D' : Reserved word. 
+WARNING: 0:3: 'layout' : useless application of layout qualifier 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureStore/8c76e9.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/8c76e9.wgsl.expected.msl
new file mode 100644
index 0000000..c5331dd
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/8c76e9.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_8c76e9(texture1d<int, access::write> tint_symbol_1) {
+  uint arg_1 = 1u;
+  int4 arg_2 = int4(0);
+  tint_symbol_1.write(arg_2, uint(arg_1));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<int, access::write> tint_symbol_2) {
+  textureStore_8c76e9(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<int, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<int, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureStore_8c76e9(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture1d<int, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureStore_8c76e9(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureStore/8c76e9.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/8c76e9.wgsl.expected.spvasm
new file mode 100644
index 0000000..dff91f3
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/8c76e9.wgsl.expected.spvasm
@@ -0,0 +1,85 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 44
+; Schema: 0
+               OpCapability Shader
+               OpCapability Image1D
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureStore_8c76e9 "textureStore_8c76e9"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 1D 0 0 0 2 Rgba16i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %21 = OpConstantNull %uint
+      %v4int = OpTypeVector %int 4
+         %23 = OpConstantNull %v4int
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+         %30 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureStore_8c76e9 = OpFunction %void None %13
+         %16 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_uint Function %21
+      %arg_2 = OpVariable %_ptr_Function_v4int Function %23
+               OpStore %arg_1 %uint_1
+               OpStore %arg_2 %23
+         %27 = OpLoad %11 %arg_0
+         %28 = OpLoad %uint %arg_1
+         %29 = OpLoad %v4int %arg_2
+               OpImageWrite %27 %28 %29
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %30
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %textureStore_8c76e9
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %35 = OpLabel
+         %36 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %36
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %39 = OpLabel
+         %40 = OpFunctionCall %void %textureStore_8c76e9
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %42 = OpLabel
+         %43 = OpFunctionCall %void %textureStore_8c76e9
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/8c76e9.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/8c76e9.wgsl.expected.wgsl
new file mode 100644
index 0000000..41c78a3
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/8c76e9.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(0) var arg_0 : texture_storage_1d<rgba16sint, write>;
+
+fn textureStore_8c76e9() {
+  var arg_1 = 1u;
+  var arg_2 = vec4<i32>();
+  textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_8c76e9();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_8c76e9();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_8c76e9();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/8dc54f.wgsl b/test/tint/builtins/gen/var/textureStore/8dc54f.wgsl
new file mode 100644
index 0000000..ea6156b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/8dc54f.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d<rgba8uint, write>;
+
+// fn textureStore(texture: texture_storage_2d<rgba8uint, write>, coords: vec2<u32>, value: vec4<u32>)
+fn textureStore_8dc54f() {
+  var arg_1 = vec2<u32>();
+  var arg_2 = vec4<u32>();
+  textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_8dc54f();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_8dc54f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_8dc54f();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/8dc54f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/8dc54f.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..9356f2b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/8dc54f.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture2D<uint4> arg_0 : register(u0, space1);
+
+void textureStore_8dc54f() {
+  uint2 arg_1 = (0u).xx;
+  uint4 arg_2 = (0u).xxxx;
+  arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_8dc54f();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_8dc54f();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_8dc54f();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/8dc54f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/8dc54f.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..9356f2b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/8dc54f.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture2D<uint4> arg_0 : register(u0, space1);
+
+void textureStore_8dc54f() {
+  uint2 arg_1 = (0u).xx;
+  uint4 arg_2 = (0u).xxxx;
+  arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_8dc54f();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_8dc54f();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_8dc54f();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/8dc54f.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/8dc54f.wgsl.expected.glsl
new file mode 100644
index 0000000..c736632
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/8dc54f.wgsl.expected.glsl
@@ -0,0 +1,58 @@
+#version 310 es
+
+layout(rgba8ui) uniform highp writeonly uimage2D arg_0;
+void textureStore_8dc54f() {
+  uvec2 arg_1 = uvec2(0u);
+  uvec4 arg_2 = uvec4(0u);
+  imageStore(arg_0, ivec2(arg_1), arg_2);
+}
+
+vec4 vertex_main() {
+  textureStore_8dc54f();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+layout(rgba8ui) uniform highp writeonly uimage2D arg_0;
+void textureStore_8dc54f() {
+  uvec2 arg_1 = uvec2(0u);
+  uvec4 arg_2 = uvec4(0u);
+  imageStore(arg_0, ivec2(arg_1), arg_2);
+}
+
+void fragment_main() {
+  textureStore_8dc54f();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+layout(rgba8ui) uniform highp writeonly uimage2D arg_0;
+void textureStore_8dc54f() {
+  uvec2 arg_1 = uvec2(0u);
+  uvec4 arg_2 = uvec4(0u);
+  imageStore(arg_0, ivec2(arg_1), arg_2);
+}
+
+void compute_main() {
+  textureStore_8dc54f();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/8dc54f.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/8dc54f.wgsl.expected.msl
new file mode 100644
index 0000000..a4b43c5
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/8dc54f.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_8dc54f(texture2d<uint, access::write> tint_symbol_1) {
+  uint2 arg_1 = uint2(0u);
+  uint4 arg_2 = uint4(0u);
+  tint_symbol_1.write(arg_2, uint2(arg_1));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<uint, access::write> tint_symbol_2) {
+  textureStore_8dc54f(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<uint, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<uint, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureStore_8dc54f(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d<uint, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureStore_8dc54f(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureStore/8dc54f.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/8dc54f.wgsl.expected.spvasm
new file mode 100644
index 0000000..f6c0c9d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/8dc54f.wgsl.expected.spvasm
@@ -0,0 +1,83 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 43
+; 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_8dc54f "textureStore_8dc54f"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 2D 0 0 0 2 Rgba8ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+     %v2uint = OpTypeVector %uint 2
+         %18 = OpConstantNull %v2uint
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+     %v4uint = OpTypeVector %uint 4
+         %22 = OpConstantNull %v4uint
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+         %29 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureStore_8dc54f = OpFunction %void None %13
+         %16 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v2uint Function %18
+      %arg_2 = OpVariable %_ptr_Function_v4uint Function %22
+               OpStore %arg_1 %18
+               OpStore %arg_2 %22
+         %26 = OpLoad %11 %arg_0
+         %27 = OpLoad %v2uint %arg_1
+         %28 = OpLoad %v4uint %arg_2
+               OpImageWrite %26 %27 %28
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %29
+         %31 = OpLabel
+         %32 = OpFunctionCall %void %textureStore_8dc54f
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %34 = OpLabel
+         %35 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %35
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %38 = OpLabel
+         %39 = OpFunctionCall %void %textureStore_8dc54f
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %41 = OpLabel
+         %42 = OpFunctionCall %void %textureStore_8dc54f
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/8dc54f.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/8dc54f.wgsl.expected.wgsl
new file mode 100644
index 0000000..45a3bce
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/8dc54f.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d<rgba8uint, write>;
+
+fn textureStore_8dc54f() {
+  var arg_1 = vec2<u32>();
+  var arg_2 = vec4<u32>();
+  textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_8dc54f();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_8dc54f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_8dc54f();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/8ed9f8.wgsl b/test/tint/builtins/gen/var/textureStore/8ed9f8.wgsl
new file mode 100644
index 0000000..cadc370
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/8ed9f8.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_3d<rgba8unorm, write>;
+
+// fn textureStore(texture: texture_storage_3d<rgba8unorm, write>, coords: vec3<u32>, value: vec4<f32>)
+fn textureStore_8ed9f8() {
+  var arg_1 = vec3<u32>();
+  var arg_2 = vec4<f32>();
+  textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_8ed9f8();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_8ed9f8();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_8ed9f8();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/8ed9f8.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/8ed9f8.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..0660af5
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/8ed9f8.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture3D<float4> arg_0 : register(u0, space1);
+
+void textureStore_8ed9f8() {
+  uint3 arg_1 = (0u).xxx;
+  float4 arg_2 = (0.0f).xxxx;
+  arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_8ed9f8();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_8ed9f8();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_8ed9f8();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/8ed9f8.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/8ed9f8.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..0660af5
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/8ed9f8.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture3D<float4> arg_0 : register(u0, space1);
+
+void textureStore_8ed9f8() {
+  uint3 arg_1 = (0u).xxx;
+  float4 arg_2 = (0.0f).xxxx;
+  arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_8ed9f8();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_8ed9f8();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_8ed9f8();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/8ed9f8.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/8ed9f8.wgsl.expected.glsl
new file mode 100644
index 0000000..1f7cd6b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/8ed9f8.wgsl.expected.glsl
@@ -0,0 +1,58 @@
+#version 310 es
+
+layout(rgba8) uniform highp writeonly image3D arg_0;
+void textureStore_8ed9f8() {
+  uvec3 arg_1 = uvec3(0u);
+  vec4 arg_2 = vec4(0.0f);
+  imageStore(arg_0, ivec3(arg_1), arg_2);
+}
+
+vec4 vertex_main() {
+  textureStore_8ed9f8();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+layout(rgba8) uniform highp writeonly image3D arg_0;
+void textureStore_8ed9f8() {
+  uvec3 arg_1 = uvec3(0u);
+  vec4 arg_2 = vec4(0.0f);
+  imageStore(arg_0, ivec3(arg_1), arg_2);
+}
+
+void fragment_main() {
+  textureStore_8ed9f8();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+layout(rgba8) uniform highp writeonly image3D arg_0;
+void textureStore_8ed9f8() {
+  uvec3 arg_1 = uvec3(0u);
+  vec4 arg_2 = vec4(0.0f);
+  imageStore(arg_0, ivec3(arg_1), arg_2);
+}
+
+void compute_main() {
+  textureStore_8ed9f8();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/8ed9f8.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/8ed9f8.wgsl.expected.msl
new file mode 100644
index 0000000..bb463d3
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/8ed9f8.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_8ed9f8(texture3d<float, access::write> tint_symbol_1) {
+  uint3 arg_1 = uint3(0u);
+  float4 arg_2 = float4(0.0f);
+  tint_symbol_1.write(arg_2, uint3(arg_1));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<float, access::write> tint_symbol_2) {
+  textureStore_8ed9f8(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<float, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture3d<float, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureStore_8ed9f8(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture3d<float, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureStore_8ed9f8(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureStore/8ed9f8.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/8ed9f8.wgsl.expected.spvasm
new file mode 100644
index 0000000..f6fe75a
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/8ed9f8.wgsl.expected.spvasm
@@ -0,0 +1,81 @@
+; 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_8ed9f8 "textureStore_8ed9f8"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 3D 0 0 0 2 Rgba8
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %12 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v3uint = OpTypeVector %uint 3
+         %18 = OpConstantNull %v3uint
+%_ptr_Function_v3uint = OpTypePointer Function %v3uint
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+         %27 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureStore_8ed9f8 = OpFunction %void None %12
+         %15 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v3uint Function %18
+      %arg_2 = OpVariable %_ptr_Function_v4float Function %5
+               OpStore %arg_1 %18
+               OpStore %arg_2 %5
+         %24 = OpLoad %11 %arg_0
+         %25 = OpLoad %v3uint %arg_1
+         %26 = OpLoad %v4float %arg_2
+               OpImageWrite %24 %25 %26
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %27
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %textureStore_8ed9f8
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+         %32 = OpLabel
+         %33 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %33
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %textureStore_8ed9f8
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %12
+         %39 = OpLabel
+         %40 = OpFunctionCall %void %textureStore_8ed9f8
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/8ed9f8.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/8ed9f8.wgsl.expected.wgsl
new file mode 100644
index 0000000..b650269
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/8ed9f8.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(0) var arg_0 : texture_storage_3d<rgba8unorm, write>;
+
+fn textureStore_8ed9f8() {
+  var arg_1 = vec3<u32>();
+  var arg_2 = vec4<f32>();
+  textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_8ed9f8();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_8ed9f8();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_8ed9f8();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/958353.wgsl b/test/tint/builtins/gen/var/textureStore/958353.wgsl
new file mode 100644
index 0000000..6548f0e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/958353.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_1d<rgba8sint, write>;
+
+// fn textureStore(texture: texture_storage_1d<rgba8sint, write>, coords: u32, value: vec4<i32>)
+fn textureStore_958353() {
+  var arg_1 = 1u;
+  var arg_2 = vec4<i32>();
+  textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_958353();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_958353();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_958353();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/958353.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/958353.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..07fc6aa
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/958353.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture1D<int4> arg_0 : register(u0, space1);
+
+void textureStore_958353() {
+  uint arg_1 = 1u;
+  int4 arg_2 = (0).xxxx;
+  arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_958353();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_958353();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_958353();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/958353.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/958353.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..07fc6aa
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/958353.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture1D<int4> arg_0 : register(u0, space1);
+
+void textureStore_958353() {
+  uint arg_1 = 1u;
+  int4 arg_2 = (0).xxxx;
+  arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_958353();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_958353();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_958353();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/958353.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/958353.wgsl.expected.glsl
new file mode 100644
index 0000000..8de8517
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/958353.wgsl.expected.glsl
@@ -0,0 +1,84 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba8i) uniform highp writeonly iimage1D arg_0;
+void textureStore_958353() {
+  uint arg_1 = 1u;
+  ivec4 arg_2 = ivec4(0);
+  imageStore(arg_0, int(arg_1), arg_2);
+}
+
+vec4 vertex_main() {
+  textureStore_958353();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'iimage1D' : Reserved word. 
+WARNING: 0:3: 'layout' : useless application of layout qualifier 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+layout(rgba8i) uniform highp writeonly iimage1D arg_0;
+void textureStore_958353() {
+  uint arg_1 = 1u;
+  ivec4 arg_2 = ivec4(0);
+  imageStore(arg_0, int(arg_1), arg_2);
+}
+
+void fragment_main() {
+  textureStore_958353();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'iimage1D' : Reserved word. 
+WARNING: 0:4: 'layout' : useless application of layout qualifier 
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba8i) uniform highp writeonly iimage1D arg_0;
+void textureStore_958353() {
+  uint arg_1 = 1u;
+  ivec4 arg_2 = ivec4(0);
+  imageStore(arg_0, int(arg_1), arg_2);
+}
+
+void compute_main() {
+  textureStore_958353();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'iimage1D' : Reserved word. 
+WARNING: 0:3: 'layout' : useless application of layout qualifier 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureStore/958353.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/958353.wgsl.expected.msl
new file mode 100644
index 0000000..bad5668
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/958353.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_958353(texture1d<int, access::write> tint_symbol_1) {
+  uint arg_1 = 1u;
+  int4 arg_2 = int4(0);
+  tint_symbol_1.write(arg_2, uint(arg_1));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<int, access::write> tint_symbol_2) {
+  textureStore_958353(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<int, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<int, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureStore_958353(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture1d<int, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureStore_958353(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureStore/958353.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/958353.wgsl.expected.spvasm
new file mode 100644
index 0000000..bc99529
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/958353.wgsl.expected.spvasm
@@ -0,0 +1,85 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 44
+; Schema: 0
+               OpCapability Shader
+               OpCapability Image1D
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureStore_958353 "textureStore_958353"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 1D 0 0 0 2 Rgba8i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %21 = OpConstantNull %uint
+      %v4int = OpTypeVector %int 4
+         %23 = OpConstantNull %v4int
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+         %30 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureStore_958353 = OpFunction %void None %13
+         %16 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_uint Function %21
+      %arg_2 = OpVariable %_ptr_Function_v4int Function %23
+               OpStore %arg_1 %uint_1
+               OpStore %arg_2 %23
+         %27 = OpLoad %11 %arg_0
+         %28 = OpLoad %uint %arg_1
+         %29 = OpLoad %v4int %arg_2
+               OpImageWrite %27 %28 %29
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %30
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %textureStore_958353
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %35 = OpLabel
+         %36 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %36
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %39 = OpLabel
+         %40 = OpFunctionCall %void %textureStore_958353
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %42 = OpLabel
+         %43 = OpFunctionCall %void %textureStore_958353
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/958353.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/958353.wgsl.expected.wgsl
new file mode 100644
index 0000000..3da0474
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/958353.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(0) var arg_0 : texture_storage_1d<rgba8sint, write>;
+
+fn textureStore_958353() {
+  var arg_1 = 1u;
+  var arg_2 = vec4<i32>();
+  textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_958353();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_958353();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_958353();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/959d94.wgsl b/test/tint/builtins/gen/var/textureStore/959d94.wgsl
new file mode 100644
index 0000000..404fd19
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/959d94.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_1d<rgba8snorm, write>;
+
+// fn textureStore(texture: texture_storage_1d<rgba8snorm, write>, coords: u32, value: vec4<f32>)
+fn textureStore_959d94() {
+  var arg_1 = 1u;
+  var arg_2 = vec4<f32>();
+  textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_959d94();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_959d94();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_959d94();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/959d94.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/959d94.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..807d0de
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/959d94.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture1D<float4> arg_0 : register(u0, space1);
+
+void textureStore_959d94() {
+  uint arg_1 = 1u;
+  float4 arg_2 = (0.0f).xxxx;
+  arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_959d94();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_959d94();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_959d94();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/959d94.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/959d94.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..807d0de
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/959d94.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture1D<float4> arg_0 : register(u0, space1);
+
+void textureStore_959d94() {
+  uint arg_1 = 1u;
+  float4 arg_2 = (0.0f).xxxx;
+  arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_959d94();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_959d94();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_959d94();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/959d94.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/959d94.wgsl.expected.glsl
new file mode 100644
index 0000000..f625148
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/959d94.wgsl.expected.glsl
@@ -0,0 +1,84 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba8_snorm) uniform highp writeonly image1D arg_0;
+void textureStore_959d94() {
+  uint arg_1 = 1u;
+  vec4 arg_2 = vec4(0.0f);
+  imageStore(arg_0, int(arg_1), arg_2);
+}
+
+vec4 vertex_main() {
+  textureStore_959d94();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image1D' : Reserved word. 
+WARNING: 0:3: 'layout' : useless application of layout qualifier 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+layout(rgba8_snorm) uniform highp writeonly image1D arg_0;
+void textureStore_959d94() {
+  uint arg_1 = 1u;
+  vec4 arg_2 = vec4(0.0f);
+  imageStore(arg_0, int(arg_1), arg_2);
+}
+
+void fragment_main() {
+  textureStore_959d94();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'image1D' : Reserved word. 
+WARNING: 0:4: 'layout' : useless application of layout qualifier 
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba8_snorm) uniform highp writeonly image1D arg_0;
+void textureStore_959d94() {
+  uint arg_1 = 1u;
+  vec4 arg_2 = vec4(0.0f);
+  imageStore(arg_0, int(arg_1), arg_2);
+}
+
+void compute_main() {
+  textureStore_959d94();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image1D' : Reserved word. 
+WARNING: 0:3: 'layout' : useless application of layout qualifier 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureStore/959d94.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/959d94.wgsl.expected.msl
new file mode 100644
index 0000000..bd790af
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/959d94.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_959d94(texture1d<float, access::write> tint_symbol_1) {
+  uint arg_1 = 1u;
+  float4 arg_2 = float4(0.0f);
+  tint_symbol_1.write(arg_2, uint(arg_1));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<float, access::write> tint_symbol_2) {
+  textureStore_959d94(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<float, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<float, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureStore_959d94(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture1d<float, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureStore_959d94(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureStore/959d94.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/959d94.wgsl.expected.spvasm
new file mode 100644
index 0000000..33e3eab
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/959d94.wgsl.expected.spvasm
@@ -0,0 +1,82 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 41
+; Schema: 0
+               OpCapability Shader
+               OpCapability Image1D
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureStore_959d94 "textureStore_959d94"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 1D 0 0 0 2 Rgba8Snorm
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %12 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %20 = OpConstantNull %uint
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+         %27 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureStore_959d94 = OpFunction %void None %12
+         %15 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_uint Function %20
+      %arg_2 = OpVariable %_ptr_Function_v4float Function %5
+               OpStore %arg_1 %uint_1
+               OpStore %arg_2 %5
+         %24 = OpLoad %11 %arg_0
+         %25 = OpLoad %uint %arg_1
+         %26 = OpLoad %v4float %arg_2
+               OpImageWrite %24 %25 %26
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %27
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %textureStore_959d94
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+         %32 = OpLabel
+         %33 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %33
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %textureStore_959d94
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %12
+         %39 = OpLabel
+         %40 = OpFunctionCall %void %textureStore_959d94
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/959d94.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/959d94.wgsl.expected.wgsl
new file mode 100644
index 0000000..d9300eb
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/959d94.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(0) var arg_0 : texture_storage_1d<rgba8snorm, write>;
+
+fn textureStore_959d94() {
+  var arg_1 = 1u;
+  var arg_2 = vec4<f32>();
+  textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_959d94();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_959d94();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_959d94();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/95e452.wgsl b/test/tint/builtins/gen/var/textureStore/95e452.wgsl
new file mode 100644
index 0000000..0b1037d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/95e452.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d<r32sint, write>;
+
+// fn textureStore(texture: texture_storage_2d<r32sint, write>, coords: vec2<u32>, value: vec4<i32>)
+fn textureStore_95e452() {
+  var arg_1 = vec2<u32>();
+  var arg_2 = vec4<i32>();
+  textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_95e452();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_95e452();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_95e452();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/95e452.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/95e452.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..e602bae
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/95e452.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture2D<int4> arg_0 : register(u0, space1);
+
+void textureStore_95e452() {
+  uint2 arg_1 = (0u).xx;
+  int4 arg_2 = (0).xxxx;
+  arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_95e452();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_95e452();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_95e452();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/95e452.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/95e452.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..e602bae
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/95e452.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture2D<int4> arg_0 : register(u0, space1);
+
+void textureStore_95e452() {
+  uint2 arg_1 = (0u).xx;
+  int4 arg_2 = (0).xxxx;
+  arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_95e452();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_95e452();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_95e452();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/95e452.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/95e452.wgsl.expected.glsl
new file mode 100644
index 0000000..e25384d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/95e452.wgsl.expected.glsl
@@ -0,0 +1,58 @@
+#version 310 es
+
+layout(r32i) uniform highp writeonly iimage2D arg_0;
+void textureStore_95e452() {
+  uvec2 arg_1 = uvec2(0u);
+  ivec4 arg_2 = ivec4(0);
+  imageStore(arg_0, ivec2(arg_1), arg_2);
+}
+
+vec4 vertex_main() {
+  textureStore_95e452();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+layout(r32i) uniform highp writeonly iimage2D arg_0;
+void textureStore_95e452() {
+  uvec2 arg_1 = uvec2(0u);
+  ivec4 arg_2 = ivec4(0);
+  imageStore(arg_0, ivec2(arg_1), arg_2);
+}
+
+void fragment_main() {
+  textureStore_95e452();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+layout(r32i) uniform highp writeonly iimage2D arg_0;
+void textureStore_95e452() {
+  uvec2 arg_1 = uvec2(0u);
+  ivec4 arg_2 = ivec4(0);
+  imageStore(arg_0, ivec2(arg_1), arg_2);
+}
+
+void compute_main() {
+  textureStore_95e452();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/95e452.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/95e452.wgsl.expected.msl
new file mode 100644
index 0000000..ce3297b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/95e452.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_95e452(texture2d<int, access::write> tint_symbol_1) {
+  uint2 arg_1 = uint2(0u);
+  int4 arg_2 = int4(0);
+  tint_symbol_1.write(arg_2, uint2(arg_1));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<int, access::write> tint_symbol_2) {
+  textureStore_95e452(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<int, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<int, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureStore_95e452(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d<int, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureStore_95e452(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureStore/95e452.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/95e452.wgsl.expected.spvasm
new file mode 100644
index 0000000..1fd3674
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/95e452.wgsl.expected.spvasm
@@ -0,0 +1,84 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 44
+; 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_95e452 "textureStore_95e452"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 2D 0 0 0 2 R32i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+         %19 = OpConstantNull %v2uint
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+      %v4int = OpTypeVector %int 4
+         %23 = OpConstantNull %v4int
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+         %30 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureStore_95e452 = OpFunction %void None %13
+         %16 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v2uint Function %19
+      %arg_2 = OpVariable %_ptr_Function_v4int Function %23
+               OpStore %arg_1 %19
+               OpStore %arg_2 %23
+         %27 = OpLoad %11 %arg_0
+         %28 = OpLoad %v2uint %arg_1
+         %29 = OpLoad %v4int %arg_2
+               OpImageWrite %27 %28 %29
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %30
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %textureStore_95e452
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %35 = OpLabel
+         %36 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %36
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %39 = OpLabel
+         %40 = OpFunctionCall %void %textureStore_95e452
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %42 = OpLabel
+         %43 = OpFunctionCall %void %textureStore_95e452
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/95e452.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/95e452.wgsl.expected.wgsl
new file mode 100644
index 0000000..6eaf3fa
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/95e452.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d<r32sint, write>;
+
+fn textureStore_95e452() {
+  var arg_1 = vec2<u32>();
+  var arg_2 = vec4<i32>();
+  textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_95e452();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_95e452();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_95e452();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/9f5318.wgsl b/test/tint/builtins/gen/var/textureStore/9f5318.wgsl
new file mode 100644
index 0000000..46cfbcb
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/9f5318.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d<rg32sint, write>;
+
+// fn textureStore(texture: texture_storage_2d<rg32sint, write>, coords: vec2<u32>, value: vec4<i32>)
+fn textureStore_9f5318() {
+  var arg_1 = vec2<u32>();
+  var arg_2 = vec4<i32>();
+  textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_9f5318();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_9f5318();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_9f5318();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/9f5318.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/9f5318.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..68caac1
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/9f5318.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture2D<int4> arg_0 : register(u0, space1);
+
+void textureStore_9f5318() {
+  uint2 arg_1 = (0u).xx;
+  int4 arg_2 = (0).xxxx;
+  arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_9f5318();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_9f5318();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_9f5318();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/9f5318.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/9f5318.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..68caac1
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/9f5318.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture2D<int4> arg_0 : register(u0, space1);
+
+void textureStore_9f5318() {
+  uint2 arg_1 = (0u).xx;
+  int4 arg_2 = (0).xxxx;
+  arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_9f5318();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_9f5318();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_9f5318();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/9f5318.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/9f5318.wgsl.expected.glsl
new file mode 100644
index 0000000..7c24593
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/9f5318.wgsl.expected.glsl
@@ -0,0 +1,81 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rg32i) uniform highp writeonly iimage2D arg_0;
+void textureStore_9f5318() {
+  uvec2 arg_1 = uvec2(0u);
+  ivec4 arg_2 = ivec4(0);
+  imageStore(arg_0, ivec2(arg_1), arg_2);
+}
+
+vec4 vertex_main() {
+  textureStore_9f5318();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+layout(rg32i) uniform highp writeonly iimage2D arg_0;
+void textureStore_9f5318() {
+  uvec2 arg_1 = uvec2(0u);
+  ivec4 arg_2 = ivec4(0);
+  imageStore(arg_0, ivec2(arg_1), arg_2);
+}
+
+void fragment_main() {
+  textureStore_9f5318();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'image load-store format' : not supported with this profile: es
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rg32i) uniform highp writeonly iimage2D arg_0;
+void textureStore_9f5318() {
+  uvec2 arg_1 = uvec2(0u);
+  ivec4 arg_2 = ivec4(0);
+  imageStore(arg_0, ivec2(arg_1), arg_2);
+}
+
+void compute_main() {
+  textureStore_9f5318();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureStore/9f5318.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/9f5318.wgsl.expected.msl
new file mode 100644
index 0000000..190288b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/9f5318.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_9f5318(texture2d<int, access::write> tint_symbol_1) {
+  uint2 arg_1 = uint2(0u);
+  int4 arg_2 = int4(0);
+  tint_symbol_1.write(arg_2, uint2(arg_1));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<int, access::write> tint_symbol_2) {
+  textureStore_9f5318(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<int, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<int, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureStore_9f5318(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d<int, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureStore_9f5318(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureStore/9f5318.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/9f5318.wgsl.expected.spvasm
new file mode 100644
index 0000000..821ca97
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/9f5318.wgsl.expected.spvasm
@@ -0,0 +1,85 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 44
+; 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_9f5318 "textureStore_9f5318"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 2D 0 0 0 2 Rg32i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+         %19 = OpConstantNull %v2uint
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+      %v4int = OpTypeVector %int 4
+         %23 = OpConstantNull %v4int
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+         %30 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureStore_9f5318 = OpFunction %void None %13
+         %16 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v2uint Function %19
+      %arg_2 = OpVariable %_ptr_Function_v4int Function %23
+               OpStore %arg_1 %19
+               OpStore %arg_2 %23
+         %27 = OpLoad %11 %arg_0
+         %28 = OpLoad %v2uint %arg_1
+         %29 = OpLoad %v4int %arg_2
+               OpImageWrite %27 %28 %29
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %30
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %textureStore_9f5318
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %35 = OpLabel
+         %36 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %36
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %39 = OpLabel
+         %40 = OpFunctionCall %void %textureStore_9f5318
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %42 = OpLabel
+         %43 = OpFunctionCall %void %textureStore_9f5318
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/9f5318.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/9f5318.wgsl.expected.wgsl
new file mode 100644
index 0000000..1ab319c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/9f5318.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d<rg32sint, write>;
+
+fn textureStore_9f5318() {
+  var arg_1 = vec2<u32>();
+  var arg_2 = vec4<i32>();
+  textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_9f5318();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_9f5318();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_9f5318();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/a0f96e.wgsl b/test/tint/builtins/gen/var/textureStore/a0f96e.wgsl
new file mode 100644
index 0000000..7ff74cd
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/a0f96e.wgsl
@@ -0,0 +1,47 @@
+// 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: u32, value: vec4<f32>)
+fn textureStore_a0f96e() {
+  var arg_1 = vec2<u32>();
+  var arg_2 = 1u;
+  var arg_3 = vec4<f32>();
+  textureStore(arg_0, arg_1, arg_2, arg_3);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_a0f96e();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_a0f96e();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_a0f96e();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/a0f96e.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/a0f96e.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..97ab824
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/a0f96e.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+RWTexture2DArray<float4> arg_0 : register(u0, space1);
+
+void textureStore_a0f96e() {
+  uint2 arg_1 = (0u).xx;
+  uint arg_2 = 1u;
+  float4 arg_3 = (0.0f).xxxx;
+  arg_0[uint3(arg_1, arg_2)] = arg_3;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_a0f96e();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_a0f96e();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_a0f96e();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/a0f96e.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/a0f96e.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..97ab824
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/a0f96e.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+RWTexture2DArray<float4> arg_0 : register(u0, space1);
+
+void textureStore_a0f96e() {
+  uint2 arg_1 = (0u).xx;
+  uint arg_2 = 1u;
+  float4 arg_3 = (0.0f).xxxx;
+  arg_0[uint3(arg_1, arg_2)] = arg_3;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_a0f96e();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_a0f96e();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_a0f96e();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/a0f96e.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/a0f96e.wgsl.expected.glsl
new file mode 100644
index 0000000..276a6f9
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/a0f96e.wgsl.expected.glsl
@@ -0,0 +1,61 @@
+#version 310 es
+
+layout(rgba16f) uniform highp writeonly image2DArray arg_0;
+void textureStore_a0f96e() {
+  uvec2 arg_1 = uvec2(0u);
+  uint arg_2 = 1u;
+  vec4 arg_3 = vec4(0.0f);
+  imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3);
+}
+
+vec4 vertex_main() {
+  textureStore_a0f96e();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = 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_a0f96e() {
+  uvec2 arg_1 = uvec2(0u);
+  uint arg_2 = 1u;
+  vec4 arg_3 = vec4(0.0f);
+  imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3);
+}
+
+void fragment_main() {
+  textureStore_a0f96e();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+layout(rgba16f) uniform highp writeonly image2DArray arg_0;
+void textureStore_a0f96e() {
+  uvec2 arg_1 = uvec2(0u);
+  uint arg_2 = 1u;
+  vec4 arg_3 = vec4(0.0f);
+  imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3);
+}
+
+void compute_main() {
+  textureStore_a0f96e();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/a0f96e.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/a0f96e.wgsl.expected.msl
new file mode 100644
index 0000000..03c6f52
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/a0f96e.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_a0f96e(texture2d_array<float, access::write> tint_symbol_1) {
+  uint2 arg_1 = uint2(0u);
+  uint arg_2 = 1u;
+  float4 arg_3 = float4(0.0f);
+  tint_symbol_1.write(arg_3, uint2(arg_1), arg_2);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<float, access::write> tint_symbol_2) {
+  textureStore_a0f96e(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_a0f96e(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d_array<float, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureStore_a0f96e(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureStore/a0f96e.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/a0f96e.wgsl.expected.spvasm
new file mode 100644
index 0000000..5277c6c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/a0f96e.wgsl.expected.spvasm
@@ -0,0 +1,92 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 50
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureStore_a0f96e "textureStore_a0f96e"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %arg_3 "arg_3"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 1 0 2 Rgba16f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %12 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+         %18 = OpConstantNull %v2uint
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %24 = OpConstantNull %uint
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+     %v3uint = OpTypeVector %uint 3
+         %36 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureStore_a0f96e = OpFunction %void None %12
+         %15 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v2uint Function %18
+      %arg_2 = OpVariable %_ptr_Function_uint Function %24
+      %arg_3 = OpVariable %_ptr_Function_v4float Function %5
+               OpStore %arg_1 %18
+               OpStore %arg_2 %uint_1
+               OpStore %arg_3 %5
+         %28 = OpLoad %11 %arg_0
+         %30 = OpLoad %v2uint %arg_1
+         %31 = OpCompositeExtract %uint %30 0
+         %32 = OpCompositeExtract %uint %30 1
+         %33 = OpLoad %uint %arg_2
+         %34 = OpCompositeConstruct %v3uint %31 %32 %33
+         %35 = OpLoad %v4float %arg_3
+               OpImageWrite %28 %34 %35
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %36
+         %38 = OpLabel
+         %39 = OpFunctionCall %void %textureStore_a0f96e
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+         %41 = OpLabel
+         %42 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %42
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+         %45 = OpLabel
+         %46 = OpFunctionCall %void %textureStore_a0f96e
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %12
+         %48 = OpLabel
+         %49 = OpFunctionCall %void %textureStore_a0f96e
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/a0f96e.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/a0f96e.wgsl.expected.wgsl
new file mode 100644
index 0000000..d9babfe
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/a0f96e.wgsl.expected.wgsl
@@ -0,0 +1,24 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba16float, write>;
+
+fn textureStore_a0f96e() {
+  var arg_1 = vec2<u32>();
+  var arg_2 = 1u;
+  var arg_3 = vec4<f32>();
+  textureStore(arg_0, arg_1, arg_2, arg_3);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_a0f96e();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_a0f96e();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_a0f96e();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/a1352c.wgsl b/test/tint/builtins/gen/var/textureStore/a1352c.wgsl
new file mode 100644
index 0000000..d2c7483
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/a1352c.wgsl
@@ -0,0 +1,47 @@
+// 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: u32, value: vec4<i32>)
+fn textureStore_a1352c() {
+  var arg_1 = vec2<u32>();
+  var arg_2 = 1u;
+  var arg_3 = vec4<i32>();
+  textureStore(arg_0, arg_1, arg_2, arg_3);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_a1352c();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_a1352c();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_a1352c();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/a1352c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/a1352c.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..f9c5558
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/a1352c.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+RWTexture2DArray<int4> arg_0 : register(u0, space1);
+
+void textureStore_a1352c() {
+  uint2 arg_1 = (0u).xx;
+  uint arg_2 = 1u;
+  int4 arg_3 = (0).xxxx;
+  arg_0[uint3(arg_1, arg_2)] = arg_3;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_a1352c();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_a1352c();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_a1352c();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/a1352c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/a1352c.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..f9c5558
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/a1352c.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+RWTexture2DArray<int4> arg_0 : register(u0, space1);
+
+void textureStore_a1352c() {
+  uint2 arg_1 = (0u).xx;
+  uint arg_2 = 1u;
+  int4 arg_3 = (0).xxxx;
+  arg_0[uint3(arg_1, arg_2)] = arg_3;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_a1352c();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_a1352c();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_a1352c();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/a1352c.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/a1352c.wgsl.expected.glsl
new file mode 100644
index 0000000..8d0b050
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/a1352c.wgsl.expected.glsl
@@ -0,0 +1,61 @@
+#version 310 es
+
+layout(rgba8i) uniform highp writeonly iimage2DArray arg_0;
+void textureStore_a1352c() {
+  uvec2 arg_1 = uvec2(0u);
+  uint arg_2 = 1u;
+  ivec4 arg_3 = ivec4(0);
+  imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3);
+}
+
+vec4 vertex_main() {
+  textureStore_a1352c();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = 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_a1352c() {
+  uvec2 arg_1 = uvec2(0u);
+  uint arg_2 = 1u;
+  ivec4 arg_3 = ivec4(0);
+  imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3);
+}
+
+void fragment_main() {
+  textureStore_a1352c();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+layout(rgba8i) uniform highp writeonly iimage2DArray arg_0;
+void textureStore_a1352c() {
+  uvec2 arg_1 = uvec2(0u);
+  uint arg_2 = 1u;
+  ivec4 arg_3 = ivec4(0);
+  imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3);
+}
+
+void compute_main() {
+  textureStore_a1352c();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/a1352c.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/a1352c.wgsl.expected.msl
new file mode 100644
index 0000000..275794f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/a1352c.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_a1352c(texture2d_array<int, access::write> tint_symbol_1) {
+  uint2 arg_1 = uint2(0u);
+  uint arg_2 = 1u;
+  int4 arg_3 = int4(0);
+  tint_symbol_1.write(arg_3, uint2(arg_1), arg_2);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<int, access::write> tint_symbol_2) {
+  textureStore_a1352c(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_a1352c(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d_array<int, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureStore_a1352c(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureStore/a1352c.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/a1352c.wgsl.expected.spvasm
new file mode 100644
index 0000000..60d2114
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/a1352c.wgsl.expected.spvasm
@@ -0,0 +1,95 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 53
+; 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_a1352c "textureStore_a1352c"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %arg_3 "arg_3"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 2D 0 1 0 2 Rgba8i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+         %19 = OpConstantNull %v2uint
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %25 = OpConstantNull %uint
+      %v4int = OpTypeVector %int 4
+         %27 = OpConstantNull %v4int
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+     %v3uint = OpTypeVector %uint 3
+         %39 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureStore_a1352c = OpFunction %void None %13
+         %16 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v2uint Function %19
+      %arg_2 = OpVariable %_ptr_Function_uint Function %25
+      %arg_3 = OpVariable %_ptr_Function_v4int Function %27
+               OpStore %arg_1 %19
+               OpStore %arg_2 %uint_1
+               OpStore %arg_3 %27
+         %31 = OpLoad %11 %arg_0
+         %33 = OpLoad %v2uint %arg_1
+         %34 = OpCompositeExtract %uint %33 0
+         %35 = OpCompositeExtract %uint %33 1
+         %36 = OpLoad %uint %arg_2
+         %37 = OpCompositeConstruct %v3uint %34 %35 %36
+         %38 = OpLoad %v4int %arg_3
+               OpImageWrite %31 %37 %38
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %39
+         %41 = OpLabel
+         %42 = OpFunctionCall %void %textureStore_a1352c
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %44 = OpLabel
+         %45 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %45
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %48 = OpLabel
+         %49 = OpFunctionCall %void %textureStore_a1352c
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %51 = OpLabel
+         %52 = OpFunctionCall %void %textureStore_a1352c
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/a1352c.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/a1352c.wgsl.expected.wgsl
new file mode 100644
index 0000000..7132f14
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/a1352c.wgsl.expected.wgsl
@@ -0,0 +1,24 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba8sint, write>;
+
+fn textureStore_a1352c() {
+  var arg_1 = vec2<u32>();
+  var arg_2 = 1u;
+  var arg_3 = vec4<i32>();
+  textureStore(arg_0, arg_1, arg_2, arg_3);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_a1352c();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_a1352c();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_a1352c();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/a4c338.wgsl b/test/tint/builtins/gen/var/textureStore/a4c338.wgsl
new file mode 100644
index 0000000..ded9f8e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/a4c338.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_1d<rgba16float, write>;
+
+// fn textureStore(texture: texture_storage_1d<rgba16float, write>, coords: u32, value: vec4<f32>)
+fn textureStore_a4c338() {
+  var arg_1 = 1u;
+  var arg_2 = vec4<f32>();
+  textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_a4c338();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_a4c338();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_a4c338();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/a4c338.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/a4c338.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..fbaa791
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/a4c338.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture1D<float4> arg_0 : register(u0, space1);
+
+void textureStore_a4c338() {
+  uint arg_1 = 1u;
+  float4 arg_2 = (0.0f).xxxx;
+  arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_a4c338();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_a4c338();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_a4c338();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/a4c338.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/a4c338.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..fbaa791
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/a4c338.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture1D<float4> arg_0 : register(u0, space1);
+
+void textureStore_a4c338() {
+  uint arg_1 = 1u;
+  float4 arg_2 = (0.0f).xxxx;
+  arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_a4c338();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_a4c338();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_a4c338();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/a4c338.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/a4c338.wgsl.expected.glsl
new file mode 100644
index 0000000..61ce0ec
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/a4c338.wgsl.expected.glsl
@@ -0,0 +1,84 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba16f) uniform highp writeonly image1D arg_0;
+void textureStore_a4c338() {
+  uint arg_1 = 1u;
+  vec4 arg_2 = vec4(0.0f);
+  imageStore(arg_0, int(arg_1), arg_2);
+}
+
+vec4 vertex_main() {
+  textureStore_a4c338();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image1D' : Reserved word. 
+WARNING: 0:3: 'layout' : useless application of layout qualifier 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+layout(rgba16f) uniform highp writeonly image1D arg_0;
+void textureStore_a4c338() {
+  uint arg_1 = 1u;
+  vec4 arg_2 = vec4(0.0f);
+  imageStore(arg_0, int(arg_1), arg_2);
+}
+
+void fragment_main() {
+  textureStore_a4c338();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'image1D' : Reserved word. 
+WARNING: 0:4: 'layout' : useless application of layout qualifier 
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba16f) uniform highp writeonly image1D arg_0;
+void textureStore_a4c338() {
+  uint arg_1 = 1u;
+  vec4 arg_2 = vec4(0.0f);
+  imageStore(arg_0, int(arg_1), arg_2);
+}
+
+void compute_main() {
+  textureStore_a4c338();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image1D' : Reserved word. 
+WARNING: 0:3: 'layout' : useless application of layout qualifier 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureStore/a4c338.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/a4c338.wgsl.expected.msl
new file mode 100644
index 0000000..f4ae68c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/a4c338.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_a4c338(texture1d<float, access::write> tint_symbol_1) {
+  uint arg_1 = 1u;
+  float4 arg_2 = float4(0.0f);
+  tint_symbol_1.write(arg_2, uint(arg_1));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<float, access::write> tint_symbol_2) {
+  textureStore_a4c338(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<float, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<float, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureStore_a4c338(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture1d<float, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureStore_a4c338(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureStore/a4c338.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/a4c338.wgsl.expected.spvasm
new file mode 100644
index 0000000..3ff8ca1
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/a4c338.wgsl.expected.spvasm
@@ -0,0 +1,82 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 41
+; Schema: 0
+               OpCapability Shader
+               OpCapability Image1D
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureStore_a4c338 "textureStore_a4c338"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 1D 0 0 0 2 Rgba16f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %12 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %20 = OpConstantNull %uint
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+         %27 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureStore_a4c338 = OpFunction %void None %12
+         %15 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_uint Function %20
+      %arg_2 = OpVariable %_ptr_Function_v4float Function %5
+               OpStore %arg_1 %uint_1
+               OpStore %arg_2 %5
+         %24 = OpLoad %11 %arg_0
+         %25 = OpLoad %uint %arg_1
+         %26 = OpLoad %v4float %arg_2
+               OpImageWrite %24 %25 %26
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %27
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %textureStore_a4c338
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+         %32 = OpLabel
+         %33 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %33
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %textureStore_a4c338
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %12
+         %39 = OpLabel
+         %40 = OpFunctionCall %void %textureStore_a4c338
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/a4c338.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/a4c338.wgsl.expected.wgsl
new file mode 100644
index 0000000..49ef550
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/a4c338.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(0) var arg_0 : texture_storage_1d<rgba16float, write>;
+
+fn textureStore_a4c338() {
+  var arg_1 = 1u;
+  var arg_2 = vec4<f32>();
+  textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_a4c338();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_a4c338();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_a4c338();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/a5e80d.wgsl b/test/tint/builtins/gen/var/textureStore/a5e80d.wgsl
new file mode 100644
index 0000000..34851f6
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/a5e80d.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_3d<rgba32float, write>;
+
+// fn textureStore(texture: texture_storage_3d<rgba32float, write>, coords: vec3<u32>, value: vec4<f32>)
+fn textureStore_a5e80d() {
+  var arg_1 = vec3<u32>();
+  var arg_2 = vec4<f32>();
+  textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_a5e80d();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_a5e80d();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_a5e80d();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/a5e80d.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/a5e80d.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..89f734c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/a5e80d.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture3D<float4> arg_0 : register(u0, space1);
+
+void textureStore_a5e80d() {
+  uint3 arg_1 = (0u).xxx;
+  float4 arg_2 = (0.0f).xxxx;
+  arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_a5e80d();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_a5e80d();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_a5e80d();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/a5e80d.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/a5e80d.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..89f734c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/a5e80d.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture3D<float4> arg_0 : register(u0, space1);
+
+void textureStore_a5e80d() {
+  uint3 arg_1 = (0u).xxx;
+  float4 arg_2 = (0.0f).xxxx;
+  arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_a5e80d();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_a5e80d();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_a5e80d();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/a5e80d.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/a5e80d.wgsl.expected.glsl
new file mode 100644
index 0000000..0bf3507
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/a5e80d.wgsl.expected.glsl
@@ -0,0 +1,58 @@
+#version 310 es
+
+layout(rgba32f) uniform highp writeonly image3D arg_0;
+void textureStore_a5e80d() {
+  uvec3 arg_1 = uvec3(0u);
+  vec4 arg_2 = vec4(0.0f);
+  imageStore(arg_0, ivec3(arg_1), arg_2);
+}
+
+vec4 vertex_main() {
+  textureStore_a5e80d();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+layout(rgba32f) uniform highp writeonly image3D arg_0;
+void textureStore_a5e80d() {
+  uvec3 arg_1 = uvec3(0u);
+  vec4 arg_2 = vec4(0.0f);
+  imageStore(arg_0, ivec3(arg_1), arg_2);
+}
+
+void fragment_main() {
+  textureStore_a5e80d();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+layout(rgba32f) uniform highp writeonly image3D arg_0;
+void textureStore_a5e80d() {
+  uvec3 arg_1 = uvec3(0u);
+  vec4 arg_2 = vec4(0.0f);
+  imageStore(arg_0, ivec3(arg_1), arg_2);
+}
+
+void compute_main() {
+  textureStore_a5e80d();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/a5e80d.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/a5e80d.wgsl.expected.msl
new file mode 100644
index 0000000..09345d4
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/a5e80d.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_a5e80d(texture3d<float, access::write> tint_symbol_1) {
+  uint3 arg_1 = uint3(0u);
+  float4 arg_2 = float4(0.0f);
+  tint_symbol_1.write(arg_2, uint3(arg_1));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<float, access::write> tint_symbol_2) {
+  textureStore_a5e80d(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<float, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture3d<float, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureStore_a5e80d(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture3d<float, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureStore_a5e80d(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureStore/a5e80d.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/a5e80d.wgsl.expected.spvasm
new file mode 100644
index 0000000..fc7f43e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/a5e80d.wgsl.expected.spvasm
@@ -0,0 +1,81 @@
+; 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_a5e80d "textureStore_a5e80d"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 3D 0 0 0 2 Rgba32f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %12 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v3uint = OpTypeVector %uint 3
+         %18 = OpConstantNull %v3uint
+%_ptr_Function_v3uint = OpTypePointer Function %v3uint
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+         %27 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureStore_a5e80d = OpFunction %void None %12
+         %15 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v3uint Function %18
+      %arg_2 = OpVariable %_ptr_Function_v4float Function %5
+               OpStore %arg_1 %18
+               OpStore %arg_2 %5
+         %24 = OpLoad %11 %arg_0
+         %25 = OpLoad %v3uint %arg_1
+         %26 = OpLoad %v4float %arg_2
+               OpImageWrite %24 %25 %26
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %27
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %textureStore_a5e80d
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+         %32 = OpLabel
+         %33 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %33
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %textureStore_a5e80d
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %12
+         %39 = OpLabel
+         %40 = OpFunctionCall %void %textureStore_a5e80d
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/a5e80d.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/a5e80d.wgsl.expected.wgsl
new file mode 100644
index 0000000..3976579
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/a5e80d.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(0) var arg_0 : texture_storage_3d<rgba32float, write>;
+
+fn textureStore_a5e80d() {
+  var arg_1 = vec3<u32>();
+  var arg_2 = vec4<f32>();
+  textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_a5e80d();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_a5e80d();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_a5e80d();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/a6e78f.wgsl b/test/tint/builtins/gen/var/textureStore/a6e78f.wgsl
new file mode 100644
index 0000000..ee01fa7
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/a6e78f.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_1d<r32uint, write>;
+
+// fn textureStore(texture: texture_storage_1d<r32uint, write>, coords: u32, value: vec4<u32>)
+fn textureStore_a6e78f() {
+  var arg_1 = 1u;
+  var arg_2 = vec4<u32>();
+  textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_a6e78f();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_a6e78f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_a6e78f();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/a6e78f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/a6e78f.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..1bcd821
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/a6e78f.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture1D<uint4> arg_0 : register(u0, space1);
+
+void textureStore_a6e78f() {
+  uint arg_1 = 1u;
+  uint4 arg_2 = (0u).xxxx;
+  arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_a6e78f();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_a6e78f();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_a6e78f();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/a6e78f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/a6e78f.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..1bcd821
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/a6e78f.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture1D<uint4> arg_0 : register(u0, space1);
+
+void textureStore_a6e78f() {
+  uint arg_1 = 1u;
+  uint4 arg_2 = (0u).xxxx;
+  arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_a6e78f();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_a6e78f();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_a6e78f();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/a6e78f.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/a6e78f.wgsl.expected.glsl
new file mode 100644
index 0000000..aa2d146
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/a6e78f.wgsl.expected.glsl
@@ -0,0 +1,84 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(r32ui) uniform highp writeonly uimage1D arg_0;
+void textureStore_a6e78f() {
+  uint arg_1 = 1u;
+  uvec4 arg_2 = uvec4(0u);
+  imageStore(arg_0, int(arg_1), arg_2);
+}
+
+vec4 vertex_main() {
+  textureStore_a6e78f();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'uimage1D' : Reserved word. 
+WARNING: 0:3: 'layout' : useless application of layout qualifier 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+layout(r32ui) uniform highp writeonly uimage1D arg_0;
+void textureStore_a6e78f() {
+  uint arg_1 = 1u;
+  uvec4 arg_2 = uvec4(0u);
+  imageStore(arg_0, int(arg_1), arg_2);
+}
+
+void fragment_main() {
+  textureStore_a6e78f();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'uimage1D' : Reserved word. 
+WARNING: 0:4: 'layout' : useless application of layout qualifier 
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(r32ui) uniform highp writeonly uimage1D arg_0;
+void textureStore_a6e78f() {
+  uint arg_1 = 1u;
+  uvec4 arg_2 = uvec4(0u);
+  imageStore(arg_0, int(arg_1), arg_2);
+}
+
+void compute_main() {
+  textureStore_a6e78f();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'uimage1D' : Reserved word. 
+WARNING: 0:3: 'layout' : useless application of layout qualifier 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureStore/a6e78f.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/a6e78f.wgsl.expected.msl
new file mode 100644
index 0000000..c8eae4c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/a6e78f.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_a6e78f(texture1d<uint, access::write> tint_symbol_1) {
+  uint arg_1 = 1u;
+  uint4 arg_2 = uint4(0u);
+  tint_symbol_1.write(arg_2, uint(arg_1));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<uint, access::write> tint_symbol_2) {
+  textureStore_a6e78f(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<uint, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<uint, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureStore_a6e78f(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture1d<uint, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureStore_a6e78f(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureStore/a6e78f.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/a6e78f.wgsl.expected.spvasm
new file mode 100644
index 0000000..8799481
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/a6e78f.wgsl.expected.spvasm
@@ -0,0 +1,84 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 43
+; Schema: 0
+               OpCapability Shader
+               OpCapability Image1D
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureStore_a6e78f "textureStore_a6e78f"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 1D 0 0 0 2 R32ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %20 = OpConstantNull %uint
+     %v4uint = OpTypeVector %uint 4
+         %22 = OpConstantNull %v4uint
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+         %29 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureStore_a6e78f = OpFunction %void None %13
+         %16 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_uint Function %20
+      %arg_2 = OpVariable %_ptr_Function_v4uint Function %22
+               OpStore %arg_1 %uint_1
+               OpStore %arg_2 %22
+         %26 = OpLoad %11 %arg_0
+         %27 = OpLoad %uint %arg_1
+         %28 = OpLoad %v4uint %arg_2
+               OpImageWrite %26 %27 %28
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %29
+         %31 = OpLabel
+         %32 = OpFunctionCall %void %textureStore_a6e78f
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %34 = OpLabel
+         %35 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %35
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %38 = OpLabel
+         %39 = OpFunctionCall %void %textureStore_a6e78f
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %41 = OpLabel
+         %42 = OpFunctionCall %void %textureStore_a6e78f
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/a6e78f.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/a6e78f.wgsl.expected.wgsl
new file mode 100644
index 0000000..5c8eedc
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/a6e78f.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(0) var arg_0 : texture_storage_1d<r32uint, write>;
+
+fn textureStore_a6e78f() {
+  var arg_1 = 1u;
+  var arg_2 = vec4<u32>();
+  textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_a6e78f();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_a6e78f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_a6e78f();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/a9426c.wgsl b/test/tint/builtins/gen/var/textureStore/a9426c.wgsl
new file mode 100644
index 0000000..0613670
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/a9426c.wgsl
@@ -0,0 +1,47 @@
+// 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: u32, value: vec4<u32>)
+fn textureStore_a9426c() {
+  var arg_1 = vec2<u32>();
+  var arg_2 = 1u;
+  var arg_3 = vec4<u32>();
+  textureStore(arg_0, arg_1, arg_2, arg_3);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_a9426c();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_a9426c();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_a9426c();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/a9426c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/a9426c.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..d8b282f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/a9426c.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+RWTexture2DArray<uint4> arg_0 : register(u0, space1);
+
+void textureStore_a9426c() {
+  uint2 arg_1 = (0u).xx;
+  uint arg_2 = 1u;
+  uint4 arg_3 = (0u).xxxx;
+  arg_0[uint3(arg_1, arg_2)] = arg_3;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_a9426c();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_a9426c();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_a9426c();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/a9426c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/a9426c.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..d8b282f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/a9426c.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+RWTexture2DArray<uint4> arg_0 : register(u0, space1);
+
+void textureStore_a9426c() {
+  uint2 arg_1 = (0u).xx;
+  uint arg_2 = 1u;
+  uint4 arg_3 = (0u).xxxx;
+  arg_0[uint3(arg_1, arg_2)] = arg_3;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_a9426c();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_a9426c();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_a9426c();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/a9426c.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/a9426c.wgsl.expected.glsl
new file mode 100644
index 0000000..8289c23
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/a9426c.wgsl.expected.glsl
@@ -0,0 +1,61 @@
+#version 310 es
+
+layout(rgba32ui) uniform highp writeonly uimage2DArray arg_0;
+void textureStore_a9426c() {
+  uvec2 arg_1 = uvec2(0u);
+  uint arg_2 = 1u;
+  uvec4 arg_3 = uvec4(0u);
+  imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3);
+}
+
+vec4 vertex_main() {
+  textureStore_a9426c();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = 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_a9426c() {
+  uvec2 arg_1 = uvec2(0u);
+  uint arg_2 = 1u;
+  uvec4 arg_3 = uvec4(0u);
+  imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3);
+}
+
+void fragment_main() {
+  textureStore_a9426c();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+layout(rgba32ui) uniform highp writeonly uimage2DArray arg_0;
+void textureStore_a9426c() {
+  uvec2 arg_1 = uvec2(0u);
+  uint arg_2 = 1u;
+  uvec4 arg_3 = uvec4(0u);
+  imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3);
+}
+
+void compute_main() {
+  textureStore_a9426c();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/a9426c.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/a9426c.wgsl.expected.msl
new file mode 100644
index 0000000..d04e4a7
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/a9426c.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_a9426c(texture2d_array<uint, access::write> tint_symbol_1) {
+  uint2 arg_1 = uint2(0u);
+  uint arg_2 = 1u;
+  uint4 arg_3 = uint4(0u);
+  tint_symbol_1.write(arg_3, uint2(arg_1), arg_2);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<uint, access::write> tint_symbol_2) {
+  textureStore_a9426c(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_a9426c(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d_array<uint, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureStore_a9426c(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureStore/a9426c.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/a9426c.wgsl.expected.spvasm
new file mode 100644
index 0000000..51c831c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/a9426c.wgsl.expected.spvasm
@@ -0,0 +1,94 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 52
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureStore_a9426c "textureStore_a9426c"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %arg_3 "arg_3"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 2D 0 1 0 2 Rgba32ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+     %v2uint = OpTypeVector %uint 2
+         %18 = OpConstantNull %v2uint
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %24 = OpConstantNull %uint
+     %v4uint = OpTypeVector %uint 4
+         %26 = OpConstantNull %v4uint
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+     %v3uint = OpTypeVector %uint 3
+         %38 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureStore_a9426c = OpFunction %void None %13
+         %16 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v2uint Function %18
+      %arg_2 = OpVariable %_ptr_Function_uint Function %24
+      %arg_3 = OpVariable %_ptr_Function_v4uint Function %26
+               OpStore %arg_1 %18
+               OpStore %arg_2 %uint_1
+               OpStore %arg_3 %26
+         %30 = OpLoad %11 %arg_0
+         %32 = OpLoad %v2uint %arg_1
+         %33 = OpCompositeExtract %uint %32 0
+         %34 = OpCompositeExtract %uint %32 1
+         %35 = OpLoad %uint %arg_2
+         %36 = OpCompositeConstruct %v3uint %33 %34 %35
+         %37 = OpLoad %v4uint %arg_3
+               OpImageWrite %30 %36 %37
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %38
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %textureStore_a9426c
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %43 = OpLabel
+         %44 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %44
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %47 = OpLabel
+         %48 = OpFunctionCall %void %textureStore_a9426c
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %50 = OpLabel
+         %51 = OpFunctionCall %void %textureStore_a9426c
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/a9426c.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/a9426c.wgsl.expected.wgsl
new file mode 100644
index 0000000..32f329d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/a9426c.wgsl.expected.wgsl
@@ -0,0 +1,24 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba32uint, write>;
+
+fn textureStore_a9426c() {
+  var arg_1 = vec2<u32>();
+  var arg_2 = 1u;
+  var arg_3 = vec4<u32>();
+  textureStore(arg_0, arg_1, arg_2, arg_3);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_a9426c();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_a9426c();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_a9426c();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/aeb38a.wgsl b/test/tint/builtins/gen/var/textureStore/aeb38a.wgsl
new file mode 100644
index 0000000..30430d6
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/aeb38a.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d<rgba32uint, write>;
+
+// fn textureStore(texture: texture_storage_2d<rgba32uint, write>, coords: vec2<u32>, value: vec4<u32>)
+fn textureStore_aeb38a() {
+  var arg_1 = vec2<u32>();
+  var arg_2 = vec4<u32>();
+  textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_aeb38a();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_aeb38a();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_aeb38a();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/aeb38a.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/aeb38a.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..66013e5
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/aeb38a.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture2D<uint4> arg_0 : register(u0, space1);
+
+void textureStore_aeb38a() {
+  uint2 arg_1 = (0u).xx;
+  uint4 arg_2 = (0u).xxxx;
+  arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_aeb38a();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_aeb38a();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_aeb38a();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/aeb38a.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/aeb38a.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..66013e5
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/aeb38a.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture2D<uint4> arg_0 : register(u0, space1);
+
+void textureStore_aeb38a() {
+  uint2 arg_1 = (0u).xx;
+  uint4 arg_2 = (0u).xxxx;
+  arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_aeb38a();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_aeb38a();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_aeb38a();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/aeb38a.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/aeb38a.wgsl.expected.glsl
new file mode 100644
index 0000000..adbba2a
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/aeb38a.wgsl.expected.glsl
@@ -0,0 +1,58 @@
+#version 310 es
+
+layout(rgba32ui) uniform highp writeonly uimage2D arg_0;
+void textureStore_aeb38a() {
+  uvec2 arg_1 = uvec2(0u);
+  uvec4 arg_2 = uvec4(0u);
+  imageStore(arg_0, ivec2(arg_1), arg_2);
+}
+
+vec4 vertex_main() {
+  textureStore_aeb38a();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+layout(rgba32ui) uniform highp writeonly uimage2D arg_0;
+void textureStore_aeb38a() {
+  uvec2 arg_1 = uvec2(0u);
+  uvec4 arg_2 = uvec4(0u);
+  imageStore(arg_0, ivec2(arg_1), arg_2);
+}
+
+void fragment_main() {
+  textureStore_aeb38a();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+layout(rgba32ui) uniform highp writeonly uimage2D arg_0;
+void textureStore_aeb38a() {
+  uvec2 arg_1 = uvec2(0u);
+  uvec4 arg_2 = uvec4(0u);
+  imageStore(arg_0, ivec2(arg_1), arg_2);
+}
+
+void compute_main() {
+  textureStore_aeb38a();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/aeb38a.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/aeb38a.wgsl.expected.msl
new file mode 100644
index 0000000..d8e7b55
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/aeb38a.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_aeb38a(texture2d<uint, access::write> tint_symbol_1) {
+  uint2 arg_1 = uint2(0u);
+  uint4 arg_2 = uint4(0u);
+  tint_symbol_1.write(arg_2, uint2(arg_1));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<uint, access::write> tint_symbol_2) {
+  textureStore_aeb38a(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<uint, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<uint, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureStore_aeb38a(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d<uint, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureStore_aeb38a(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureStore/aeb38a.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/aeb38a.wgsl.expected.spvasm
new file mode 100644
index 0000000..5e539c6
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/aeb38a.wgsl.expected.spvasm
@@ -0,0 +1,83 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 43
+; 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_aeb38a "textureStore_aeb38a"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 2D 0 0 0 2 Rgba32ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+     %v2uint = OpTypeVector %uint 2
+         %18 = OpConstantNull %v2uint
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+     %v4uint = OpTypeVector %uint 4
+         %22 = OpConstantNull %v4uint
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+         %29 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureStore_aeb38a = OpFunction %void None %13
+         %16 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v2uint Function %18
+      %arg_2 = OpVariable %_ptr_Function_v4uint Function %22
+               OpStore %arg_1 %18
+               OpStore %arg_2 %22
+         %26 = OpLoad %11 %arg_0
+         %27 = OpLoad %v2uint %arg_1
+         %28 = OpLoad %v4uint %arg_2
+               OpImageWrite %26 %27 %28
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %29
+         %31 = OpLabel
+         %32 = OpFunctionCall %void %textureStore_aeb38a
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %34 = OpLabel
+         %35 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %35
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %38 = OpLabel
+         %39 = OpFunctionCall %void %textureStore_aeb38a
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %41 = OpLabel
+         %42 = OpFunctionCall %void %textureStore_aeb38a
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/aeb38a.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/aeb38a.wgsl.expected.wgsl
new file mode 100644
index 0000000..588457c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/aeb38a.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d<rgba32uint, write>;
+
+fn textureStore_aeb38a() {
+  var arg_1 = vec2<u32>();
+  var arg_2 = vec4<u32>();
+  textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_aeb38a();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_aeb38a();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_aeb38a();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/b42fd3.wgsl b/test/tint/builtins/gen/var/textureStore/b42fd3.wgsl
new file mode 100644
index 0000000..68a682b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/b42fd3.wgsl
@@ -0,0 +1,47 @@
+// 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: u32, value: vec4<u32>)
+fn textureStore_b42fd3() {
+  var arg_1 = vec2<u32>();
+  var arg_2 = 1u;
+  var arg_3 = vec4<u32>();
+  textureStore(arg_0, arg_1, arg_2, arg_3);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_b42fd3();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_b42fd3();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_b42fd3();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/b42fd3.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/b42fd3.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..9088ca1
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/b42fd3.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+RWTexture2DArray<uint4> arg_0 : register(u0, space1);
+
+void textureStore_b42fd3() {
+  uint2 arg_1 = (0u).xx;
+  uint arg_2 = 1u;
+  uint4 arg_3 = (0u).xxxx;
+  arg_0[uint3(arg_1, arg_2)] = arg_3;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_b42fd3();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_b42fd3();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_b42fd3();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/b42fd3.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/b42fd3.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..9088ca1
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/b42fd3.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+RWTexture2DArray<uint4> arg_0 : register(u0, space1);
+
+void textureStore_b42fd3() {
+  uint2 arg_1 = (0u).xx;
+  uint arg_2 = 1u;
+  uint4 arg_3 = (0u).xxxx;
+  arg_0[uint3(arg_1, arg_2)] = arg_3;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_b42fd3();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_b42fd3();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_b42fd3();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/b42fd3.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/b42fd3.wgsl.expected.glsl
new file mode 100644
index 0000000..55586e2
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/b42fd3.wgsl.expected.glsl
@@ -0,0 +1,61 @@
+#version 310 es
+
+layout(rgba8ui) uniform highp writeonly uimage2DArray arg_0;
+void textureStore_b42fd3() {
+  uvec2 arg_1 = uvec2(0u);
+  uint arg_2 = 1u;
+  uvec4 arg_3 = uvec4(0u);
+  imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3);
+}
+
+vec4 vertex_main() {
+  textureStore_b42fd3();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = 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_b42fd3() {
+  uvec2 arg_1 = uvec2(0u);
+  uint arg_2 = 1u;
+  uvec4 arg_3 = uvec4(0u);
+  imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3);
+}
+
+void fragment_main() {
+  textureStore_b42fd3();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+layout(rgba8ui) uniform highp writeonly uimage2DArray arg_0;
+void textureStore_b42fd3() {
+  uvec2 arg_1 = uvec2(0u);
+  uint arg_2 = 1u;
+  uvec4 arg_3 = uvec4(0u);
+  imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3);
+}
+
+void compute_main() {
+  textureStore_b42fd3();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/b42fd3.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/b42fd3.wgsl.expected.msl
new file mode 100644
index 0000000..9896b03
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/b42fd3.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_b42fd3(texture2d_array<uint, access::write> tint_symbol_1) {
+  uint2 arg_1 = uint2(0u);
+  uint arg_2 = 1u;
+  uint4 arg_3 = uint4(0u);
+  tint_symbol_1.write(arg_3, uint2(arg_1), arg_2);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<uint, access::write> tint_symbol_2) {
+  textureStore_b42fd3(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_b42fd3(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d_array<uint, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureStore_b42fd3(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureStore/b42fd3.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/b42fd3.wgsl.expected.spvasm
new file mode 100644
index 0000000..9e42c7c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/b42fd3.wgsl.expected.spvasm
@@ -0,0 +1,94 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 52
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureStore_b42fd3 "textureStore_b42fd3"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %arg_3 "arg_3"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 2D 0 1 0 2 Rgba8ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+     %v2uint = OpTypeVector %uint 2
+         %18 = OpConstantNull %v2uint
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %24 = OpConstantNull %uint
+     %v4uint = OpTypeVector %uint 4
+         %26 = OpConstantNull %v4uint
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+     %v3uint = OpTypeVector %uint 3
+         %38 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureStore_b42fd3 = OpFunction %void None %13
+         %16 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v2uint Function %18
+      %arg_2 = OpVariable %_ptr_Function_uint Function %24
+      %arg_3 = OpVariable %_ptr_Function_v4uint Function %26
+               OpStore %arg_1 %18
+               OpStore %arg_2 %uint_1
+               OpStore %arg_3 %26
+         %30 = OpLoad %11 %arg_0
+         %32 = OpLoad %v2uint %arg_1
+         %33 = OpCompositeExtract %uint %32 0
+         %34 = OpCompositeExtract %uint %32 1
+         %35 = OpLoad %uint %arg_2
+         %36 = OpCompositeConstruct %v3uint %33 %34 %35
+         %37 = OpLoad %v4uint %arg_3
+               OpImageWrite %30 %36 %37
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %38
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %textureStore_b42fd3
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %43 = OpLabel
+         %44 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %44
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %47 = OpLabel
+         %48 = OpFunctionCall %void %textureStore_b42fd3
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %50 = OpLabel
+         %51 = OpFunctionCall %void %textureStore_b42fd3
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/b42fd3.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/b42fd3.wgsl.expected.wgsl
new file mode 100644
index 0000000..d150b77
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/b42fd3.wgsl.expected.wgsl
@@ -0,0 +1,24 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba8uint, write>;
+
+fn textureStore_b42fd3() {
+  var arg_1 = vec2<u32>();
+  var arg_2 = 1u;
+  var arg_3 = vec4<u32>();
+  textureStore(arg_0, arg_1, arg_2, arg_3);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_b42fd3();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_b42fd3();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_b42fd3();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/b70ded.wgsl b/test/tint/builtins/gen/var/textureStore/b70ded.wgsl
new file mode 100644
index 0000000..ece1d5f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/b70ded.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_1d<rgba16uint, write>;
+
+// fn textureStore(texture: texture_storage_1d<rgba16uint, write>, coords: u32, value: vec4<u32>)
+fn textureStore_b70ded() {
+  var arg_1 = 1u;
+  var arg_2 = vec4<u32>();
+  textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_b70ded();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_b70ded();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_b70ded();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/b70ded.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/b70ded.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..d754d63
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/b70ded.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture1D<uint4> arg_0 : register(u0, space1);
+
+void textureStore_b70ded() {
+  uint arg_1 = 1u;
+  uint4 arg_2 = (0u).xxxx;
+  arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_b70ded();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_b70ded();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_b70ded();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/b70ded.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/b70ded.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..d754d63
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/b70ded.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture1D<uint4> arg_0 : register(u0, space1);
+
+void textureStore_b70ded() {
+  uint arg_1 = 1u;
+  uint4 arg_2 = (0u).xxxx;
+  arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_b70ded();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_b70ded();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_b70ded();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/b70ded.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/b70ded.wgsl.expected.glsl
new file mode 100644
index 0000000..75601c2
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/b70ded.wgsl.expected.glsl
@@ -0,0 +1,84 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba16ui) uniform highp writeonly uimage1D arg_0;
+void textureStore_b70ded() {
+  uint arg_1 = 1u;
+  uvec4 arg_2 = uvec4(0u);
+  imageStore(arg_0, int(arg_1), arg_2);
+}
+
+vec4 vertex_main() {
+  textureStore_b70ded();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'uimage1D' : Reserved word. 
+WARNING: 0:3: 'layout' : useless application of layout qualifier 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+layout(rgba16ui) uniform highp writeonly uimage1D arg_0;
+void textureStore_b70ded() {
+  uint arg_1 = 1u;
+  uvec4 arg_2 = uvec4(0u);
+  imageStore(arg_0, int(arg_1), arg_2);
+}
+
+void fragment_main() {
+  textureStore_b70ded();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'uimage1D' : Reserved word. 
+WARNING: 0:4: 'layout' : useless application of layout qualifier 
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba16ui) uniform highp writeonly uimage1D arg_0;
+void textureStore_b70ded() {
+  uint arg_1 = 1u;
+  uvec4 arg_2 = uvec4(0u);
+  imageStore(arg_0, int(arg_1), arg_2);
+}
+
+void compute_main() {
+  textureStore_b70ded();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'uimage1D' : Reserved word. 
+WARNING: 0:3: 'layout' : useless application of layout qualifier 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureStore/b70ded.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/b70ded.wgsl.expected.msl
new file mode 100644
index 0000000..3a431a5
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/b70ded.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_b70ded(texture1d<uint, access::write> tint_symbol_1) {
+  uint arg_1 = 1u;
+  uint4 arg_2 = uint4(0u);
+  tint_symbol_1.write(arg_2, uint(arg_1));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<uint, access::write> tint_symbol_2) {
+  textureStore_b70ded(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<uint, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<uint, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureStore_b70ded(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture1d<uint, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureStore_b70ded(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureStore/b70ded.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/b70ded.wgsl.expected.spvasm
new file mode 100644
index 0000000..a62ffee
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/b70ded.wgsl.expected.spvasm
@@ -0,0 +1,84 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 43
+; Schema: 0
+               OpCapability Shader
+               OpCapability Image1D
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureStore_b70ded "textureStore_b70ded"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 1D 0 0 0 2 Rgba16ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %20 = OpConstantNull %uint
+     %v4uint = OpTypeVector %uint 4
+         %22 = OpConstantNull %v4uint
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+         %29 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureStore_b70ded = OpFunction %void None %13
+         %16 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_uint Function %20
+      %arg_2 = OpVariable %_ptr_Function_v4uint Function %22
+               OpStore %arg_1 %uint_1
+               OpStore %arg_2 %22
+         %26 = OpLoad %11 %arg_0
+         %27 = OpLoad %uint %arg_1
+         %28 = OpLoad %v4uint %arg_2
+               OpImageWrite %26 %27 %28
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %29
+         %31 = OpLabel
+         %32 = OpFunctionCall %void %textureStore_b70ded
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %34 = OpLabel
+         %35 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %35
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %38 = OpLabel
+         %39 = OpFunctionCall %void %textureStore_b70ded
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %41 = OpLabel
+         %42 = OpFunctionCall %void %textureStore_b70ded
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/b70ded.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/b70ded.wgsl.expected.wgsl
new file mode 100644
index 0000000..890424d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/b70ded.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(0) var arg_0 : texture_storage_1d<rgba16uint, write>;
+
+fn textureStore_b70ded() {
+  var arg_1 = 1u;
+  var arg_2 = vec4<u32>();
+  textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_b70ded();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_b70ded();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_b70ded();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/b76ff3.wgsl b/test/tint/builtins/gen/var/textureStore/b76ff3.wgsl
new file mode 100644
index 0000000..7384312
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/b76ff3.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d<rgba16sint, write>;
+
+// fn textureStore(texture: texture_storage_2d<rgba16sint, write>, coords: vec2<u32>, value: vec4<i32>)
+fn textureStore_b76ff3() {
+  var arg_1 = vec2<u32>();
+  var arg_2 = vec4<i32>();
+  textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_b76ff3();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_b76ff3();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_b76ff3();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/b76ff3.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/b76ff3.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..8314e19
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/b76ff3.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture2D<int4> arg_0 : register(u0, space1);
+
+void textureStore_b76ff3() {
+  uint2 arg_1 = (0u).xx;
+  int4 arg_2 = (0).xxxx;
+  arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_b76ff3();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_b76ff3();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_b76ff3();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/b76ff3.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/b76ff3.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..8314e19
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/b76ff3.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture2D<int4> arg_0 : register(u0, space1);
+
+void textureStore_b76ff3() {
+  uint2 arg_1 = (0u).xx;
+  int4 arg_2 = (0).xxxx;
+  arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_b76ff3();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_b76ff3();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_b76ff3();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/b76ff3.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/b76ff3.wgsl.expected.glsl
new file mode 100644
index 0000000..70f8711
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/b76ff3.wgsl.expected.glsl
@@ -0,0 +1,58 @@
+#version 310 es
+
+layout(rgba16i) uniform highp writeonly iimage2D arg_0;
+void textureStore_b76ff3() {
+  uvec2 arg_1 = uvec2(0u);
+  ivec4 arg_2 = ivec4(0);
+  imageStore(arg_0, ivec2(arg_1), arg_2);
+}
+
+vec4 vertex_main() {
+  textureStore_b76ff3();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+layout(rgba16i) uniform highp writeonly iimage2D arg_0;
+void textureStore_b76ff3() {
+  uvec2 arg_1 = uvec2(0u);
+  ivec4 arg_2 = ivec4(0);
+  imageStore(arg_0, ivec2(arg_1), arg_2);
+}
+
+void fragment_main() {
+  textureStore_b76ff3();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+layout(rgba16i) uniform highp writeonly iimage2D arg_0;
+void textureStore_b76ff3() {
+  uvec2 arg_1 = uvec2(0u);
+  ivec4 arg_2 = ivec4(0);
+  imageStore(arg_0, ivec2(arg_1), arg_2);
+}
+
+void compute_main() {
+  textureStore_b76ff3();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/b76ff3.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/b76ff3.wgsl.expected.msl
new file mode 100644
index 0000000..27f65cd
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/b76ff3.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_b76ff3(texture2d<int, access::write> tint_symbol_1) {
+  uint2 arg_1 = uint2(0u);
+  int4 arg_2 = int4(0);
+  tint_symbol_1.write(arg_2, uint2(arg_1));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<int, access::write> tint_symbol_2) {
+  textureStore_b76ff3(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<int, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<int, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureStore_b76ff3(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d<int, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureStore_b76ff3(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureStore/b76ff3.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/b76ff3.wgsl.expected.spvasm
new file mode 100644
index 0000000..0c8dff4
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/b76ff3.wgsl.expected.spvasm
@@ -0,0 +1,84 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 44
+; 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_b76ff3 "textureStore_b76ff3"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 2D 0 0 0 2 Rgba16i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+         %19 = OpConstantNull %v2uint
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+      %v4int = OpTypeVector %int 4
+         %23 = OpConstantNull %v4int
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+         %30 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureStore_b76ff3 = OpFunction %void None %13
+         %16 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v2uint Function %19
+      %arg_2 = OpVariable %_ptr_Function_v4int Function %23
+               OpStore %arg_1 %19
+               OpStore %arg_2 %23
+         %27 = OpLoad %11 %arg_0
+         %28 = OpLoad %v2uint %arg_1
+         %29 = OpLoad %v4int %arg_2
+               OpImageWrite %27 %28 %29
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %30
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %textureStore_b76ff3
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %35 = OpLabel
+         %36 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %36
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %39 = OpLabel
+         %40 = OpFunctionCall %void %textureStore_b76ff3
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %42 = OpLabel
+         %43 = OpFunctionCall %void %textureStore_b76ff3
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/b76ff3.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/b76ff3.wgsl.expected.wgsl
new file mode 100644
index 0000000..31d8eb6
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/b76ff3.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d<rgba16sint, write>;
+
+fn textureStore_b76ff3() {
+  var arg_1 = vec2<u32>();
+  var arg_2 = vec4<i32>();
+  textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_b76ff3();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_b76ff3();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_b76ff3();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/b77161.wgsl b/test/tint/builtins/gen/var/textureStore/b77161.wgsl
new file mode 100644
index 0000000..521cf71
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/b77161.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_1d<rg32uint, write>;
+
+// fn textureStore(texture: texture_storage_1d<rg32uint, write>, coords: u32, value: vec4<u32>)
+fn textureStore_b77161() {
+  var arg_1 = 1u;
+  var arg_2 = vec4<u32>();
+  textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_b77161();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_b77161();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_b77161();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/b77161.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/b77161.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..fbf5804
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/b77161.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture1D<uint4> arg_0 : register(u0, space1);
+
+void textureStore_b77161() {
+  uint arg_1 = 1u;
+  uint4 arg_2 = (0u).xxxx;
+  arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_b77161();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_b77161();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_b77161();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/b77161.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/b77161.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..fbf5804
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/b77161.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture1D<uint4> arg_0 : register(u0, space1);
+
+void textureStore_b77161() {
+  uint arg_1 = 1u;
+  uint4 arg_2 = (0u).xxxx;
+  arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_b77161();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_b77161();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_b77161();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/b77161.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/b77161.wgsl.expected.glsl
new file mode 100644
index 0000000..942bee3
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/b77161.wgsl.expected.glsl
@@ -0,0 +1,81 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rg32ui) uniform highp writeonly uimage1D arg_0;
+void textureStore_b77161() {
+  uint arg_1 = 1u;
+  uvec4 arg_2 = uvec4(0u);
+  imageStore(arg_0, int(arg_1), arg_2);
+}
+
+vec4 vertex_main() {
+  textureStore_b77161();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+layout(rg32ui) uniform highp writeonly uimage1D arg_0;
+void textureStore_b77161() {
+  uint arg_1 = 1u;
+  uvec4 arg_2 = uvec4(0u);
+  imageStore(arg_0, int(arg_1), arg_2);
+}
+
+void fragment_main() {
+  textureStore_b77161();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'image load-store format' : not supported with this profile: es
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rg32ui) uniform highp writeonly uimage1D arg_0;
+void textureStore_b77161() {
+  uint arg_1 = 1u;
+  uvec4 arg_2 = uvec4(0u);
+  imageStore(arg_0, int(arg_1), arg_2);
+}
+
+void compute_main() {
+  textureStore_b77161();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureStore/b77161.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/b77161.wgsl.expected.msl
new file mode 100644
index 0000000..dbc84ef
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/b77161.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_b77161(texture1d<uint, access::write> tint_symbol_1) {
+  uint arg_1 = 1u;
+  uint4 arg_2 = uint4(0u);
+  tint_symbol_1.write(arg_2, uint(arg_1));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<uint, access::write> tint_symbol_2) {
+  textureStore_b77161(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<uint, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<uint, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureStore_b77161(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture1d<uint, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureStore_b77161(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureStore/b77161.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/b77161.wgsl.expected.spvasm
new file mode 100644
index 0000000..877baaa
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/b77161.wgsl.expected.spvasm
@@ -0,0 +1,85 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 43
+; Schema: 0
+               OpCapability Shader
+               OpCapability Image1D
+               OpCapability StorageImageExtendedFormats
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureStore_b77161 "textureStore_b77161"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 1D 0 0 0 2 Rg32ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %20 = OpConstantNull %uint
+     %v4uint = OpTypeVector %uint 4
+         %22 = OpConstantNull %v4uint
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+         %29 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureStore_b77161 = OpFunction %void None %13
+         %16 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_uint Function %20
+      %arg_2 = OpVariable %_ptr_Function_v4uint Function %22
+               OpStore %arg_1 %uint_1
+               OpStore %arg_2 %22
+         %26 = OpLoad %11 %arg_0
+         %27 = OpLoad %uint %arg_1
+         %28 = OpLoad %v4uint %arg_2
+               OpImageWrite %26 %27 %28
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %29
+         %31 = OpLabel
+         %32 = OpFunctionCall %void %textureStore_b77161
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %34 = OpLabel
+         %35 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %35
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %38 = OpLabel
+         %39 = OpFunctionCall %void %textureStore_b77161
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %41 = OpLabel
+         %42 = OpFunctionCall %void %textureStore_b77161
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/b77161.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/b77161.wgsl.expected.wgsl
new file mode 100644
index 0000000..77b02dc
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/b77161.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(0) var arg_0 : texture_storage_1d<rg32uint, write>;
+
+fn textureStore_b77161() {
+  var arg_1 = 1u;
+  var arg_2 = vec4<u32>();
+  textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_b77161();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_b77161();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_b77161();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/c1f29e.wgsl b/test/tint/builtins/gen/var/textureStore/c1f29e.wgsl
new file mode 100644
index 0000000..f2dbc70
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/c1f29e.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_1d<r32float, write>;
+
+// fn textureStore(texture: texture_storage_1d<r32float, write>, coords: u32, value: vec4<f32>)
+fn textureStore_c1f29e() {
+  var arg_1 = 1u;
+  var arg_2 = vec4<f32>();
+  textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_c1f29e();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_c1f29e();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_c1f29e();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/c1f29e.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/c1f29e.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..36eb25d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/c1f29e.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture1D<float4> arg_0 : register(u0, space1);
+
+void textureStore_c1f29e() {
+  uint arg_1 = 1u;
+  float4 arg_2 = (0.0f).xxxx;
+  arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_c1f29e();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_c1f29e();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_c1f29e();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/c1f29e.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/c1f29e.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..36eb25d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/c1f29e.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture1D<float4> arg_0 : register(u0, space1);
+
+void textureStore_c1f29e() {
+  uint arg_1 = 1u;
+  float4 arg_2 = (0.0f).xxxx;
+  arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_c1f29e();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_c1f29e();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_c1f29e();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/c1f29e.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/c1f29e.wgsl.expected.glsl
new file mode 100644
index 0000000..4473606
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/c1f29e.wgsl.expected.glsl
@@ -0,0 +1,84 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(r32f) uniform highp writeonly image1D arg_0;
+void textureStore_c1f29e() {
+  uint arg_1 = 1u;
+  vec4 arg_2 = vec4(0.0f);
+  imageStore(arg_0, int(arg_1), arg_2);
+}
+
+vec4 vertex_main() {
+  textureStore_c1f29e();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image1D' : Reserved word. 
+WARNING: 0:3: 'layout' : useless application of layout qualifier 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+layout(r32f) uniform highp writeonly image1D arg_0;
+void textureStore_c1f29e() {
+  uint arg_1 = 1u;
+  vec4 arg_2 = vec4(0.0f);
+  imageStore(arg_0, int(arg_1), arg_2);
+}
+
+void fragment_main() {
+  textureStore_c1f29e();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'image1D' : Reserved word. 
+WARNING: 0:4: 'layout' : useless application of layout qualifier 
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(r32f) uniform highp writeonly image1D arg_0;
+void textureStore_c1f29e() {
+  uint arg_1 = 1u;
+  vec4 arg_2 = vec4(0.0f);
+  imageStore(arg_0, int(arg_1), arg_2);
+}
+
+void compute_main() {
+  textureStore_c1f29e();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image1D' : Reserved word. 
+WARNING: 0:3: 'layout' : useless application of layout qualifier 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureStore/c1f29e.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/c1f29e.wgsl.expected.msl
new file mode 100644
index 0000000..b3fdc8a
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/c1f29e.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_c1f29e(texture1d<float, access::write> tint_symbol_1) {
+  uint arg_1 = 1u;
+  float4 arg_2 = float4(0.0f);
+  tint_symbol_1.write(arg_2, uint(arg_1));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<float, access::write> tint_symbol_2) {
+  textureStore_c1f29e(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<float, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<float, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureStore_c1f29e(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture1d<float, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureStore_c1f29e(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureStore/c1f29e.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/c1f29e.wgsl.expected.spvasm
new file mode 100644
index 0000000..183f38c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/c1f29e.wgsl.expected.spvasm
@@ -0,0 +1,82 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 41
+; Schema: 0
+               OpCapability Shader
+               OpCapability Image1D
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureStore_c1f29e "textureStore_c1f29e"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 1D 0 0 0 2 R32f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %12 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %20 = OpConstantNull %uint
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+         %27 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureStore_c1f29e = OpFunction %void None %12
+         %15 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_uint Function %20
+      %arg_2 = OpVariable %_ptr_Function_v4float Function %5
+               OpStore %arg_1 %uint_1
+               OpStore %arg_2 %5
+         %24 = OpLoad %11 %arg_0
+         %25 = OpLoad %uint %arg_1
+         %26 = OpLoad %v4float %arg_2
+               OpImageWrite %24 %25 %26
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %27
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %textureStore_c1f29e
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+         %32 = OpLabel
+         %33 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %33
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %textureStore_c1f29e
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %12
+         %39 = OpLabel
+         %40 = OpFunctionCall %void %textureStore_c1f29e
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/c1f29e.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/c1f29e.wgsl.expected.wgsl
new file mode 100644
index 0000000..9d3ff1a
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/c1f29e.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(0) var arg_0 : texture_storage_1d<r32float, write>;
+
+fn textureStore_c1f29e() {
+  var arg_1 = 1u;
+  var arg_2 = vec4<f32>();
+  textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_c1f29e();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_c1f29e();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_c1f29e();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/c2ca46.wgsl b/test/tint/builtins/gen/var/textureStore/c2ca46.wgsl
new file mode 100644
index 0000000..91424c5
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/c2ca46.wgsl
@@ -0,0 +1,47 @@
+// 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: u32, value: vec4<i32>)
+fn textureStore_c2ca46() {
+  var arg_1 = vec2<u32>();
+  var arg_2 = 1u;
+  var arg_3 = vec4<i32>();
+  textureStore(arg_0, arg_1, arg_2, arg_3);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_c2ca46();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_c2ca46();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_c2ca46();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/c2ca46.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/c2ca46.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..ab57f4a
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/c2ca46.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+RWTexture2DArray<int4> arg_0 : register(u0, space1);
+
+void textureStore_c2ca46() {
+  uint2 arg_1 = (0u).xx;
+  uint arg_2 = 1u;
+  int4 arg_3 = (0).xxxx;
+  arg_0[uint3(arg_1, arg_2)] = arg_3;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_c2ca46();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_c2ca46();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_c2ca46();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/c2ca46.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/c2ca46.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..ab57f4a
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/c2ca46.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+RWTexture2DArray<int4> arg_0 : register(u0, space1);
+
+void textureStore_c2ca46() {
+  uint2 arg_1 = (0u).xx;
+  uint arg_2 = 1u;
+  int4 arg_3 = (0).xxxx;
+  arg_0[uint3(arg_1, arg_2)] = arg_3;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_c2ca46();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_c2ca46();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_c2ca46();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/c2ca46.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/c2ca46.wgsl.expected.glsl
new file mode 100644
index 0000000..5f6b0be
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/c2ca46.wgsl.expected.glsl
@@ -0,0 +1,61 @@
+#version 310 es
+
+layout(rgba16i) uniform highp writeonly iimage2DArray arg_0;
+void textureStore_c2ca46() {
+  uvec2 arg_1 = uvec2(0u);
+  uint arg_2 = 1u;
+  ivec4 arg_3 = ivec4(0);
+  imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3);
+}
+
+vec4 vertex_main() {
+  textureStore_c2ca46();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = 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_c2ca46() {
+  uvec2 arg_1 = uvec2(0u);
+  uint arg_2 = 1u;
+  ivec4 arg_3 = ivec4(0);
+  imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3);
+}
+
+void fragment_main() {
+  textureStore_c2ca46();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+layout(rgba16i) uniform highp writeonly iimage2DArray arg_0;
+void textureStore_c2ca46() {
+  uvec2 arg_1 = uvec2(0u);
+  uint arg_2 = 1u;
+  ivec4 arg_3 = ivec4(0);
+  imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3);
+}
+
+void compute_main() {
+  textureStore_c2ca46();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/c2ca46.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/c2ca46.wgsl.expected.msl
new file mode 100644
index 0000000..ea9becc
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/c2ca46.wgsl.expected.msl
@@ -0,0 +1,36 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_c2ca46(texture2d_array<int, access::write> tint_symbol_1) {
+  uint2 arg_1 = uint2(0u);
+  uint arg_2 = 1u;
+  int4 arg_3 = int4(0);
+  tint_symbol_1.write(arg_3, uint2(arg_1), arg_2);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<int, access::write> tint_symbol_2) {
+  textureStore_c2ca46(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_c2ca46(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d_array<int, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureStore_c2ca46(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureStore/c2ca46.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/c2ca46.wgsl.expected.spvasm
new file mode 100644
index 0000000..5992bcf1
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/c2ca46.wgsl.expected.spvasm
@@ -0,0 +1,95 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 53
+; 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_c2ca46 "textureStore_c2ca46"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %arg_3 "arg_3"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 2D 0 1 0 2 Rgba16i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+         %19 = OpConstantNull %v2uint
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %25 = OpConstantNull %uint
+      %v4int = OpTypeVector %int 4
+         %27 = OpConstantNull %v4int
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+     %v3uint = OpTypeVector %uint 3
+         %39 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureStore_c2ca46 = OpFunction %void None %13
+         %16 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v2uint Function %19
+      %arg_2 = OpVariable %_ptr_Function_uint Function %25
+      %arg_3 = OpVariable %_ptr_Function_v4int Function %27
+               OpStore %arg_1 %19
+               OpStore %arg_2 %uint_1
+               OpStore %arg_3 %27
+         %31 = OpLoad %11 %arg_0
+         %33 = OpLoad %v2uint %arg_1
+         %34 = OpCompositeExtract %uint %33 0
+         %35 = OpCompositeExtract %uint %33 1
+         %36 = OpLoad %uint %arg_2
+         %37 = OpCompositeConstruct %v3uint %34 %35 %36
+         %38 = OpLoad %v4int %arg_3
+               OpImageWrite %31 %37 %38
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %39
+         %41 = OpLabel
+         %42 = OpFunctionCall %void %textureStore_c2ca46
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %44 = OpLabel
+         %45 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %45
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %48 = OpLabel
+         %49 = OpFunctionCall %void %textureStore_c2ca46
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %51 = OpLabel
+         %52 = OpFunctionCall %void %textureStore_c2ca46
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/c2ca46.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/c2ca46.wgsl.expected.wgsl
new file mode 100644
index 0000000..1028c67
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/c2ca46.wgsl.expected.wgsl
@@ -0,0 +1,24 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba16sint, write>;
+
+fn textureStore_c2ca46() {
+  var arg_1 = vec2<u32>();
+  var arg_2 = 1u;
+  var arg_3 = vec4<i32>();
+  textureStore(arg_0, arg_1, arg_2, arg_3);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_c2ca46();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_c2ca46();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_c2ca46();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/cb3b0b.wgsl b/test/tint/builtins/gen/var/textureStore/cb3b0b.wgsl
new file mode 100644
index 0000000..92e3678
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/cb3b0b.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_3d<rgba8sint, write>;
+
+// fn textureStore(texture: texture_storage_3d<rgba8sint, write>, coords: vec3<u32>, value: vec4<i32>)
+fn textureStore_cb3b0b() {
+  var arg_1 = vec3<u32>();
+  var arg_2 = vec4<i32>();
+  textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_cb3b0b();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_cb3b0b();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_cb3b0b();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/cb3b0b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/cb3b0b.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..6f20c68
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/cb3b0b.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture3D<int4> arg_0 : register(u0, space1);
+
+void textureStore_cb3b0b() {
+  uint3 arg_1 = (0u).xxx;
+  int4 arg_2 = (0).xxxx;
+  arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_cb3b0b();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_cb3b0b();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_cb3b0b();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/cb3b0b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/cb3b0b.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..6f20c68
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/cb3b0b.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture3D<int4> arg_0 : register(u0, space1);
+
+void textureStore_cb3b0b() {
+  uint3 arg_1 = (0u).xxx;
+  int4 arg_2 = (0).xxxx;
+  arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_cb3b0b();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_cb3b0b();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_cb3b0b();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/cb3b0b.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/cb3b0b.wgsl.expected.glsl
new file mode 100644
index 0000000..96f8c65
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/cb3b0b.wgsl.expected.glsl
@@ -0,0 +1,58 @@
+#version 310 es
+
+layout(rgba8i) uniform highp writeonly iimage3D arg_0;
+void textureStore_cb3b0b() {
+  uvec3 arg_1 = uvec3(0u);
+  ivec4 arg_2 = ivec4(0);
+  imageStore(arg_0, ivec3(arg_1), arg_2);
+}
+
+vec4 vertex_main() {
+  textureStore_cb3b0b();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+layout(rgba8i) uniform highp writeonly iimage3D arg_0;
+void textureStore_cb3b0b() {
+  uvec3 arg_1 = uvec3(0u);
+  ivec4 arg_2 = ivec4(0);
+  imageStore(arg_0, ivec3(arg_1), arg_2);
+}
+
+void fragment_main() {
+  textureStore_cb3b0b();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+layout(rgba8i) uniform highp writeonly iimage3D arg_0;
+void textureStore_cb3b0b() {
+  uvec3 arg_1 = uvec3(0u);
+  ivec4 arg_2 = ivec4(0);
+  imageStore(arg_0, ivec3(arg_1), arg_2);
+}
+
+void compute_main() {
+  textureStore_cb3b0b();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/cb3b0b.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/cb3b0b.wgsl.expected.msl
new file mode 100644
index 0000000..4b6e161
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/cb3b0b.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_cb3b0b(texture3d<int, access::write> tint_symbol_1) {
+  uint3 arg_1 = uint3(0u);
+  int4 arg_2 = int4(0);
+  tint_symbol_1.write(arg_2, uint3(arg_1));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<int, access::write> tint_symbol_2) {
+  textureStore_cb3b0b(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<int, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture3d<int, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureStore_cb3b0b(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture3d<int, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureStore_cb3b0b(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureStore/cb3b0b.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/cb3b0b.wgsl.expected.spvasm
new file mode 100644
index 0000000..363baf6
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/cb3b0b.wgsl.expected.spvasm
@@ -0,0 +1,84 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 44
+; 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_cb3b0b "textureStore_cb3b0b"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 3D 0 0 0 2 Rgba8i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v3uint = OpTypeVector %uint 3
+         %19 = OpConstantNull %v3uint
+%_ptr_Function_v3uint = OpTypePointer Function %v3uint
+      %v4int = OpTypeVector %int 4
+         %23 = OpConstantNull %v4int
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+         %30 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureStore_cb3b0b = OpFunction %void None %13
+         %16 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v3uint Function %19
+      %arg_2 = OpVariable %_ptr_Function_v4int Function %23
+               OpStore %arg_1 %19
+               OpStore %arg_2 %23
+         %27 = OpLoad %11 %arg_0
+         %28 = OpLoad %v3uint %arg_1
+         %29 = OpLoad %v4int %arg_2
+               OpImageWrite %27 %28 %29
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %30
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %textureStore_cb3b0b
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %35 = OpLabel
+         %36 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %36
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %39 = OpLabel
+         %40 = OpFunctionCall %void %textureStore_cb3b0b
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %42 = OpLabel
+         %43 = OpFunctionCall %void %textureStore_cb3b0b
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/cb3b0b.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/cb3b0b.wgsl.expected.wgsl
new file mode 100644
index 0000000..846d119
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/cb3b0b.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(0) var arg_0 : texture_storage_3d<rgba8sint, write>;
+
+fn textureStore_cb3b0b() {
+  var arg_1 = vec3<u32>();
+  var arg_2 = vec4<i32>();
+  textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_cb3b0b();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_cb3b0b();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_cb3b0b();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/d26166.wgsl b/test/tint/builtins/gen/var/textureStore/d26166.wgsl
new file mode 100644
index 0000000..5b2e2f3
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/d26166.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_1d<rgba32uint, write>;
+
+// fn textureStore(texture: texture_storage_1d<rgba32uint, write>, coords: u32, value: vec4<u32>)
+fn textureStore_d26166() {
+  var arg_1 = 1u;
+  var arg_2 = vec4<u32>();
+  textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_d26166();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_d26166();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_d26166();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/d26166.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/d26166.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..8ec5059
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/d26166.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture1D<uint4> arg_0 : register(u0, space1);
+
+void textureStore_d26166() {
+  uint arg_1 = 1u;
+  uint4 arg_2 = (0u).xxxx;
+  arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_d26166();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_d26166();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_d26166();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/d26166.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/d26166.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..8ec5059
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/d26166.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture1D<uint4> arg_0 : register(u0, space1);
+
+void textureStore_d26166() {
+  uint arg_1 = 1u;
+  uint4 arg_2 = (0u).xxxx;
+  arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_d26166();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_d26166();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_d26166();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/d26166.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/d26166.wgsl.expected.glsl
new file mode 100644
index 0000000..dbd3c65
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/d26166.wgsl.expected.glsl
@@ -0,0 +1,84 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba32ui) uniform highp writeonly uimage1D arg_0;
+void textureStore_d26166() {
+  uint arg_1 = 1u;
+  uvec4 arg_2 = uvec4(0u);
+  imageStore(arg_0, int(arg_1), arg_2);
+}
+
+vec4 vertex_main() {
+  textureStore_d26166();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'uimage1D' : Reserved word. 
+WARNING: 0:3: 'layout' : useless application of layout qualifier 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+layout(rgba32ui) uniform highp writeonly uimage1D arg_0;
+void textureStore_d26166() {
+  uint arg_1 = 1u;
+  uvec4 arg_2 = uvec4(0u);
+  imageStore(arg_0, int(arg_1), arg_2);
+}
+
+void fragment_main() {
+  textureStore_d26166();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'uimage1D' : Reserved word. 
+WARNING: 0:4: 'layout' : useless application of layout qualifier 
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba32ui) uniform highp writeonly uimage1D arg_0;
+void textureStore_d26166() {
+  uint arg_1 = 1u;
+  uvec4 arg_2 = uvec4(0u);
+  imageStore(arg_0, int(arg_1), arg_2);
+}
+
+void compute_main() {
+  textureStore_d26166();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'uimage1D' : Reserved word. 
+WARNING: 0:3: 'layout' : useless application of layout qualifier 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureStore/d26166.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/d26166.wgsl.expected.msl
new file mode 100644
index 0000000..22472ce
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/d26166.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_d26166(texture1d<uint, access::write> tint_symbol_1) {
+  uint arg_1 = 1u;
+  uint4 arg_2 = uint4(0u);
+  tint_symbol_1.write(arg_2, uint(arg_1));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<uint, access::write> tint_symbol_2) {
+  textureStore_d26166(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<uint, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<uint, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureStore_d26166(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture1d<uint, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureStore_d26166(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureStore/d26166.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/d26166.wgsl.expected.spvasm
new file mode 100644
index 0000000..922800c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/d26166.wgsl.expected.spvasm
@@ -0,0 +1,84 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 43
+; Schema: 0
+               OpCapability Shader
+               OpCapability Image1D
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureStore_d26166 "textureStore_d26166"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 1D 0 0 0 2 Rgba32ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %20 = OpConstantNull %uint
+     %v4uint = OpTypeVector %uint 4
+         %22 = OpConstantNull %v4uint
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+         %29 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureStore_d26166 = OpFunction %void None %13
+         %16 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_uint Function %20
+      %arg_2 = OpVariable %_ptr_Function_v4uint Function %22
+               OpStore %arg_1 %uint_1
+               OpStore %arg_2 %22
+         %26 = OpLoad %11 %arg_0
+         %27 = OpLoad %uint %arg_1
+         %28 = OpLoad %v4uint %arg_2
+               OpImageWrite %26 %27 %28
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %29
+         %31 = OpLabel
+         %32 = OpFunctionCall %void %textureStore_d26166
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %34 = OpLabel
+         %35 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %35
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %38 = OpLabel
+         %39 = OpFunctionCall %void %textureStore_d26166
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %41 = OpLabel
+         %42 = OpFunctionCall %void %textureStore_d26166
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/d26166.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/d26166.wgsl.expected.wgsl
new file mode 100644
index 0000000..9d51a44
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/d26166.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(0) var arg_0 : texture_storage_1d<rgba32uint, write>;
+
+fn textureStore_d26166() {
+  var arg_1 = 1u;
+  var arg_2 = vec4<u32>();
+  textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_d26166();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_d26166();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_d26166();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/d82b0a.wgsl b/test/tint/builtins/gen/var/textureStore/d82b0a.wgsl
new file mode 100644
index 0000000..14bffb5
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/d82b0a.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_3d<rg32sint, write>;
+
+// fn textureStore(texture: texture_storage_3d<rg32sint, write>, coords: vec3<u32>, value: vec4<i32>)
+fn textureStore_d82b0a() {
+  var arg_1 = vec3<u32>();
+  var arg_2 = vec4<i32>();
+  textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_d82b0a();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_d82b0a();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_d82b0a();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/d82b0a.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/d82b0a.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..f01ea8b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/d82b0a.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture3D<int4> arg_0 : register(u0, space1);
+
+void textureStore_d82b0a() {
+  uint3 arg_1 = (0u).xxx;
+  int4 arg_2 = (0).xxxx;
+  arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_d82b0a();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_d82b0a();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_d82b0a();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/d82b0a.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/d82b0a.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..f01ea8b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/d82b0a.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture3D<int4> arg_0 : register(u0, space1);
+
+void textureStore_d82b0a() {
+  uint3 arg_1 = (0u).xxx;
+  int4 arg_2 = (0).xxxx;
+  arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_d82b0a();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_d82b0a();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_d82b0a();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/d82b0a.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/d82b0a.wgsl.expected.glsl
new file mode 100644
index 0000000..106b253
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/d82b0a.wgsl.expected.glsl
@@ -0,0 +1,81 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rg32i) uniform highp writeonly iimage3D arg_0;
+void textureStore_d82b0a() {
+  uvec3 arg_1 = uvec3(0u);
+  ivec4 arg_2 = ivec4(0);
+  imageStore(arg_0, ivec3(arg_1), arg_2);
+}
+
+vec4 vertex_main() {
+  textureStore_d82b0a();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+layout(rg32i) uniform highp writeonly iimage3D arg_0;
+void textureStore_d82b0a() {
+  uvec3 arg_1 = uvec3(0u);
+  ivec4 arg_2 = ivec4(0);
+  imageStore(arg_0, ivec3(arg_1), arg_2);
+}
+
+void fragment_main() {
+  textureStore_d82b0a();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'image load-store format' : not supported with this profile: es
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rg32i) uniform highp writeonly iimage3D arg_0;
+void textureStore_d82b0a() {
+  uvec3 arg_1 = uvec3(0u);
+  ivec4 arg_2 = ivec4(0);
+  imageStore(arg_0, ivec3(arg_1), arg_2);
+}
+
+void compute_main() {
+  textureStore_d82b0a();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureStore/d82b0a.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/d82b0a.wgsl.expected.msl
new file mode 100644
index 0000000..edc5f9a
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/d82b0a.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_d82b0a(texture3d<int, access::write> tint_symbol_1) {
+  uint3 arg_1 = uint3(0u);
+  int4 arg_2 = int4(0);
+  tint_symbol_1.write(arg_2, uint3(arg_1));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<int, access::write> tint_symbol_2) {
+  textureStore_d82b0a(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<int, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture3d<int, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureStore_d82b0a(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture3d<int, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureStore_d82b0a(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureStore/d82b0a.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/d82b0a.wgsl.expected.spvasm
new file mode 100644
index 0000000..9e0a95c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/d82b0a.wgsl.expected.spvasm
@@ -0,0 +1,85 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 44
+; 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_d82b0a "textureStore_d82b0a"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 3D 0 0 0 2 Rg32i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v3uint = OpTypeVector %uint 3
+         %19 = OpConstantNull %v3uint
+%_ptr_Function_v3uint = OpTypePointer Function %v3uint
+      %v4int = OpTypeVector %int 4
+         %23 = OpConstantNull %v4int
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+         %30 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureStore_d82b0a = OpFunction %void None %13
+         %16 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v3uint Function %19
+      %arg_2 = OpVariable %_ptr_Function_v4int Function %23
+               OpStore %arg_1 %19
+               OpStore %arg_2 %23
+         %27 = OpLoad %11 %arg_0
+         %28 = OpLoad %v3uint %arg_1
+         %29 = OpLoad %v4int %arg_2
+               OpImageWrite %27 %28 %29
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %30
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %textureStore_d82b0a
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %35 = OpLabel
+         %36 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %36
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %39 = OpLabel
+         %40 = OpFunctionCall %void %textureStore_d82b0a
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %42 = OpLabel
+         %43 = OpFunctionCall %void %textureStore_d82b0a
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/d82b0a.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/d82b0a.wgsl.expected.wgsl
new file mode 100644
index 0000000..db0d94f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/d82b0a.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(0) var arg_0 : texture_storage_3d<rg32sint, write>;
+
+fn textureStore_d82b0a() {
+  var arg_1 = vec3<u32>();
+  var arg_2 = vec4<i32>();
+  textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_d82b0a();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_d82b0a();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_d82b0a();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/db92a2.wgsl b/test/tint/builtins/gen/var/textureStore/db92a2.wgsl
new file mode 100644
index 0000000..38c407e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/db92a2.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d<rgba16uint, write>;
+
+// fn textureStore(texture: texture_storage_2d<rgba16uint, write>, coords: vec2<u32>, value: vec4<u32>)
+fn textureStore_db92a2() {
+  var arg_1 = vec2<u32>();
+  var arg_2 = vec4<u32>();
+  textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_db92a2();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_db92a2();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_db92a2();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/db92a2.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/db92a2.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..554bd67
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/db92a2.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture2D<uint4> arg_0 : register(u0, space1);
+
+void textureStore_db92a2() {
+  uint2 arg_1 = (0u).xx;
+  uint4 arg_2 = (0u).xxxx;
+  arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_db92a2();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_db92a2();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_db92a2();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/db92a2.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/db92a2.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..554bd67
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/db92a2.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture2D<uint4> arg_0 : register(u0, space1);
+
+void textureStore_db92a2() {
+  uint2 arg_1 = (0u).xx;
+  uint4 arg_2 = (0u).xxxx;
+  arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_db92a2();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_db92a2();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_db92a2();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/db92a2.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/db92a2.wgsl.expected.glsl
new file mode 100644
index 0000000..26e0bf5
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/db92a2.wgsl.expected.glsl
@@ -0,0 +1,58 @@
+#version 310 es
+
+layout(rgba16ui) uniform highp writeonly uimage2D arg_0;
+void textureStore_db92a2() {
+  uvec2 arg_1 = uvec2(0u);
+  uvec4 arg_2 = uvec4(0u);
+  imageStore(arg_0, ivec2(arg_1), arg_2);
+}
+
+vec4 vertex_main() {
+  textureStore_db92a2();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+layout(rgba16ui) uniform highp writeonly uimage2D arg_0;
+void textureStore_db92a2() {
+  uvec2 arg_1 = uvec2(0u);
+  uvec4 arg_2 = uvec4(0u);
+  imageStore(arg_0, ivec2(arg_1), arg_2);
+}
+
+void fragment_main() {
+  textureStore_db92a2();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+layout(rgba16ui) uniform highp writeonly uimage2D arg_0;
+void textureStore_db92a2() {
+  uvec2 arg_1 = uvec2(0u);
+  uvec4 arg_2 = uvec4(0u);
+  imageStore(arg_0, ivec2(arg_1), arg_2);
+}
+
+void compute_main() {
+  textureStore_db92a2();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/db92a2.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/db92a2.wgsl.expected.msl
new file mode 100644
index 0000000..71a107a
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/db92a2.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_db92a2(texture2d<uint, access::write> tint_symbol_1) {
+  uint2 arg_1 = uint2(0u);
+  uint4 arg_2 = uint4(0u);
+  tint_symbol_1.write(arg_2, uint2(arg_1));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<uint, access::write> tint_symbol_2) {
+  textureStore_db92a2(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<uint, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<uint, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureStore_db92a2(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d<uint, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureStore_db92a2(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureStore/db92a2.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/db92a2.wgsl.expected.spvasm
new file mode 100644
index 0000000..7a570ae
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/db92a2.wgsl.expected.spvasm
@@ -0,0 +1,83 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 43
+; 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_db92a2 "textureStore_db92a2"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 2D 0 0 0 2 Rgba16ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+     %v2uint = OpTypeVector %uint 2
+         %18 = OpConstantNull %v2uint
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+     %v4uint = OpTypeVector %uint 4
+         %22 = OpConstantNull %v4uint
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+         %29 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureStore_db92a2 = OpFunction %void None %13
+         %16 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v2uint Function %18
+      %arg_2 = OpVariable %_ptr_Function_v4uint Function %22
+               OpStore %arg_1 %18
+               OpStore %arg_2 %22
+         %26 = OpLoad %11 %arg_0
+         %27 = OpLoad %v2uint %arg_1
+         %28 = OpLoad %v4uint %arg_2
+               OpImageWrite %26 %27 %28
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %29
+         %31 = OpLabel
+         %32 = OpFunctionCall %void %textureStore_db92a2
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %34 = OpLabel
+         %35 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %35
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %38 = OpLabel
+         %39 = OpFunctionCall %void %textureStore_db92a2
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %41 = OpLabel
+         %42 = OpFunctionCall %void %textureStore_db92a2
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/db92a2.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/db92a2.wgsl.expected.wgsl
new file mode 100644
index 0000000..8754246
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/db92a2.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d<rgba16uint, write>;
+
+fn textureStore_db92a2() {
+  var arg_1 = vec2<u32>();
+  var arg_2 = vec4<u32>();
+  textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_db92a2();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_db92a2();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_db92a2();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/de4b94.wgsl b/test/tint/builtins/gen/var/textureStore/de4b94.wgsl
new file mode 100644
index 0000000..74eb6ce
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/de4b94.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_1d<r32sint, write>;
+
+// fn textureStore(texture: texture_storage_1d<r32sint, write>, coords: u32, value: vec4<i32>)
+fn textureStore_de4b94() {
+  var arg_1 = 1u;
+  var arg_2 = vec4<i32>();
+  textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_de4b94();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_de4b94();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_de4b94();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/de4b94.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/de4b94.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..298f0d2
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/de4b94.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture1D<int4> arg_0 : register(u0, space1);
+
+void textureStore_de4b94() {
+  uint arg_1 = 1u;
+  int4 arg_2 = (0).xxxx;
+  arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_de4b94();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_de4b94();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_de4b94();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/de4b94.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/de4b94.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..298f0d2
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/de4b94.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture1D<int4> arg_0 : register(u0, space1);
+
+void textureStore_de4b94() {
+  uint arg_1 = 1u;
+  int4 arg_2 = (0).xxxx;
+  arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_de4b94();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_de4b94();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_de4b94();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/de4b94.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/de4b94.wgsl.expected.glsl
new file mode 100644
index 0000000..e9d84ef
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/de4b94.wgsl.expected.glsl
@@ -0,0 +1,84 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(r32i) uniform highp writeonly iimage1D arg_0;
+void textureStore_de4b94() {
+  uint arg_1 = 1u;
+  ivec4 arg_2 = ivec4(0);
+  imageStore(arg_0, int(arg_1), arg_2);
+}
+
+vec4 vertex_main() {
+  textureStore_de4b94();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'iimage1D' : Reserved word. 
+WARNING: 0:3: 'layout' : useless application of layout qualifier 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+layout(r32i) uniform highp writeonly iimage1D arg_0;
+void textureStore_de4b94() {
+  uint arg_1 = 1u;
+  ivec4 arg_2 = ivec4(0);
+  imageStore(arg_0, int(arg_1), arg_2);
+}
+
+void fragment_main() {
+  textureStore_de4b94();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'iimage1D' : Reserved word. 
+WARNING: 0:4: 'layout' : useless application of layout qualifier 
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(r32i) uniform highp writeonly iimage1D arg_0;
+void textureStore_de4b94() {
+  uint arg_1 = 1u;
+  ivec4 arg_2 = ivec4(0);
+  imageStore(arg_0, int(arg_1), arg_2);
+}
+
+void compute_main() {
+  textureStore_de4b94();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'iimage1D' : Reserved word. 
+WARNING: 0:3: 'layout' : useless application of layout qualifier 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureStore/de4b94.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/de4b94.wgsl.expected.msl
new file mode 100644
index 0000000..92bf211
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/de4b94.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_de4b94(texture1d<int, access::write> tint_symbol_1) {
+  uint arg_1 = 1u;
+  int4 arg_2 = int4(0);
+  tint_symbol_1.write(arg_2, uint(arg_1));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<int, access::write> tint_symbol_2) {
+  textureStore_de4b94(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<int, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<int, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureStore_de4b94(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture1d<int, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureStore_de4b94(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureStore/de4b94.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/de4b94.wgsl.expected.spvasm
new file mode 100644
index 0000000..4d60d83
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/de4b94.wgsl.expected.spvasm
@@ -0,0 +1,85 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 44
+; Schema: 0
+               OpCapability Shader
+               OpCapability Image1D
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureStore_de4b94 "textureStore_de4b94"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 1D 0 0 0 2 R32i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %21 = OpConstantNull %uint
+      %v4int = OpTypeVector %int 4
+         %23 = OpConstantNull %v4int
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+         %30 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureStore_de4b94 = OpFunction %void None %13
+         %16 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_uint Function %21
+      %arg_2 = OpVariable %_ptr_Function_v4int Function %23
+               OpStore %arg_1 %uint_1
+               OpStore %arg_2 %23
+         %27 = OpLoad %11 %arg_0
+         %28 = OpLoad %uint %arg_1
+         %29 = OpLoad %v4int %arg_2
+               OpImageWrite %27 %28 %29
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %30
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %textureStore_de4b94
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %35 = OpLabel
+         %36 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %36
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %39 = OpLabel
+         %40 = OpFunctionCall %void %textureStore_de4b94
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %42 = OpLabel
+         %43 = OpFunctionCall %void %textureStore_de4b94
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/de4b94.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/de4b94.wgsl.expected.wgsl
new file mode 100644
index 0000000..112c6b8
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/de4b94.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(0) var arg_0 : texture_storage_1d<r32sint, write>;
+
+fn textureStore_de4b94() {
+  var arg_1 = 1u;
+  var arg_2 = vec4<i32>();
+  textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_de4b94();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_de4b94();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_de4b94();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/e7c6d8.wgsl b/test/tint/builtins/gen/var/textureStore/e7c6d8.wgsl
new file mode 100644
index 0000000..c05dac5
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/e7c6d8.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_1d<rgba8unorm, write>;
+
+// fn textureStore(texture: texture_storage_1d<rgba8unorm, write>, coords: u32, value: vec4<f32>)
+fn textureStore_e7c6d8() {
+  var arg_1 = 1u;
+  var arg_2 = vec4<f32>();
+  textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_e7c6d8();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_e7c6d8();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_e7c6d8();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/e7c6d8.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/e7c6d8.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..af74e51
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/e7c6d8.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture1D<float4> arg_0 : register(u0, space1);
+
+void textureStore_e7c6d8() {
+  uint arg_1 = 1u;
+  float4 arg_2 = (0.0f).xxxx;
+  arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_e7c6d8();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_e7c6d8();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_e7c6d8();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/e7c6d8.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/e7c6d8.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..af74e51
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/e7c6d8.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture1D<float4> arg_0 : register(u0, space1);
+
+void textureStore_e7c6d8() {
+  uint arg_1 = 1u;
+  float4 arg_2 = (0.0f).xxxx;
+  arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_e7c6d8();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_e7c6d8();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_e7c6d8();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/e7c6d8.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/e7c6d8.wgsl.expected.glsl
new file mode 100644
index 0000000..024a799
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/e7c6d8.wgsl.expected.glsl
@@ -0,0 +1,84 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba8) uniform highp writeonly image1D arg_0;
+void textureStore_e7c6d8() {
+  uint arg_1 = 1u;
+  vec4 arg_2 = vec4(0.0f);
+  imageStore(arg_0, int(arg_1), arg_2);
+}
+
+vec4 vertex_main() {
+  textureStore_e7c6d8();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image1D' : Reserved word. 
+WARNING: 0:3: 'layout' : useless application of layout qualifier 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+layout(rgba8) uniform highp writeonly image1D arg_0;
+void textureStore_e7c6d8() {
+  uint arg_1 = 1u;
+  vec4 arg_2 = vec4(0.0f);
+  imageStore(arg_0, int(arg_1), arg_2);
+}
+
+void fragment_main() {
+  textureStore_e7c6d8();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'image1D' : Reserved word. 
+WARNING: 0:4: 'layout' : useless application of layout qualifier 
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba8) uniform highp writeonly image1D arg_0;
+void textureStore_e7c6d8() {
+  uint arg_1 = 1u;
+  vec4 arg_2 = vec4(0.0f);
+  imageStore(arg_0, int(arg_1), arg_2);
+}
+
+void compute_main() {
+  textureStore_e7c6d8();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image1D' : Reserved word. 
+WARNING: 0:3: 'layout' : useless application of layout qualifier 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureStore/e7c6d8.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/e7c6d8.wgsl.expected.msl
new file mode 100644
index 0000000..9b202d0
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/e7c6d8.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_e7c6d8(texture1d<float, access::write> tint_symbol_1) {
+  uint arg_1 = 1u;
+  float4 arg_2 = float4(0.0f);
+  tint_symbol_1.write(arg_2, uint(arg_1));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<float, access::write> tint_symbol_2) {
+  textureStore_e7c6d8(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<float, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<float, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureStore_e7c6d8(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture1d<float, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureStore_e7c6d8(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureStore/e7c6d8.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/e7c6d8.wgsl.expected.spvasm
new file mode 100644
index 0000000..e7268c9
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/e7c6d8.wgsl.expected.spvasm
@@ -0,0 +1,82 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 41
+; Schema: 0
+               OpCapability Shader
+               OpCapability Image1D
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureStore_e7c6d8 "textureStore_e7c6d8"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 1D 0 0 0 2 Rgba8
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %12 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %20 = OpConstantNull %uint
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+         %27 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureStore_e7c6d8 = OpFunction %void None %12
+         %15 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_uint Function %20
+      %arg_2 = OpVariable %_ptr_Function_v4float Function %5
+               OpStore %arg_1 %uint_1
+               OpStore %arg_2 %5
+         %24 = OpLoad %11 %arg_0
+         %25 = OpLoad %uint %arg_1
+         %26 = OpLoad %v4float %arg_2
+               OpImageWrite %24 %25 %26
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %27
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %textureStore_e7c6d8
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+         %32 = OpLabel
+         %33 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %33
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %textureStore_e7c6d8
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %12
+         %39 = OpLabel
+         %40 = OpFunctionCall %void %textureStore_e7c6d8
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/e7c6d8.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/e7c6d8.wgsl.expected.wgsl
new file mode 100644
index 0000000..7815feb
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/e7c6d8.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(0) var arg_0 : texture_storage_1d<rgba8unorm, write>;
+
+fn textureStore_e7c6d8() {
+  var arg_1 = 1u;
+  var arg_2 = vec4<f32>();
+  textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_e7c6d8();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_e7c6d8();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_e7c6d8();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/e8cbf7.wgsl b/test/tint/builtins/gen/var/textureStore/e8cbf7.wgsl
new file mode 100644
index 0000000..dfffdaa
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/e8cbf7.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d<r32uint, write>;
+
+// fn textureStore(texture: texture_storage_2d<r32uint, write>, coords: vec2<u32>, value: vec4<u32>)
+fn textureStore_e8cbf7() {
+  var arg_1 = vec2<u32>();
+  var arg_2 = vec4<u32>();
+  textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_e8cbf7();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_e8cbf7();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_e8cbf7();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/e8cbf7.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/e8cbf7.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..645dff7
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/e8cbf7.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture2D<uint4> arg_0 : register(u0, space1);
+
+void textureStore_e8cbf7() {
+  uint2 arg_1 = (0u).xx;
+  uint4 arg_2 = (0u).xxxx;
+  arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_e8cbf7();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_e8cbf7();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_e8cbf7();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/e8cbf7.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/e8cbf7.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..645dff7
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/e8cbf7.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture2D<uint4> arg_0 : register(u0, space1);
+
+void textureStore_e8cbf7() {
+  uint2 arg_1 = (0u).xx;
+  uint4 arg_2 = (0u).xxxx;
+  arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_e8cbf7();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_e8cbf7();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_e8cbf7();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/e8cbf7.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/e8cbf7.wgsl.expected.glsl
new file mode 100644
index 0000000..5852ebd
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/e8cbf7.wgsl.expected.glsl
@@ -0,0 +1,58 @@
+#version 310 es
+
+layout(r32ui) uniform highp writeonly uimage2D arg_0;
+void textureStore_e8cbf7() {
+  uvec2 arg_1 = uvec2(0u);
+  uvec4 arg_2 = uvec4(0u);
+  imageStore(arg_0, ivec2(arg_1), arg_2);
+}
+
+vec4 vertex_main() {
+  textureStore_e8cbf7();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+layout(r32ui) uniform highp writeonly uimage2D arg_0;
+void textureStore_e8cbf7() {
+  uvec2 arg_1 = uvec2(0u);
+  uvec4 arg_2 = uvec4(0u);
+  imageStore(arg_0, ivec2(arg_1), arg_2);
+}
+
+void fragment_main() {
+  textureStore_e8cbf7();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+layout(r32ui) uniform highp writeonly uimage2D arg_0;
+void textureStore_e8cbf7() {
+  uvec2 arg_1 = uvec2(0u);
+  uvec4 arg_2 = uvec4(0u);
+  imageStore(arg_0, ivec2(arg_1), arg_2);
+}
+
+void compute_main() {
+  textureStore_e8cbf7();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/e8cbf7.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/e8cbf7.wgsl.expected.msl
new file mode 100644
index 0000000..92344cd
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/e8cbf7.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_e8cbf7(texture2d<uint, access::write> tint_symbol_1) {
+  uint2 arg_1 = uint2(0u);
+  uint4 arg_2 = uint4(0u);
+  tint_symbol_1.write(arg_2, uint2(arg_1));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<uint, access::write> tint_symbol_2) {
+  textureStore_e8cbf7(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<uint, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<uint, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureStore_e8cbf7(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d<uint, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureStore_e8cbf7(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureStore/e8cbf7.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/e8cbf7.wgsl.expected.spvasm
new file mode 100644
index 0000000..83db776
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/e8cbf7.wgsl.expected.spvasm
@@ -0,0 +1,83 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 43
+; 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_e8cbf7 "textureStore_e8cbf7"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 2D 0 0 0 2 R32ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+     %v2uint = OpTypeVector %uint 2
+         %18 = OpConstantNull %v2uint
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+     %v4uint = OpTypeVector %uint 4
+         %22 = OpConstantNull %v4uint
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+         %29 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureStore_e8cbf7 = OpFunction %void None %13
+         %16 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v2uint Function %18
+      %arg_2 = OpVariable %_ptr_Function_v4uint Function %22
+               OpStore %arg_1 %18
+               OpStore %arg_2 %22
+         %26 = OpLoad %11 %arg_0
+         %27 = OpLoad %v2uint %arg_1
+         %28 = OpLoad %v4uint %arg_2
+               OpImageWrite %26 %27 %28
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %29
+         %31 = OpLabel
+         %32 = OpFunctionCall %void %textureStore_e8cbf7
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %34 = OpLabel
+         %35 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %35
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %38 = OpLabel
+         %39 = OpFunctionCall %void %textureStore_e8cbf7
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %41 = OpLabel
+         %42 = OpFunctionCall %void %textureStore_e8cbf7
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/e8cbf7.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/e8cbf7.wgsl.expected.wgsl
new file mode 100644
index 0000000..f43ca9b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/e8cbf7.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d<r32uint, write>;
+
+fn textureStore_e8cbf7() {
+  var arg_1 = vec2<u32>();
+  var arg_2 = vec4<u32>();
+  textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_e8cbf7();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_e8cbf7();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_e8cbf7();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/f1e6d3.wgsl b/test/tint/builtins/gen/var/textureStore/f1e6d3.wgsl
new file mode 100644
index 0000000..1014342
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/f1e6d3.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_3d<r32sint, write>;
+
+// fn textureStore(texture: texture_storage_3d<r32sint, write>, coords: vec3<u32>, value: vec4<i32>)
+fn textureStore_f1e6d3() {
+  var arg_1 = vec3<u32>();
+  var arg_2 = vec4<i32>();
+  textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_f1e6d3();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_f1e6d3();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_f1e6d3();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/f1e6d3.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/f1e6d3.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..56d522a
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/f1e6d3.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture3D<int4> arg_0 : register(u0, space1);
+
+void textureStore_f1e6d3() {
+  uint3 arg_1 = (0u).xxx;
+  int4 arg_2 = (0).xxxx;
+  arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_f1e6d3();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_f1e6d3();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_f1e6d3();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/f1e6d3.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/f1e6d3.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..56d522a
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/f1e6d3.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture3D<int4> arg_0 : register(u0, space1);
+
+void textureStore_f1e6d3() {
+  uint3 arg_1 = (0u).xxx;
+  int4 arg_2 = (0).xxxx;
+  arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_f1e6d3();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_f1e6d3();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_f1e6d3();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/f1e6d3.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/f1e6d3.wgsl.expected.glsl
new file mode 100644
index 0000000..a4e196b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/f1e6d3.wgsl.expected.glsl
@@ -0,0 +1,58 @@
+#version 310 es
+
+layout(r32i) uniform highp writeonly iimage3D arg_0;
+void textureStore_f1e6d3() {
+  uvec3 arg_1 = uvec3(0u);
+  ivec4 arg_2 = ivec4(0);
+  imageStore(arg_0, ivec3(arg_1), arg_2);
+}
+
+vec4 vertex_main() {
+  textureStore_f1e6d3();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+layout(r32i) uniform highp writeonly iimage3D arg_0;
+void textureStore_f1e6d3() {
+  uvec3 arg_1 = uvec3(0u);
+  ivec4 arg_2 = ivec4(0);
+  imageStore(arg_0, ivec3(arg_1), arg_2);
+}
+
+void fragment_main() {
+  textureStore_f1e6d3();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+layout(r32i) uniform highp writeonly iimage3D arg_0;
+void textureStore_f1e6d3() {
+  uvec3 arg_1 = uvec3(0u);
+  ivec4 arg_2 = ivec4(0);
+  imageStore(arg_0, ivec3(arg_1), arg_2);
+}
+
+void compute_main() {
+  textureStore_f1e6d3();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/f1e6d3.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/f1e6d3.wgsl.expected.msl
new file mode 100644
index 0000000..c32f6a9
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/f1e6d3.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_f1e6d3(texture3d<int, access::write> tint_symbol_1) {
+  uint3 arg_1 = uint3(0u);
+  int4 arg_2 = int4(0);
+  tint_symbol_1.write(arg_2, uint3(arg_1));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<int, access::write> tint_symbol_2) {
+  textureStore_f1e6d3(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<int, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture3d<int, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureStore_f1e6d3(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture3d<int, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureStore_f1e6d3(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureStore/f1e6d3.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/f1e6d3.wgsl.expected.spvasm
new file mode 100644
index 0000000..baf5519
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/f1e6d3.wgsl.expected.spvasm
@@ -0,0 +1,84 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 44
+; 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_f1e6d3 "textureStore_f1e6d3"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 3D 0 0 0 2 R32i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v3uint = OpTypeVector %uint 3
+         %19 = OpConstantNull %v3uint
+%_ptr_Function_v3uint = OpTypePointer Function %v3uint
+      %v4int = OpTypeVector %int 4
+         %23 = OpConstantNull %v4int
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+         %30 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureStore_f1e6d3 = OpFunction %void None %13
+         %16 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v3uint Function %19
+      %arg_2 = OpVariable %_ptr_Function_v4int Function %23
+               OpStore %arg_1 %19
+               OpStore %arg_2 %23
+         %27 = OpLoad %11 %arg_0
+         %28 = OpLoad %v3uint %arg_1
+         %29 = OpLoad %v4int %arg_2
+               OpImageWrite %27 %28 %29
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %30
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %textureStore_f1e6d3
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %35 = OpLabel
+         %36 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %36
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %39 = OpLabel
+         %40 = OpFunctionCall %void %textureStore_f1e6d3
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %42 = OpLabel
+         %43 = OpFunctionCall %void %textureStore_f1e6d3
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/f1e6d3.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/f1e6d3.wgsl.expected.wgsl
new file mode 100644
index 0000000..3fe60f3
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/f1e6d3.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(0) var arg_0 : texture_storage_3d<r32sint, write>;
+
+fn textureStore_f1e6d3() {
+  var arg_1 = vec3<u32>();
+  var arg_2 = vec4<i32>();
+  textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_f1e6d3();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_f1e6d3();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_f1e6d3();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/fcbe66.wgsl b/test/tint/builtins/gen/var/textureStore/fcbe66.wgsl
new file mode 100644
index 0000000..808c43b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/fcbe66.wgsl
@@ -0,0 +1,46 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_3d<rg32float, write>;
+
+// fn textureStore(texture: texture_storage_3d<rg32float, write>, coords: vec3<u32>, value: vec4<f32>)
+fn textureStore_fcbe66() {
+  var arg_1 = vec3<u32>();
+  var arg_2 = vec4<f32>();
+  textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_fcbe66();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_fcbe66();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_fcbe66();
+}
diff --git a/test/tint/builtins/gen/var/textureStore/fcbe66.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/fcbe66.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..2f4a6da
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/fcbe66.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture3D<float4> arg_0 : register(u0, space1);
+
+void textureStore_fcbe66() {
+  uint3 arg_1 = (0u).xxx;
+  float4 arg_2 = (0.0f).xxxx;
+  arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_fcbe66();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_fcbe66();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_fcbe66();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/fcbe66.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/fcbe66.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..2f4a6da
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/fcbe66.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture3D<float4> arg_0 : register(u0, space1);
+
+void textureStore_fcbe66() {
+  uint3 arg_1 = (0u).xxx;
+  float4 arg_2 = (0.0f).xxxx;
+  arg_0[arg_1] = arg_2;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureStore_fcbe66();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const 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_fcbe66();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureStore_fcbe66();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureStore/fcbe66.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/fcbe66.wgsl.expected.glsl
new file mode 100644
index 0000000..5f0b171
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/fcbe66.wgsl.expected.glsl
@@ -0,0 +1,81 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rg32f) uniform highp writeonly image3D arg_0;
+void textureStore_fcbe66() {
+  uvec3 arg_1 = uvec3(0u);
+  vec4 arg_2 = vec4(0.0f);
+  imageStore(arg_0, ivec3(arg_1), arg_2);
+}
+
+vec4 vertex_main() {
+  textureStore_fcbe66();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+layout(rg32f) uniform highp writeonly image3D arg_0;
+void textureStore_fcbe66() {
+  uvec3 arg_1 = uvec3(0u);
+  vec4 arg_2 = vec4(0.0f);
+  imageStore(arg_0, ivec3(arg_1), arg_2);
+}
+
+void fragment_main() {
+  textureStore_fcbe66();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'image load-store format' : not supported with this profile: es
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rg32f) uniform highp writeonly image3D arg_0;
+void textureStore_fcbe66() {
+  uvec3 arg_1 = uvec3(0u);
+  vec4 arg_2 = vec4(0.0f);
+  imageStore(arg_0, ivec3(arg_1), arg_2);
+}
+
+void compute_main() {
+  textureStore_fcbe66();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureStore/fcbe66.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/fcbe66.wgsl.expected.msl
new file mode 100644
index 0000000..e370bf5
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/fcbe66.wgsl.expected.msl
@@ -0,0 +1,35 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureStore_fcbe66(texture3d<float, access::write> tint_symbol_1) {
+  uint3 arg_1 = uint3(0u);
+  float4 arg_2 = float4(0.0f);
+  tint_symbol_1.write(arg_2, uint3(arg_1));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<float, access::write> tint_symbol_2) {
+  textureStore_fcbe66(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<float, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture3d<float, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureStore_fcbe66(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture3d<float, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureStore_fcbe66(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureStore/fcbe66.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/fcbe66.wgsl.expected.spvasm
new file mode 100644
index 0000000..e40ac5d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/fcbe66.wgsl.expected.spvasm
@@ -0,0 +1,82 @@
+; 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_fcbe66 "textureStore_fcbe66"
+               OpName %arg_1 "arg_1"
+               OpName %arg_2 "arg_2"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 3D 0 0 0 2 Rg32f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %12 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v3uint = OpTypeVector %uint 3
+         %18 = OpConstantNull %v3uint
+%_ptr_Function_v3uint = OpTypePointer Function %v3uint
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+         %27 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureStore_fcbe66 = OpFunction %void None %12
+         %15 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_v3uint Function %18
+      %arg_2 = OpVariable %_ptr_Function_v4float Function %5
+               OpStore %arg_1 %18
+               OpStore %arg_2 %5
+         %24 = OpLoad %11 %arg_0
+         %25 = OpLoad %v3uint %arg_1
+         %26 = OpLoad %v4float %arg_2
+               OpImageWrite %24 %25 %26
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %27
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %textureStore_fcbe66
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+         %32 = OpLabel
+         %33 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %33
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %textureStore_fcbe66
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %12
+         %39 = OpLabel
+         %40 = OpFunctionCall %void %textureStore_fcbe66
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/fcbe66.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/fcbe66.wgsl.expected.wgsl
new file mode 100644
index 0000000..8401058
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureStore/fcbe66.wgsl.expected.wgsl
@@ -0,0 +1,23 @@
+@group(1) @binding(0) var arg_0 : texture_storage_3d<rg32float, write>;
+
+fn textureStore_fcbe66() {
+  var arg_1 = vec3<u32>();
+  var arg_2 = vec4<f32>();
+  textureStore(arg_0, arg_1, arg_2);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureStore_fcbe66();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureStore_fcbe66();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureStore_fcbe66();
+}
diff --git a/test/tint/builtins/gen/var/transpose/06794e.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/transpose/06794e.wgsl.expected.fxc.hlsl
index 8e83264..866b199 100644
--- a/test/tint/builtins/gen/var/transpose/06794e.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/transpose/06794e.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
   transpose_06794e();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000166C5129750(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000166C5129750(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/transpose/5edd96.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/transpose/5edd96.wgsl.expected.fxc.hlsl
index 9874ab3..affbe8d 100644
--- a/test/tint/builtins/gen/var/transpose/5edd96.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/transpose/5edd96.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
   transpose_5edd96();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001F440374A40(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001F440374A40(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/transpose/5f36bf.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/transpose/5f36bf.wgsl.expected.fxc.hlsl
index cfb38a5..dcca576 100644
--- a/test/tint/builtins/gen/var/transpose/5f36bf.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/transpose/5f36bf.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
   transpose_5f36bf();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002500869E2F0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002500869E2F0(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/transpose/7be8b2.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/transpose/7be8b2.wgsl.expected.fxc.hlsl
index cd61e2c..14a14de 100644
--- a/test/tint/builtins/gen/var/transpose/7be8b2.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/transpose/7be8b2.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
   transpose_7be8b2();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000015E28C70990(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000015E28C70990(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/transpose/844869.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/transpose/844869.wgsl.expected.fxc.hlsl
index 62a9408..251fa54 100644
--- a/test/tint/builtins/gen/var/transpose/844869.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/transpose/844869.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
   transpose_844869();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001A73CD16C90(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001A73CD16C90(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/transpose/8c06ce.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/transpose/8c06ce.wgsl.expected.fxc.hlsl
index 478d92f..e731f0c 100644
--- a/test/tint/builtins/gen/var/transpose/8c06ce.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/transpose/8c06ce.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
   transpose_8c06ce();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000018FE8A7D600(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000018FE8A7D600(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/transpose/b9ad1f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/transpose/b9ad1f.wgsl.expected.fxc.hlsl
index ba9abbe..8827e68 100644
--- a/test/tint/builtins/gen/var/transpose/b9ad1f.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/transpose/b9ad1f.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
   transpose_b9ad1f();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001BE022AEC60(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001BE022AEC60(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/transpose/d6faec.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/transpose/d6faec.wgsl.expected.fxc.hlsl
index cab5786..a8c55bc 100644
--- a/test/tint/builtins/gen/var/transpose/d6faec.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/transpose/d6faec.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
   transpose_d6faec();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000022366B94660(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000022366B94660(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/transpose/faeb05.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/transpose/faeb05.wgsl.expected.fxc.hlsl
index d4414a3..03aad4c 100644
--- a/test/tint/builtins/gen/var/transpose/faeb05.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/transpose/faeb05.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
   transpose_faeb05();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000018F09DB3BF0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000018F09DB3BF0(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/trunc/103ab8.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/trunc/103ab8.wgsl.expected.fxc.hlsl
index b061405..66c441a 100644
--- a/test/tint/builtins/gen/var/trunc/103ab8.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/trunc/103ab8.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
   trunc_103ab8();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000020DD35586D0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000020DD35586D0(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/trunc/a56109.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/trunc/a56109.wgsl.expected.fxc.hlsl
index 36a52b1..0e3d94d 100644
--- a/test/tint/builtins/gen/var/trunc/a56109.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/trunc/a56109.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
   trunc_a56109();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001DD3B6C86D0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001DD3B6C86D0(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-
diff --git a/test/tint/builtins/gen/var/trunc/cc2b0d.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/trunc/cc2b0d.wgsl.expected.fxc.hlsl
index 2c934e2..2f7fe08 100644
--- a/test/tint/builtins/gen/var/trunc/cc2b0d.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/trunc/cc2b0d.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
   trunc_cc2b0d();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000023FD3F982D0(2,3-11): error X3000: unrecognized identifier 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000023FD3F982D0(2,13-17): error X3000: unrecognized identifier 'arg_0'
-
diff --git a/test/tint/builtins/gen/var/trunc/ce7c17.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/trunc/ce7c17.wgsl.expected.fxc.hlsl
index 58aab6d..232fb88 100644
--- a/test/tint/builtins/gen/var/trunc/ce7c17.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/trunc/ce7c17.wgsl.expected.fxc.hlsl
@@ -31,7 +31,3 @@
   trunc_ce7c17();
   return;
 }
-FXC validation failure:
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001469F0570D0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
-D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001469F0570D0(3,10-18): error X3000: syntax error: unexpected token 'float16_t'
-